Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
windows
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
windows
Commits
af064aff
Commit
af064aff
authored
Oct 27, 2023
by
BlackJokerCJ
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
15057f94
d11982c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
CreditSubmitCommand.java
...in/java/com/jqtx/windows/command/CreditSubmitCommand.java
+1
-1
SyncLoanCommand.java
src/main/java/com/jqtx/windows/command/SyncLoanCommand.java
+18
-4
SyncLoanRequest.java
...in/java/com/jqtx/windows/web/request/SyncLoanRequest.java
+0
-4
No files found.
src/main/java/com/jqtx/windows/command/CreditSubmitCommand.java
View file @
af064aff
...
...
@@ -101,7 +101,7 @@ public class CreditSubmitCommand extends AbstractCommand {
}
private
CreditModel
convert
(
CreditSubmitRequest
request
,
CreditModel
model
)
{
StringBuilder
filePath
=
new
StringBuilder
();
StringBuilder
filePath
=
new
StringBuilder
(
"ZN/"
);
filePath
.
append
(
"CREDIT_DATA"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/"
).
append
(
request
.
getOrderNo
()).
append
(
".json"
);
model
.
setCreditDetailUrl
(
filePath
.
toString
());
CreditInformationModel
infoModel
=
request
.
getCreditData
();
...
...
src/main/java/com/jqtx/windows/command/SyncLoanCommand.java
View file @
af064aff
package
com
.
jqtx
.
windows
.
command
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.lang.Assert
;
import
com.alibaba.fastjson.JSON
;
import
com.jqtx.windows.common.converter.ProtocolConverter
;
...
...
@@ -24,6 +25,7 @@ import org.springframework.stereotype.Service;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -55,14 +57,16 @@ public class SyncLoanCommand extends AbstractCommand {
BigDecimal
loanAmt
=
syncLoanRequest
.
getPlanList
().
stream
().
map
(
SyncLoanRequest
.
LoanPlan
::
getPlanAmt
).
map
(
BigDecimal:
:
new
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
raiseAmt
=
syncLoanRequest
.
getPlanList
().
stream
().
map
(
SyncLoanRequest
.
LoanPlan
::
getPlanBen
).
map
(
BigDecimal:
:
new
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
rateAmt
=
syncLoanRequest
.
getPlanList
().
stream
().
map
(
SyncLoanRequest
.
LoanPlan
::
getPlanXi
).
map
(
BigDecimal:
:
new
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
serviceAmt
=
syncLoanRequest
.
getPlanList
().
stream
().
map
(
SyncLoanRequest
.
LoanPlan
::
getPlanFu
).
map
(
BigDecimal:
:
new
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
burdenAmt
=
syncLoanRequest
.
getPlanList
().
stream
().
map
(
SyncLoanRequest
.
LoanPlan
::
getPlanBurden
).
map
(
BigDecimal:
:
new
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
loanModel
.
setLoanAmt
(
loanAmt
);
loanModel
.
setRaiseAmt
(
raiseAmt
);
loanModel
.
setServiceAmt
(
serviceAmt
);
loanModel
.
setServiceAmt
(
BigDecimal
.
ZERO
);
loanModel
.
setRateAmt
(
rateAmt
);
loanModel
.
setBurdenAmt
(
BigDecimal
.
ZERO
);
loanModel
.
setBurdenAmt
(
burdenAmt
);
loanModel
.
setLoanUsage
(
syncLoanRequest
.
getLoanUsage
());
loanModel
.
setRaiseDate
(
LocalDateTime
.
parse
(
syncLoanRequest
.
getRaiseDate
()));
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
LocalDateTime
dateTime
=
LocalDateTime
.
parse
(
syncLoanRequest
.
getRaiseDate
(),
df
);
loanModel
.
setRaiseDate
(
dateTime
);
loanModel
.
setLoanStatus
(
LoanStatusEnum
.
BACKING
.
name
());
loanModel
.
setBankAccount
(
syncLoanRequest
.
getBankAccount
());
loanModel
.
setLoanTerm
(
syncLoanRequest
.
getLoanTerm
());
...
...
@@ -74,6 +78,8 @@ public class SyncLoanCommand extends AbstractCommand {
String
planNo
=
iSeqNoGenerateComponent
.
genCommonSeqNo
(
BizSeqNoConfig
.
PLAN_NO_KEY
,
BizSeqNoConfig
.
PLAN_NO_PREFIX
);
LoanPlanModel
loanPlanModel
=
BeanUtil
.
toBean
(
loanPlan
,
LoanPlanModel
.
class
);
loanPlanModel
.
setPlanNo
(
planNo
);
loanPlanModel
.
setLoanNo
(
loanModel
.
getLoanNo
());
loanPlanModel
.
setStatus
(
"BACKING"
);
//新增
loanPlanComponent
.
insert
(
loanPlanModel
);
});
...
...
@@ -86,4 +92,12 @@ public class SyncLoanCommand extends AbstractCommand {
iProtocalFeignService
.
uploadProtocolPdf
(
uploadPdfRequest
);
return
JsonResult
.
success
();
}
public
static
void
main
(
String
[]
args
)
{
String
dateTimeStr
=
"2019-11-01 11:11:11"
;
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
LocalDateTime
dateTime
=
LocalDateTime
.
parse
(
dateTimeStr
,
df
);
System
.
out
.
println
(
dateTime
);
}
}
src/main/java/com/jqtx/windows/web/request/SyncLoanRequest.java
View file @
af064aff
...
...
@@ -69,10 +69,6 @@ public class SyncLoanRequest {
@ApiModelProperty
(
value
=
"计划利息"
)
private
String
planXi
;
@NotEmpty
(
message
=
"计划还款服务费不能为空"
)
@ApiModelProperty
(
value
=
"计划服务费"
)
private
String
planFu
;
@NotEmpty
(
message
=
"计划还款融单费不能为空"
)
@ApiModelProperty
(
value
=
"计划融单费"
)
private
String
planBurden
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment