Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
baihang-report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
data-spider
baihang-report
Commits
3ba3a5f4
Commit
3ba3a5f4
authored
Jan 07, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
D3逾期报送逻辑优化。
parent
5d775bef
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
419 additions
and
16 deletions
+419
-16
BaiHangZhuDaiService.java
...antgroup/report/service/baihang/BaiHangZhuDaiService.java
+17
-14
ManualToolService.java
...antgroup/report/service/manualTool/ManualToolService.java
+398
-1
RepaymentLoanInfoDbMapper.xml
...tgroup/report/mapper/master/RepaymentLoanInfoDbMapper.xml
+4
-1
No files found.
src/main/java/cn/quantgroup/report/service/baihang/BaiHangZhuDaiService.java
View file @
3ba3a5f4
...
@@ -391,20 +391,23 @@ public class BaiHangZhuDaiService {
...
@@ -391,20 +391,23 @@ public class BaiHangZhuDaiService {
String
id
=
""
;
String
id
=
""
;
String
reqId_log
=
repaymentLoanInfo
.
getReqID
();
String
reqId_log
=
repaymentLoanInfo
.
getReqID
();
try
{
try
{
RepaymentInfoZhuDai
repaymentLoanInfo1
=
repaymentLoanInfoDbMapper
.
findLastOne
(
BaiHangRepayment
.
builder
().
loanId
(
repaymentLoanInfo
.
getLoanId
()).
termNo
(
repaymentLoanInfo
.
getTermNo
()).
build
());
if
(
j
>
0
){
//逾期
if
(
j
>
0
&&
Objects
.
nonNull
(
repaymentLoanInfo1
))
{
//逾期的,跳过
RepaymentInfoZhuDai
repaymentLoanInfo1
=
repaymentLoanInfoDbMapper
.
findLastOne
(
BaiHangRepayment
.
builder
().
loanId
(
repaymentLoanInfo
.
getLoanId
()).
termNo
(
repaymentLoanInfo
.
getTermNo
()).
sendDate
(
startnyr
).
build
());
tg_atomicInt
.
getAndIncrement
();
////if (j > 0 && Objects.nonNull(repaymentLoanInfo1)) { //逾期的,跳过
log
.
info
(
"量化派助贷TO百行报送-实时还款逾期跳过报送, reqId_log: {} , loanId: {} , termNo: {} , startnyr: {} , endnyr: {} , bean: {} "
,
reqId_log
,
repaymentLoanInfo
.
getLoanId
(),
repaymentLoanInfo
.
getTermNo
(),
startnyr
,
endnyr
,
JSON
.
toJSONString
(
repaymentLoanInfo1
));
if
(
Objects
.
nonNull
(
repaymentLoanInfo1
))
{
//逾期的,跳过
tg_atomicInt
.
getAndIncrement
();
//----------2020.02.02 保存跳过的数据,用于以后补全
log
.
info
(
"量化派助贷TO百行报送-实时还款逾期跳过报送, reqId_log: {} , loanId: {} , termNo: {} , startnyr: {} , endnyr: {} , bean: {} "
,
reqId_log
,
repaymentLoanInfo
.
getLoanId
(),
repaymentLoanInfo
.
getTermNo
(),
startnyr
,
endnyr
,
JSON
.
toJSONString
(
repaymentLoanInfo1
));
try
{
FileUtils
.
write
(
new
File
(
"/home/quant_group/baihang-report/data/baihang/D3/yuqi_tg/"
+
startnyr
+
"_"
+
endnyr
+
".json"
),
//----------2020.02.02 保存跳过的数据,用于以后补全
JSON
.
toJSONString
(
repaymentLoanInfo
)+
"\r\n"
,
"UTF-8"
,
true
);
try
{
}
catch
(
Exception
e
){
FileUtils
.
write
(
new
File
(
"/home/quant_group/baihang-report/data/baihang/D3/yuqi_tg/"
+
startnyr
+
"_"
+
endnyr
+
".json"
),
log
.
error
(
"量化派助贷TO百行报送-实时逾期跳过, Json数据保存文件异常,"
,
e
);
JSON
.
toJSONString
(
repaymentLoanInfo
)+
"\r\n"
,
"UTF-8"
,
true
);
}
}
catch
(
Exception
e
){
log
.
error
(
"量化派助贷TO百行报送-实时逾期跳过, Json数据保存文件异常,"
,
e
);
}
continue
;
continue
;
}
}
}
totail_atomicInt
.
getAndIncrement
();
totail_atomicInt
.
getAndIncrement
();
...
@@ -426,7 +429,7 @@ public class BaiHangZhuDaiService {
...
@@ -426,7 +429,7 @@ public class BaiHangZhuDaiService {
repaymentLoanInfo
.
setMobile
(
interfaceUploadClient
(
repaymentLoanInfo
.
getMobile
()));
repaymentLoanInfo
.
setMobile
(
interfaceUploadClient
(
repaymentLoanInfo
.
getMobile
()));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangRepayMentLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
repaymentLoanInfo
));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangRepayMentLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
repaymentLoanInfo
));
log
.
info
(
"助贷还款用户报送结果,
param: {} , resultStr: {} "
,
logJson
,
resultStr
);
log
.
info
(
"助贷还款用户报送结果,
J: {} , param: {} , resultStr: {} "
,
j
,
logJson
,
resultStr
);
if
(
Objects
.
isNull
(
resultStr
)
||
!
"success"
.
equalsIgnoreCase
(
JSON
.
parseObject
(
resultStr
).
getString
(
"status"
)))
{
if
(
Objects
.
isNull
(
resultStr
)
||
!
"success"
.
equalsIgnoreCase
(
JSON
.
parseObject
(
resultStr
).
getString
(
"status"
)))
{
log
.
info
(
"量化派助贷TO百行报送-还款返回结果不正确, 开始时间: {} , 结束时间: {} , reqId_log: {} , recordId: {} , loanId: {} , bean: {} "
,
startnyr
,
endnyr
,
reqId_log
,
id
,
repaymentLoanInfo
.
getLoanId
(),
JSON
.
toJSONString
(
repaymentLoanInfo
));
log
.
info
(
"量化派助贷TO百行报送-还款返回结果不正确, 开始时间: {} , 结束时间: {} , reqId_log: {} , recordId: {} , loanId: {} , bean: {} "
,
startnyr
,
endnyr
,
reqId_log
,
id
,
repaymentLoanInfo
.
getLoanId
(),
JSON
.
toJSONString
(
repaymentLoanInfo
));
repaymentLoanInfoDbMapper
.
updateCurrentRecordEnableFalse
(
BaiHangUpDateRecord
.
builder
().
enable
(
"0"
).
recordId
(
id
).
build
());
repaymentLoanInfoDbMapper
.
updateCurrentRecordEnableFalse
(
BaiHangUpDateRecord
.
builder
().
enable
(
"0"
).
recordId
(
id
).
build
());
...
...
src/main/java/cn/quantgroup/report/service/manualTool/ManualToolService.java
View file @
3ba3a5f4
This diff is collapsed.
Click to expand it.
src/main/resources/cn/quantgroup/report/mapper/master/RepaymentLoanInfoDbMapper.xml
View file @
3ba3a5f4
...
@@ -76,7 +76,10 @@
...
@@ -76,7 +76,10 @@
<select
id=
"findLastOne"
parameterType=
"cn.quantgroup.report.domain.baihang.BaiHangRepayment"
resultType=
"cn.quantgroup.report.domain.baihang.RepaymentInfoZhuDai"
>
<select
id=
"findLastOne"
parameterType=
"cn.quantgroup.report.domain.baihang.BaiHangRepayment"
resultType=
"cn.quantgroup.report.domain.baihang.RepaymentInfoZhuDai"
>
select id, record_id, req_id, loan_id, term_no, status_confirm_at, term_status
select id, record_id, req_id, loan_id, term_no, status_confirm_at, term_status
from repayment_loan_info_zhudai where loan_id = #{loanId} and term_no = #{termNo} limit 1;
from repayment_loan_info_zhudai where loan_id = #{loanId} and term_no = #{termNo}
<!--2020.01.07 17:55 值针对当天,还款报了,逾期又有一条的情况 DATE_FORMAT(now(),'%Y-%m-%d') -->
and created_at >= #{sendDate}
limit 1;
</select>
</select>
...
...
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