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
c541232b
Commit
c541232b
authored
Jan 12, 2022
by
陈宏杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改D3姓名取值逻辑
parent
99be23c7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
34 deletions
+45
-34
ApplyLoanInfoMapper.java
...quantgroup/report/mapper/baihang/ApplyLoanInfoMapper.java
+2
-0
LoanInfoMapper.java
...a/cn/quantgroup/report/mapper/baihang/LoanInfoMapper.java
+1
-0
BaiHangFileReportService.java
...roup/report/service/baihang/BaiHangFileReportService.java
+27
-34
ApplyLoanInfoMapper.xml
.../quantgroup/report/mapper/baihang/ApplyLoanInfoMapper.xml
+7
-0
LoanInfoMapper.xml
...es/cn/quantgroup/report/mapper/baihang/LoanInfoMapper.xml
+8
-0
No files found.
src/main/java/cn/quantgroup/report/mapper/baihang/ApplyLoanInfoMapper.java
View file @
c541232b
...
@@ -66,4 +66,6 @@ public interface ApplyLoanInfoMapper {
...
@@ -66,4 +66,6 @@ public interface ApplyLoanInfoMapper {
List
<
ApplyLoanInfoZhuDai
>
findApplyLoanZhuDai
(
BaiHangTimeRecord
timeRecord
);
List
<
ApplyLoanInfoZhuDai
>
findApplyLoanZhuDai
(
BaiHangTimeRecord
timeRecord
);
ApplyLoanInfoZhuDai
findApplyLoanInfoZhuDaiOfLately
(
String
applyId
);
}
}
src/main/java/cn/quantgroup/report/mapper/baihang/LoanInfoMapper.java
View file @
c541232b
...
@@ -85,5 +85,6 @@ public interface LoanInfoMapper {
...
@@ -85,5 +85,6 @@ public interface LoanInfoMapper {
List
<
RepairDataOfLoanAccountExt
>
findRepairDataOfLoanAccountExt
(
String
loanApplicationHistoryId
);
List
<
RepairDataOfLoanAccountExt
>
findRepairDataOfLoanAccountExt
(
String
loanApplicationHistoryId
);
LoanInfoZhuDai
findLoanInfoZhuDaiOfLately
(
String
loanId
);
}
}
src/main/java/cn/quantgroup/report/service/baihang/BaiHangFileReportService.java
View file @
c541232b
...
@@ -21,7 +21,6 @@ import cn.quantgroup.report.service.http.IHttpService;
...
@@ -21,7 +21,6 @@ import cn.quantgroup.report.service.http.IHttpService;
import
cn.quantgroup.report.utils.DateUtils
;
import
cn.quantgroup.report.utils.DateUtils
;
import
cn.quantgroup.report.utils.IdUtils
;
import
cn.quantgroup.report.utils.IdUtils
;
import
cn.quantgroup.report.utils.SftpUtil
;
import
cn.quantgroup.report.utils.SftpUtil
;
import
cn.quantgroup.report.utils.StringUtil
;
import
cn.quantgroup.report.utils.dingtalk.DingTalk
;
import
cn.quantgroup.report.utils.dingtalk.DingTalk
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
...
@@ -571,26 +570,20 @@ public class BaiHangFileReportService {
...
@@ -571,26 +570,20 @@ public class BaiHangFileReportService {
repaymentLoanInfos
=
repaymentLoanInfoMapper
.
queryOverdueRecordOfD3
(
BaiHangTimeRecord
.
builder
().
startTime
(
startTime
).
endTime
(
endTime
).
loanStartTime
(
loanStartTime
).
loanEndTime
(
loanEndTime
).
linkPointTime
(
linkPointTime
).
build
());
repaymentLoanInfos
=
repaymentLoanInfoMapper
.
queryOverdueRecordOfD3
(
BaiHangTimeRecord
.
builder
().
startTime
(
startTime
).
endTime
(
endTime
).
loanStartTime
(
loanStartTime
).
loanEndTime
(
loanEndTime
).
linkPointTime
(
linkPointTime
).
build
());
log
.
info
(
"量化派助贷TO百行报送(D3)-逾期记录查询结束, startTime: {} , endTime: {} , 大小: {} , 耗时: {} "
,
startTime
,
endTime
,
repaymentLoanInfos
.
size
(),
(
queryStopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
log
.
info
(
"量化派助贷TO百行报送(D3)-逾期记录查询结束, startTime: {} , endTime: {} , 大小: {} , 耗时: {} "
,
startTime
,
endTime
,
repaymentLoanInfos
.
size
(),
(
queryStopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
AtomicInteger
atomicInteger
=
new
AtomicInteger
();
AtomicInteger
atomicInteger
=
new
AtomicInteger
();
String
id
=
""
;
String
id
=
""
,
nameForD3
=
null
;
for
(
int
i
=
0
;
i
<
repaymentLoanInfos
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
repaymentLoanInfos
.
size
();
i
++)
{
RepaymentInfoZhuDai
repaymentLoanInfo
=
repaymentLoanInfos
.
get
(
i
);
RepaymentInfoZhuDai
repaymentLoanInfo
=
repaymentLoanInfos
.
get
(
i
);
try
{
try
{
id
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
id
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
RepaymentInfoZhuDai
record
=
new
RepaymentInfoZhuDai
();
RepaymentInfoZhuDai
record
=
new
RepaymentInfoZhuDai
();
nameForD3
=
getNameForD3
(
repaymentLoanInfo
.
getLoanId
());
if
(
StringUtils
.
isNotBlank
(
nameForD3
))
{
repaymentLoanInfo
.
setName
(
nameForD3
);
}
BeanUtils
.
copyProperties
(
repaymentLoanInfo
,
record
);
BeanUtils
.
copyProperties
(
repaymentLoanInfo
,
record
);
record
.
setRecordId
(
id
);
record
.
setRecordId
(
id
);
recordList
.
add
(
record
);
recordList
.
add
(
record
);
repaymentLoanInfo
.
setReqID
(
id
);
repaymentLoanInfo
.
setReqID
(
id
);
if
(
StringUtil
.
getLenOfStr
(
repaymentLoanInfo
.
getName
())<=
1.0
)
{
log
.
error
(
"姓名 {} 格式有误,loanId {}"
,
repaymentLoanInfo
.
getName
(),
repaymentLoanInfo
.
getLoanId
());
List
<
ApplyLoanInfoZhuDai
>
zhuDaiLogList
=
applyLoanInfoZhuDaiMapper
.
findByApplyId
(
repaymentLoanInfo
.
getLoanId
());
if
(!
CollectionUtils
.
isEmpty
(
zhuDaiLogList
))
{
repaymentLoanInfo
.
setName
(
zhuDaiLogList
.
get
(
0
).
getName
());
log
.
info
(
"loanId {} , 姓名已更改为 {}"
,
repaymentLoanInfo
.
getLoanId
(),
repaymentLoanInfo
.
getName
());
}
else
{
log
.
error
(
"loanId {} , 姓名未更改"
,
repaymentLoanInfo
.
getLoanId
());
}
}
repaymentLoanInfo
.
setName
(
sensitiveFilter
(
repaymentLoanInfo
.
getName
()));
repaymentLoanInfo
.
setName
(
sensitiveFilter
(
repaymentLoanInfo
.
getName
()));
repaymentLoanInfo
.
setPid
(
sensitiveFilter
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setPid
(
sensitiveFilter
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setMobile
(
sensitiveFilter
(
repaymentLoanInfo
.
getMobile
()));
repaymentLoanInfo
.
setMobile
(
sensitiveFilter
(
repaymentLoanInfo
.
getMobile
()));
...
@@ -631,7 +624,7 @@ public class BaiHangFileReportService {
...
@@ -631,7 +624,7 @@ public class BaiHangFileReportService {
List
<
RepaymentInfoZhuDai
>
repaymentLoanInfos
=
new
ArrayList
<>(
D3_INITIAL_CAPACITY
),
tempRepaymentLoanInfos
=
null
,
recordList
=
new
ArrayList
<>(
D3_INITIAL_CAPACITY
);
List
<
RepaymentInfoZhuDai
>
repaymentLoanInfos
=
new
ArrayList
<>(
D3_INITIAL_CAPACITY
),
tempRepaymentLoanInfos
=
null
,
recordList
=
new
ArrayList
<>(
D3_INITIAL_CAPACITY
);
Date
stepEndDate
=
null
;
Date
stepEndDate
=
null
;
Integer
step
=
null
;
Integer
step
=
null
;
String
id
=
""
;
String
id
=
""
,
nameForD3
=
null
;
AtomicInteger
atomicInteger
=
new
AtomicInteger
();
AtomicInteger
atomicInteger
=
new
AtomicInteger
();
List
<
String
>
reportList
=
new
ArrayList
<>(
D3_INITIAL_CAPACITY
);
List
<
String
>
reportList
=
new
ArrayList
<>(
D3_INITIAL_CAPACITY
);
reportList
.
add
(
"#singleLoanRepayInfo"
);
reportList
.
add
(
"#singleLoanRepayInfo"
);
...
@@ -666,20 +659,14 @@ public class BaiHangFileReportService {
...
@@ -666,20 +659,14 @@ public class BaiHangFileReportService {
try
{
try
{
id
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
id
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
RepaymentInfoZhuDai
record
=
new
RepaymentInfoZhuDai
();
RepaymentInfoZhuDai
record
=
new
RepaymentInfoZhuDai
();
nameForD3
=
getNameForD3
(
repaymentLoanInfo
.
getLoanId
());
if
(
StringUtils
.
isNotBlank
(
nameForD3
))
{
repaymentLoanInfo
.
setName
(
nameForD3
);
}
BeanUtils
.
copyProperties
(
repaymentLoanInfo
,
record
);
BeanUtils
.
copyProperties
(
repaymentLoanInfo
,
record
);
record
.
setRecordId
(
id
);
record
.
setRecordId
(
id
);
recordList
.
add
(
record
);
recordList
.
add
(
record
);
repaymentLoanInfo
.
setReqID
(
id
);
repaymentLoanInfo
.
setReqID
(
id
);
if
(
StringUtil
.
getLenOfStr
(
repaymentLoanInfo
.
getName
())<=
1.0
)
{
log
.
error
(
"姓名 {} 格式有误,loanId {}"
,
repaymentLoanInfo
.
getName
(),
repaymentLoanInfo
.
getLoanId
());
List
<
ApplyLoanInfoZhuDai
>
zhuDaiLogList
=
applyLoanInfoZhuDaiMapper
.
findByApplyId
(
repaymentLoanInfo
.
getLoanId
());
if
(!
CollectionUtils
.
isEmpty
(
zhuDaiLogList
))
{
repaymentLoanInfo
.
setName
(
zhuDaiLogList
.
get
(
0
).
getName
());
log
.
info
(
"loanId {} , 姓名已更改为 {}"
,
repaymentLoanInfo
.
getLoanId
(),
repaymentLoanInfo
.
getName
());
}
else
{
log
.
error
(
"loanId {} , 姓名未更改"
,
repaymentLoanInfo
.
getLoanId
());
}
}
repaymentLoanInfo
.
setName
(
sensitiveFilter
(
repaymentLoanInfo
.
getName
()));
repaymentLoanInfo
.
setName
(
sensitiveFilter
(
repaymentLoanInfo
.
getName
()));
repaymentLoanInfo
.
setPid
(
sensitiveFilter
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setPid
(
sensitiveFilter
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setMobile
(
sensitiveFilter
(
repaymentLoanInfo
.
getMobile
()));
repaymentLoanInfo
.
setMobile
(
sensitiveFilter
(
repaymentLoanInfo
.
getMobile
()));
...
@@ -728,7 +715,7 @@ public class BaiHangFileReportService {
...
@@ -728,7 +715,7 @@ public class BaiHangFileReportService {
repaymentLoanInfos
=
repaymentLoanInfoMapper
.
queryRepayMentRecordOfD3
(
BaiHangTimeRecord
.
builder
().
startTime
(
startTime
).
endTime
(
endTime
).
loanStartTime
(
loanStartTime
).
loanEndTime
(
loanEndTime
).
linkPointTime
(
linkPointTime
).
build
());
repaymentLoanInfos
=
repaymentLoanInfoMapper
.
queryRepayMentRecordOfD3
(
BaiHangTimeRecord
.
builder
().
startTime
(
startTime
).
endTime
(
endTime
).
loanStartTime
(
loanStartTime
).
loanEndTime
(
loanEndTime
).
linkPointTime
(
linkPointTime
).
build
());
log
.
info
(
"量化派助贷TO百行报送(D3)-还款记录查询结束, startTime: {} , endTime: {} , 大小: {} , 耗时: {} "
,
startTime
,
endTime
,
repaymentLoanInfos
.
size
(),
(
queryStopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
log
.
info
(
"量化派助贷TO百行报送(D3)-还款记录查询结束, startTime: {} , endTime: {} , 大小: {} , 耗时: {} "
,
startTime
,
endTime
,
repaymentLoanInfos
.
size
(),
(
queryStopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
AtomicInteger
atomicInteger
=
new
AtomicInteger
();
AtomicInteger
atomicInteger
=
new
AtomicInteger
();
String
id
=
""
;
String
id
=
""
,
nameForD3
=
null
;
for
(
int
i
=
0
;
i
<
repaymentLoanInfos
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
repaymentLoanInfos
.
size
();
i
++)
{
RepaymentInfoZhuDai
repaymentLoanInfo
=
repaymentLoanInfos
.
get
(
i
);
RepaymentInfoZhuDai
repaymentLoanInfo
=
repaymentLoanInfos
.
get
(
i
);
try
{
try
{
...
@@ -741,20 +728,14 @@ public class BaiHangFileReportService {
...
@@ -741,20 +728,14 @@ public class BaiHangFileReportService {
}
}
id
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
id
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
RepaymentInfoZhuDai
record
=
new
RepaymentInfoZhuDai
();
RepaymentInfoZhuDai
record
=
new
RepaymentInfoZhuDai
();
nameForD3
=
getNameForD3
(
repaymentLoanInfo
.
getLoanId
());
if
(
StringUtils
.
isNotBlank
(
nameForD3
))
{
repaymentLoanInfo
.
setName
(
nameForD3
);
}
BeanUtils
.
copyProperties
(
repaymentLoanInfo
,
record
);
BeanUtils
.
copyProperties
(
repaymentLoanInfo
,
record
);
record
.
setRecordId
(
id
);
record
.
setRecordId
(
id
);
recordList
.
add
(
record
);
recordList
.
add
(
record
);
repaymentLoanInfo
.
setReqID
(
id
);
repaymentLoanInfo
.
setReqID
(
id
);
if
(
StringUtil
.
getLenOfStr
(
repaymentLoanInfo
.
getName
())<=
1.0
)
{
log
.
error
(
"姓名 {} 格式有误,loanId {}"
,
repaymentLoanInfo
.
getName
(),
repaymentLoanInfo
.
getLoanId
());
List
<
ApplyLoanInfoZhuDai
>
zhuDaiLogList
=
applyLoanInfoZhuDaiMapper
.
findByApplyId
(
repaymentLoanInfo
.
getLoanId
());
if
(!
CollectionUtils
.
isEmpty
(
zhuDaiLogList
))
{
repaymentLoanInfo
.
setName
(
zhuDaiLogList
.
get
(
0
).
getName
());
log
.
info
(
"loanId {} , 姓名已更改为 {}"
,
repaymentLoanInfo
.
getLoanId
(),
repaymentLoanInfo
.
getName
());
}
else
{
log
.
error
(
"loanId {} , 姓名未更改"
,
repaymentLoanInfo
.
getLoanId
());
}
}
repaymentLoanInfo
.
setName
(
sensitiveFilter
(
repaymentLoanInfo
.
getName
()));
repaymentLoanInfo
.
setName
(
sensitiveFilter
(
repaymentLoanInfo
.
getName
()));
repaymentLoanInfo
.
setPid
(
sensitiveFilter
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setPid
(
sensitiveFilter
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setMobile
(
sensitiveFilter
(
repaymentLoanInfo
.
getMobile
()));
repaymentLoanInfo
.
setMobile
(
sensitiveFilter
(
repaymentLoanInfo
.
getMobile
()));
...
@@ -1024,4 +1005,16 @@ public class BaiHangFileReportService {
...
@@ -1024,4 +1005,16 @@ public class BaiHangFileReportService {
return
headMark
;
return
headMark
;
}
}
private
String
getNameForD3
(
String
applyId
)
{
String
name
=
null
;
LoanInfoZhuDai
loanInfoZhuDaiOfLately
=
loanInfoMapper
.
findLoanInfoZhuDaiOfLately
(
applyId
);
if
(
Objects
.
nonNull
(
loanInfoZhuDaiOfLately
))
{
name
=
loanInfoZhuDaiOfLately
.
getName
();
}
else
{
ApplyLoanInfoZhuDai
applyLoanInfoZhuDaiOfLately
=
applyLoanInfoMapper
.
findApplyLoanInfoZhuDaiOfLately
(
applyId
);
name
=
Objects
.
nonNull
(
applyLoanInfoZhuDaiOfLately
)
?
applyLoanInfoZhuDaiOfLately
.
getName
()
:
null
;
}
return
name
;
}
}
}
src/main/resources/cn/quantgroup/report/mapper/baihang/ApplyLoanInfoMapper.xml
View file @
c541232b
...
@@ -246,5 +246,12 @@
...
@@ -246,5 +246,12 @@
</select>
</select>
<select
id=
"findApplyLoanInfoZhuDaiOfLately"
parameterType=
"java.lang.String"
resultType=
"cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai"
>
select *
from risk_datasource.apply_loan_info_zhudai
where apply_id = #{applyId,jdbcType=VARCHAR}
order by id desc limit 1
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/cn/quantgroup/report/mapper/baihang/LoanInfoMapper.xml
View file @
c541232b
...
@@ -460,4 +460,12 @@
...
@@ -460,4 +460,12 @@
where c.loan_id = #{loanApplicationHistoryId,jdbcType=VARCHAR}
where c.loan_id = #{loanApplicationHistoryId,jdbcType=VARCHAR}
</select>
</select>
<select
id=
"findLoanInfoZhuDaiOfLately"
parameterType=
"java.lang.String"
resultType=
"cn.quantgroup.report.domain.baihang.LoanInfoZhuDai"
>
select *
from risk_datasource.loan_info_zhudai
where loan_id = #{loanId,jdbcType=VARCHAR}
order by id desc limit 1
</select>
</mapper>
</mapper>
\ No newline at end of file
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