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
a5b78873
Commit
a5b78873
authored
Dec 29, 2019
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口报送bug
parent
d28b008f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
122 additions
and
124 deletions
+122
-124
BaiHangZhuDaiService.java
...antgroup/report/service/baihang/BaiHangZhuDaiService.java
+122
-124
No files found.
src/main/java/cn/quantgroup/report/service/baihang/BaiHangZhuDaiService.java
View file @
a5b78873
...
@@ -102,8 +102,6 @@ public class BaiHangZhuDaiService {
...
@@ -102,8 +102,6 @@ public class BaiHangZhuDaiService {
@Value
(
"${baihang.zhudai.password}"
)
@Value
(
"${baihang.zhudai.password}"
)
public
String
password
;
public
String
password
;
//private DateFormat df_uploadTs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Value
(
"${baihang.zhudai.cunliang.data.url}"
)
@Value
(
"${baihang.zhudai.cunliang.data.url}"
)
public
String
zl_file_path_name
;
// = "D:\\JavaTeam\\baihang\\cunLiang\\";存量数据整理目录
public
String
zl_file_path_name
;
// = "D:\\JavaTeam\\baihang\\cunLiang\\";存量数据整理目录
...
@@ -145,7 +143,6 @@ public class BaiHangZhuDaiService {
...
@@ -145,7 +143,6 @@ public class BaiHangZhuDaiService {
}catch(Exception e){
}catch(Exception e){
log.error("初始化测试环境百行报送-用户三要素脱敏字典异常", e);
log.error("初始化测试环境百行报送-用户三要素脱敏字典异常", e);
}*/
}*/
}
}
private
static
PublicKey
getBaihangZDPublickey
(){
private
static
PublicKey
getBaihangZDPublickey
(){
...
@@ -193,16 +190,18 @@ public class BaiHangZhuDaiService {
...
@@ -193,16 +190,18 @@ public class BaiHangZhuDaiService {
try
{
try
{
ApplyLoanInfoZhuDai
applyLoanInfo
=
applyLoanInfos
.
get
(
i
);
ApplyLoanInfoZhuDai
applyLoanInfo
=
applyLoanInfos
.
get
(
i
);
reqId_log
=
applyLoanInfo
.
getReqID
();
reqId_log
=
applyLoanInfo
.
getReqID
();
applyLoanInfo
.
setName
(
interfaceUploadClient
(
applyLoanInfo
.
getName
()));
applyLoanInfo
.
setMobile
(
interfaceUploadClient
(
applyLoanInfo
.
getMobile
()));
applyLoanInfo
.
setPid
(
interfaceUploadClient
(
applyLoanInfo
.
getPid
()));
//邮箱有错误的就不传
//邮箱有错误的就不传
if
(!
TuoMinUtils
.
checkEmail
(
applyLoanInfo
.
getEmailAddress
())){
if
(!
TuoMinUtils
.
checkEmail
(
applyLoanInfo
.
getEmailAddress
())){
applyLoanInfo
.
setEmailAddress
(
null
);
applyLoanInfo
.
setEmailAddress
(
null
);
}
}
String
logJson
=
JSON
.
toJSONString
(
applyLoanInfo
);
applyLoanInfo
.
setName
(
interfaceUploadClient
(
applyLoanInfo
.
getName
()));
applyLoanInfo
.
setMobile
(
interfaceUploadClient
(
applyLoanInfo
.
getMobile
()));
applyLoanInfo
.
setPid
(
interfaceUploadClient
(
applyLoanInfo
.
getPid
()));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangApplyLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
applyLoanInfo
));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangApplyLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
applyLoanInfo
));
log
.
info
(
"助贷贷款申请A1报送结果, param: {} , resultStr: {} "
,
JSON
.
toJSONString
(
applyLoanInfo
)
,
resultStr
);
log
.
info
(
"助贷贷款申请A1报送结果, param: {} , resultStr: {} "
,
logJson
,
resultStr
);
//if (Objects.isNull(resultStr) || !(resultStr.contains("queryHistory") && resultStr.contains("nonRevolvingLoan") && resultStr.contains("revolvingLoan"))) {
//if (Objects.isNull(resultStr) || !(resultStr.contains("queryHistory") && resultStr.contains("nonRevolvingLoan") && resultStr.contains("revolvingLoan"))) {
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: {} , applyId: {} "
,
reqId_log
,
applyLoanInfo
.
getApplyId
());
log
.
info
(
"量化派助贷TO百行报送-贷款申请返回结果不正确, reqId_log: {} , applyId: {} "
,
reqId_log
,
applyLoanInfo
.
getApplyId
());
...
@@ -308,12 +307,15 @@ public class BaiHangZhuDaiService {
...
@@ -308,12 +307,15 @@ public class BaiHangZhuDaiService {
FinTechAgencyBusinessZhuDai
finTechAgencyBusiness
=
JSONObject
.
parseObject
(
jsonStr
,
FinTechAgencyBusinessZhuDai
.
class
);
FinTechAgencyBusinessZhuDai
finTechAgencyBusiness
=
JSONObject
.
parseObject
(
jsonStr
,
FinTechAgencyBusinessZhuDai
.
class
);
loanInfo
.
setFinTechAgencyBusiness
(
finTechAgencyBusiness
);
loanInfo
.
setFinTechAgencyBusiness
(
finTechAgencyBusiness
);
String
logJson
=
JSON
.
toJSONString
(
loanInfo
);
loanInfo
.
setName
(
interfaceUploadClient
(
loanInfo
.
getName
()));
loanInfo
.
setName
(
interfaceUploadClient
(
loanInfo
.
getName
()));
loanInfo
.
setPid
(
interfaceUploadClient
(
loanInfo
.
getPid
()));
loanInfo
.
setPid
(
interfaceUploadClient
(
loanInfo
.
getPid
()));
loanInfo
.
setMobile
(
interfaceUploadClient
(
loanInfo
.
getMobile
()));
loanInfo
.
setMobile
(
interfaceUploadClient
(
loanInfo
.
getMobile
()));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
loanInfo
));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
loanInfo
));
log
.
info
(
"助贷放款用户报送结果, param: {} , resultStr: {} "
,
JSON
.
toJSONString
(
loanInfo
),
resultStr
);
log
.
info
(
"助贷放款用户报送结果, param: {} , resultStr: {} "
,
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: {} "
,
reqId_log
,
id
,
loanInfo
.
getLoanId
(),
JSON
.
toJSONString
(
loanInfo
));
log
.
info
(
"量化派助贷TO百行报送-放款返回结果不正确, reqId_log: {} , recordId: {} , loanId: {} , bean: {} "
,
reqId_log
,
id
,
loanInfo
.
getLoanId
(),
JSON
.
toJSONString
(
loanInfo
));
loanInfoDbMapper
.
updateCurrentRecordEnableFalce
(
BaiHangUpDateRecord
.
builder
().
enable
(
"0"
).
recordId
(
id
).
build
());
loanInfoDbMapper
.
updateCurrentRecordEnableFalce
(
BaiHangUpDateRecord
.
builder
().
enable
(
"0"
).
recordId
(
id
).
build
());
...
@@ -408,12 +410,14 @@ public class BaiHangZhuDaiService {
...
@@ -408,12 +410,14 @@ public class BaiHangZhuDaiService {
repaymentLoanInfo
.
setRecordId
(
null
);
repaymentLoanInfo
.
setRecordId
(
null
);
repaymentLoanInfo
.
setReqID
(
id
);
repaymentLoanInfo
.
setReqID
(
id
);
String
logJson
=
JSON
.
toJSONString
(
repaymentLoanInfo
);
repaymentLoanInfo
.
setPid
(
interfaceUploadClient
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setPid
(
interfaceUploadClient
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setName
(
interfaceUploadClient
(
repaymentLoanInfo
.
getName
()));
repaymentLoanInfo
.
setName
(
interfaceUploadClient
(
repaymentLoanInfo
.
getName
()));
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: {} "
,
JSON
.
toJSONString
(
repaymentLoanInfo
)
,
resultStr
);
log
.
info
(
"助贷还款用户报送结果, param: {} , resultStr: {} "
,
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
());
...
@@ -464,29 +468,29 @@ public class BaiHangZhuDaiService {
...
@@ -464,29 +468,29 @@ public class BaiHangZhuDaiService {
handApplys
=
paramJsonStr
;
handApplys
=
paramJsonStr
;
}
}
}
}
//log.info("百行征信助贷模式报送贷款申请数据, isReadFile: {} , handApplys: {} ", isReadFile, JSON.toJSONString(handApplys));
for
(
int
i
=
0
;
i
<
handApplys
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
handApplys
.
size
();
i
++){
//
try {
try
{
ApplyLoanInfoZhuDai
applyInfo
=
new
Gson
().
fromJson
(
handApplys
.
get
(
i
),
new
TypeToken
<
ApplyLoanInfoZhuDai
>(){}.
getType
());
ApplyLoanInfoZhuDai
applyInfo
=
new
Gson
().
fromJson
(
handApplys
.
get
(
i
),
new
TypeToken
<
ApplyLoanInfoZhuDai
>(){}.
getType
());
//邮箱有错误的就不传
if
(!
TuoMinUtils
.
checkEmail
(
applyInfo
.
getEmailAddress
())){
applyInfo
.
setEmailAddress
(
null
);
}
log
.
info
(
"众信利民助贷模式TO百行手动报送申请单个数据, {}"
,
JSON
.
toJSONString
(
applyInfo
));
log
.
info
(
"众信利民助贷模式TO百行手动报送申请单个数据, {}"
,
JSON
.
toJSONString
(
applyInfo
));
String
logJson
=
JSON
.
toJSONString
(
applyInfo
);
applyInfo
.
setName
(
interfaceUploadClient
(
applyInfo
.
getName
()));
applyInfo
.
setName
(
interfaceUploadClient
(
applyInfo
.
getName
()));
applyInfo
.
setMobile
(
interfaceUploadClient
(
applyInfo
.
getMobile
()));
applyInfo
.
setMobile
(
interfaceUploadClient
(
applyInfo
.
getMobile
()));
applyInfo
.
setPid
(
interfaceUploadClient
(
applyInfo
.
getPid
()));
applyInfo
.
setPid
(
interfaceUploadClient
(
applyInfo
.
getPid
()));
//邮箱有错误的就不传
if
(!
TuoMinUtils
.
checkEmail
(
applyInfo
.
getEmailAddress
())){
applyInfo
.
setEmailAddress
(
null
);
}
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangApplyLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
applyInfo
));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangApplyLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
applyInfo
));
/*if (Objects.isNull(resultStr) || !(resultStr.contains("queryHistory") && resultStr.contains("nonRevolvingLoan") && resultStr.contains("revolvingLoan"))) {
/*if (Objects.isNull(resultStr) || !(resultStr.contains("queryHistory") && resultStr.contains("nonRevolvingLoan") && resultStr.contains("revolvingLoan"))) {
log.info("量化派助贷TO百行报送-贷款申请返回结果不正确, loanId: {} ", applyInfo.getLoanId());
log.info("量化派助贷TO百行报送-贷款申请返回结果不正确, loanId: {} ", applyInfo.getLoanId());
}*/
}*/
log
.
info
(
"众信利民助贷模式TO百行手动报送贷款申请记录
json: {} , result: {} "
,
JSON
.
toJSONString
(
applyInfo
)
,
resultStr
);
log
.
info
(
"众信利民助贷模式TO百行手动报送贷款申请记录
bean: {} , result: {} "
,
logJson
,
resultStr
);
/*
} catch (Exception e) {
}
catch
(
Exception
e
)
{
log.error("百行征信助贷模式手动报送贷款申请记录异常
"
, e);
log
.
error
(
"百行征信助贷模式手动报送贷款申请记录异常
, params: {} "
,
handApplys
.
get
(
i
)
,
e
);
}
*/
}
}
}
log
.
info
(
"众信利民助贷模式TO百行手动报送贷款申请结束, 大小: {} , 耗时: {} "
,
handApplys
.
size
(),
((
sendWatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
));
log
.
info
(
"众信利民助贷模式TO百行手动报送贷款申请结束, 大小: {} , 耗时: {} "
,
handApplys
.
size
(),
((
sendWatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
));
}
}
...
@@ -513,11 +517,11 @@ public class BaiHangZhuDaiService {
...
@@ -513,11 +517,11 @@ public class BaiHangZhuDaiService {
}
}
}
}
//log.info("众信利民助贷模式TO百行手动报送送放款数据, {}", JSON.toJSONString(handLoanInfos));
for
(
int
i
=
0
;
i
<
handLoanInfos
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
handLoanInfos
.
size
();
i
++){
LoanInfoZhuDai
loanInfozd_tmp
=
new
Gson
().
fromJson
(
handLoanInfos
.
get
(
i
),
new
TypeToken
<
LoanInfoZhuDai
>(){}.
getType
());
try
{
log
.
info
(
"众信利民助贷模式TO百行手动报送放款单个数据, {}"
,
JSON
.
toJSONString
(
loanInfozd_tmp
));
LoanInfoZhuDai
loanInfozd_tmp
=
new
Gson
().
fromJson
(
handLoanInfos
.
get
(
i
),
new
TypeToken
<
LoanInfoZhuDai
>(){}.
getType
());
String
loanInfoReqId
=
loanInfozd_tmp
.
getReqID
();
log
.
info
(
"众信利民助贷模式TO百行手动报送放款单个数据, {}"
,
JSON
.
toJSONString
(
loanInfozd_tmp
));
String
loanInfoReqId
=
loanInfozd_tmp
.
getReqID
();
/*if(loanInfozd_tmp.getTotalTerm() > 1){
/*if(loanInfozd_tmp.getTotalTerm() > 1){
List<String> targetRepaymentDayList = loanInfoMapper.findTargetRepaymentDayList(loanInfoReqId);
List<String> targetRepaymentDayList = loanInfoMapper.findTargetRepaymentDayList(loanInfoReqId);
...
@@ -526,56 +530,57 @@ public class BaiHangZhuDaiService {
...
@@ -526,56 +530,57 @@ public class BaiHangZhuDaiService {
}else{
}else{
System.err.println("比较还款总期数&账单日列表totalTerm="+loanInfozd_tmp.getTotalTerm());
System.err.println("比较还款总期数&账单日列表totalTerm="+loanInfozd_tmp.getTotalTerm());
}*/
}*/
List
<
String
>
targetRepaymentDayList
=
loanInfoMapper
.
findTargetRepaymentDayList
(
loanInfoReqId
);
List
<
String
>
targetRepaymentDayList
=
loanInfoMapper
.
findTargetRepaymentDayList
(
loanInfoReqId
);
if
(
targetRepaymentDayList
!=
null
&&
targetRepaymentDayList
.
size
()>
0
){
if
(
targetRepaymentDayList
!=
null
&&
targetRepaymentDayList
.
size
()>
0
){
loanInfozd_tmp
.
setTargetRepayDateList
(
String
.
join
(
","
,
targetRepaymentDayList
));
loanInfozd_tmp
.
setTargetRepayDateList
(
String
.
join
(
","
,
targetRepaymentDayList
));
//log.info("比较还款总期数&账单日列表totalTerm="+loanInfozd_tmp.getTotalTerm()+",targetRepaymentDayList size="+targetRepaymentDayList.size());
//log.info("比较还款总期数&账单日列表totalTerm="+loanInfozd_tmp.getTotalTerm()+",targetRepaymentDayList size="+targetRepaymentDayList.size());
}
else
{
}
else
{
log
.
warn
(
"比较还款总期数&账单日列表totalTerm="
+
loanInfozd_tmp
.
getTotalTerm
()+
",targetRepaymentDayList is null."
);
log
.
warn
(
"比较还款总期数&账单日列表totalTerm="
+
loanInfozd_tmp
.
getTotalTerm
()+
",targetRepaymentDayList is null."
);
}
}
String
relationID
=
loanInfozd_tmp
.
getRelationID
();
String
relationID
=
loanInfozd_tmp
.
getRelationID
();
if
(
relationID
!=
null
){
if
(
relationID
!=
null
){
if
(
relationID
.
length
()>
36
){
//长度[1,36]
if
(
relationID
.
length
()>
36
){
//长度[1,36]
//lhp_1911049771615765816566b49a2db1c429
//lhp_1911049771615765816566b49a2db1c429
if
(
relationID
.
startsWith
(
"lhp_"
)){
if
(
relationID
.
startsWith
(
"lhp_"
)){
String
tmp
=
relationID
.
substring
(
4
,
relationID
.
length
());
String
tmp
=
relationID
.
substring
(
4
,
relationID
.
length
());
if
(
tmp
.
length
()>
35
){
if
(
tmp
.
length
()>
35
){
//lhp_1909279744718808613622e008da4c110000
//lhp_1909279744718808613622e008da4c110000
loanInfozd_tmp
.
setRelationID
(
"H"
+
tmp
.
substring
(
0
,
35
));
loanInfozd_tmp
.
setRelationID
(
"H"
+
tmp
.
substring
(
0
,
35
));
}
else
{
loanInfozd_tmp
.
setRelationID
(
"L"
+
tmp
);
}
}
else
{
}
else
{
loanInfozd_tmp
.
setRelationID
(
"L"
+
tmp
);
log
.
warn
(
"众信利民助贷模式TO百行手动报送-数据不正确, 发现其他类型的relationID并且长度大于36, relationID: {} , loanInfoReqId: {} "
,
relationID
,
loanInfoReqId
);
//continue;
loanInfozd_tmp
.
setRelationID
(
"X"
+
relationID
.
substring
(
0
,
35
));
}
}
}
else
{
log
.
warn
(
"众信利民助贷模式TO百行手动报送-数据不正确, 发现其他类型的relationID并且长度大于36, relationID: {} , loanInfoReqId: {} "
,
relationID
,
loanInfoReqId
);
//continue;
loanInfozd_tmp
.
setRelationID
(
"X"
+
relationID
.
substring
(
0
,
35
));
}
}
}
}
}
try
{
try
{
loanInfozd_tmp
.
setRecordId
(
loanInfozd_tmp
.
getReqID
());
loanInfozd_tmp
.
setRecordId
(
loanInfozd_tmp
.
getReqID
());
loanInfoDbMapper
.
saveLoanInfoRecordLog
(
loanInfozd_tmp
);
loanInfoDbMapper
.
saveLoanInfoRecordLog
(
loanInfozd_tmp
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"众信利民助贷模式TO百行手动报送-放款申请保存记录失败, loanInfoReqId: {} , JSON: {} "
,
loanInfoReqId
,
JSON
.
toJSONString
(
loanInfozd_tmp
),
e
);
log
.
error
(
"众信利民助贷模式TO百行手动报送-放款申请保存记录失败, loanInfoReqId: {} , JSON: {} "
,
loanInfoReqId
,
JSON
.
toJSONString
(
loanInfozd_tmp
),
e
);
}
}
loanInfozd_tmp
.
setRecordId
(
null
);
loanInfozd_tmp
.
setRecordId
(
null
);
String
jsonStr
=
JSONObject
.
toJSONString
(
loanInfozd_tmp
);
String
jsonStr
=
JSONObject
.
toJSONString
(
loanInfozd_tmp
);
LoanInfoZhuDaiVo
loanInfo
=
JSONObject
.
parseObject
(
jsonStr
,
LoanInfoZhuDaiVo
.
class
);
LoanInfoZhuDaiVo
loanInfo
=
JSONObject
.
parseObject
(
jsonStr
,
LoanInfoZhuDaiVo
.
class
);
FinTechAgencyBusinessZhuDai
finTechAgencyBusiness
=
JSONObject
.
parseObject
(
jsonStr
,
FinTechAgencyBusinessZhuDai
.
class
);
FinTechAgencyBusinessZhuDai
finTechAgencyBusiness
=
JSONObject
.
parseObject
(
jsonStr
,
FinTechAgencyBusinessZhuDai
.
class
);
loanInfo
.
setFinTechAgencyBusiness
(
finTechAgencyBusiness
);
loanInfo
.
setFinTechAgencyBusiness
(
finTechAgencyBusiness
);
String
logJson
=
JSON
.
toJSONString
(
loanInfo
);
loanInfo
.
setMobile
(
interfaceUploadClient
(
loanInfo
.
getMobile
()));
loanInfo
.
setMobile
(
interfaceUploadClient
(
loanInfo
.
getMobile
()));
loanInfo
.
setName
(
interfaceUploadClient
(
loanInfo
.
getName
()));
loanInfo
.
setName
(
interfaceUploadClient
(
loanInfo
.
getName
()));
loanInfo
.
setPid
(
interfaceUploadClient
(
loanInfo
.
getPid
()));
loanInfo
.
setPid
(
interfaceUploadClient
(
loanInfo
.
getPid
()));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
loanInfo
));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
loanInfo
));
log
.
info
(
"众信利民助贷模式TO百行手动报送放款记录 loanInfoReqId: {} , loanId: {} , bean: {} , result: {} "
,
loanInfoReqId
,
loanInfo
.
getLoanId
(),
JSON
.
toJSONString
(
loanInfo
)
,
resultStr
);
log
.
info
(
"众信利民助贷模式TO百行手动报送放款记录 loanInfoReqId: {} , loanId: {} , bean: {} , result: {} "
,
loanInfoReqId
,
loanInfo
.
getLoanId
(),
logJson
,
resultStr
);
//存量测试手动整理
//存量测试手动整理
/*loanInfozd_tmp.setRecordId(null);
/*loanInfozd_tmp.setRecordId(null);
String jsonStr = JSONObject.toJSONString(loanInfozd_tmp);
String jsonStr = JSONObject.toJSONString(loanInfozd_tmp);
LoanInfoZhuDaiVo loanInfoZhuDaiVo = JSONObject.parseObject(jsonStr, LoanInfoZhuDaiVo.class);
LoanInfoZhuDaiVo loanInfoZhuDaiVo = JSONObject.parseObject(jsonStr, LoanInfoZhuDaiVo.class);
...
@@ -591,6 +596,9 @@ public class BaiHangZhuDaiService {
...
@@ -591,6 +596,9 @@ public class BaiHangZhuDaiService {
} catch (Exception e) {
} catch (Exception e) {
log.error("放款存量数据处理异常, startTime: {} , endTime: {} , recordId: {} , loanId: {} ",null, null, id, loanInfoZhuDaiVo.getLoanId(), e);
log.error("放款存量数据处理异常, startTime: {} , endTime: {} , recordId: {} , loanId: {} ",null, null, id, loanInfoZhuDaiVo.getLoanId(), e);
}*/
}*/
}
catch
(
Exception
e
){
log
.
error
(
"百行征信助贷模式手动报送放款记录异常, params: {} "
,
handLoanInfos
.
get
(
i
),
e
);
}
}
}
log
.
info
(
"众信利民助贷模式TO百行手动报送放款记录结束, 大小: {} , 耗时: {} "
,
handLoanInfos
.
size
(),
((
sendWatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
));
log
.
info
(
"众信利民助贷模式TO百行手动报送放款记录结束, 大小: {} , 耗时: {} "
,
handLoanInfos
.
size
(),
((
sendWatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
));
}
}
...
@@ -611,59 +619,39 @@ public class BaiHangZhuDaiService {
...
@@ -611,59 +619,39 @@ public class BaiHangZhuDaiService {
}
}
for
(
int
i
=
0
;
i
<
handLoanInfos
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
handLoanInfos
.
size
();
i
++){
LoanInfoZhuDai
loanInfozd_tmp
=
new
Gson
().
fromJson
(
handLoanInfos
.
get
(
i
),
new
TypeToken
<
LoanInfoZhuDai
>(){}.
getType
());
log
.
info
(
"众信利民助贷模式TO百行手动报送放款单个数据, {}"
,
JSON
.
toJSONString
(
loanInfozd_tmp
));
String
loanInfoReqId
=
loanInfozd_tmp
.
getReqID
();
/*List<String> targetRepaymentDayList = loanInfoMapper.findTargetRepaymentDayList(loanInfoReqId);
if(targetRepaymentDayList!=null && targetRepaymentDayList.size()>0){
loanInfozd_tmp.setTargetRepayDateList(String.join(",", targetRepaymentDayList));
//log.info("比较还款总期数&账单日列表totalTerm="+loanInfozd_tmp.getTotalTerm()+",targetRepaymentDayList size="+targetRepaymentDayList.size());
}else{
log.warn("比较还款总期数&账单日列表totalTerm="+loanInfozd_tmp.getTotalTerm()+",targetRepaymentDayList is null.");
}*/
/*String relationID = loanInfozd_tmp.getRelationID();
if(relationID!=null){
if(relationID.length()>36){ //长度[1,36]
//lhp_1911049771615765816566b49a2db1c429
if(relationID.startsWith("lhp_")){
String tmp = relationID.substring(4,relationID.length());
if(tmp.length()>35){
//lhp_1909279744718808613622e008da4c110000
loanInfozd_tmp.setRelationID("H"+tmp.substring(0,35));
}else{
loanInfozd_tmp.setRelationID("L"+tmp);
}
}else{
log.warn("众信利民助贷模式TO百行手动报送-数据不正确, 发现其他类型的relationID并且长度大于36, relationID: {} , loanInfoReqId: {} ", relationID, loanInfoReqId);
//continue;
loanInfozd_tmp.setRelationID("X"+relationID.substring(0,35));
}
}
}*/
try
{
try
{
LoanInfoZhuDai
loanInfozd_tmp
=
new
Gson
().
fromJson
(
handLoanInfos
.
get
(
i
),
new
TypeToken
<
LoanInfoZhuDai
>(){}.
getType
());
log
.
info
(
"众信利民助贷模式TO百行手动报送放款单个数据, {}"
,
JSON
.
toJSONString
(
loanInfozd_tmp
));
String
loanInfoReqId
=
loanInfozd_tmp
.
getReqID
();
if
(
loanInfozd_tmp
.
getRecordId
()==
null
){
if
(
loanInfozd_tmp
.
getRecordId
()==
null
){
loanInfozd_tmp
.
setRecordId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
loanInfozd_tmp
.
setRecordId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
}
}
loanInfoDbMapper
.
saveLoanInfoRecordLog
(
loanInfozd_tmp
);
}
catch
(
Exception
e
){
log
.
error
(
"众信利民助贷模式TO百行手动报送-放款申请保存记录失败, loanInfoReqId: {} , JSON: {} "
,
loanInfoReqId
,
JSON
.
toJSONString
(
loanInfozd_tmp
),
e
);
}
loanInfozd_tmp
.
setRecordId
(
null
);
String
jsonStr
=
JSONObject
.
toJSONString
(
loanInfozd_tmp
);
try
{
LoanInfoZhuDaiVo
loanInfo
=
JSONObject
.
parseObject
(
jsonStr
,
LoanInfoZhuDaiVo
.
class
);
loanInfoDbMapper
.
saveLoanInfoRecordLog
(
loanInfozd_tmp
);
FinTechAgencyBusinessZhuDai
finTechAgencyBusiness
=
JSONObject
.
parseObject
(
jsonStr
,
FinTechAgencyBusinessZhuDai
.
class
);
}
catch
(
Exception
e
){
loanInfo
.
setFinTechAgencyBusiness
(
finTechAgencyBusiness
);
log
.
error
(
"众信利民助贷模式TO百行手动报送-放款申请保存记录失败, loanInfoReqId: {} , JSON: {} "
,
loanInfoReqId
,
JSON
.
toJSONString
(
loanInfozd_tmp
),
e
);
}
loanInfozd_tmp
.
setReqID
(
loanInfozd_tmp
.
getRecordId
());
loanInfozd_tmp
.
setRecordId
(
null
);
String
jsonStr
=
JSONObject
.
toJSONString
(
loanInfozd_tmp
);
LoanInfoZhuDaiVo
loanInfo
=
JSONObject
.
parseObject
(
jsonStr
,
LoanInfoZhuDaiVo
.
class
);
FinTechAgencyBusinessZhuDai
finTechAgencyBusiness
=
JSONObject
.
parseObject
(
jsonStr
,
FinTechAgencyBusinessZhuDai
.
class
);
loanInfo
.
setFinTechAgencyBusiness
(
finTechAgencyBusiness
);
String
logJson
=
JSON
.
toJSONString
(
loanInfo
);
loanInfo
.
setMobile
(
interfaceUploadClient
(
loanInfo
.
getMobile
()));
loanInfo
.
setName
(
interfaceUploadClient
(
loanInfo
.
getName
()));
loanInfo
.
setPid
(
interfaceUploadClient
(
loanInfo
.
getPid
()));
loanInfo
.
setMobile
(
interfaceUploadClient
(
loanInfo
.
getMobile
()));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
loanInfo
));
loanInfo
.
setName
(
interfaceUploadClient
(
loanInfo
.
getName
()));
log
.
info
(
"众信利民助贷模式TO百行手动报送放款记录 loanInfoReqId: {} , loanId: {} , bean: {} , result: {} "
,
loanInfoReqId
,
loanInfo
.
getLoanId
(),
logJson
,
resultStr
);
loanInfo
.
setPid
(
interfaceUploadClient
(
loanInfo
.
getPid
()));
String
resultStr
=
iHttpService
.
postBaiHang
(
baiHangLoanInfoUrl
,
getHeader
(),
JSON
.
toJSONString
(
loanInfo
));
}
catch
(
Exception
e
){
log
.
info
(
"众信利民助贷模式TO百行手动报送放款记录 loanInfoReqId: {} , loanId: {} , bean: {} , result: {} "
,
loanInfoReqId
,
loanInfo
.
getLoanId
(),
JSON
.
toJSONString
(
loanInfo
),
resultStr
);
log
.
error
(
"百行征信助贷模式手动报送放款记录异常, params: {} "
,
handLoanInfos
.
get
(
i
),
e
);
}
}
}
log
.
info
(
"众信利民助贷模式TO百行手动报送放款记录结束, 大小: {} , 耗时: {} "
,
handLoanInfos
.
size
(),
((
sendWatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
));
log
.
info
(
"众信利民助贷模式TO百行手动报送放款记录结束, 大小: {} , 耗时: {} "
,
handLoanInfos
.
size
(),
((
sendWatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
));
}
}
...
@@ -689,9 +677,9 @@ public class BaiHangZhuDaiService {
...
@@ -689,9 +677,9 @@ public class BaiHangZhuDaiService {
}
}
}
}
//
try {
//
log.info("众信利民助贷模式TO百行报送还款数据, {}", JSON.toJSONString(repaymentLoanInfos));
log
.
info
(
"众信利民助贷模式TO百行报送还款数据, {}"
,
JSON
.
toJSONString
(
repaymentLoanInfos
));
for
(
int
i
=
0
;
i
<
repaymentLoanInfos
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
repaymentLoanInfos
.
size
();
i
++)
{
try
{
RepaymentInfoZhuDai
repaymentLoanInfo
=
new
Gson
().
fromJson
(
repaymentLoanInfos
.
get
(
i
),
new
TypeToken
<
RepaymentInfoZhuDai
>(){}.
getType
());
RepaymentInfoZhuDai
repaymentLoanInfo
=
new
Gson
().
fromJson
(
repaymentLoanInfos
.
get
(
i
),
new
TypeToken
<
RepaymentInfoZhuDai
>(){}.
getType
());
log
.
info
(
"众信利民助贷模式TO百行手动报送还款数据单个数据, {}"
,
JSON
.
toJSONString
(
repaymentLoanInfo
));
log
.
info
(
"众信利民助贷模式TO百行手动报送还款数据单个数据, {}"
,
JSON
.
toJSONString
(
repaymentLoanInfo
));
...
@@ -704,18 +692,21 @@ public class BaiHangZhuDaiService {
...
@@ -704,18 +692,21 @@ public class BaiHangZhuDaiService {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"众信利民助贷模式TO百行手动报送还款保存记录异常, reqId_log: {} , loanId: {} , termNo: {} , JSON: {} "
,
repaymentLoanInfo
.
getReqID
(),
repaymentLoanInfo
.
getLoanId
(),
repaymentLoanInfo
.
getTermNo
()
,
JSON
.
toJSONString
(
repaymentLoanInfo
),
e
);
log
.
error
(
"众信利民助贷模式TO百行手动报送还款保存记录异常, reqId_log: {} , loanId: {} , termNo: {} , JSON: {} "
,
repaymentLoanInfo
.
getReqID
(),
repaymentLoanInfo
.
getLoanId
(),
repaymentLoanInfo
.
getTermNo
()
,
JSON
.
toJSONString
(
repaymentLoanInfo
),
e
);
}
}
repaymentLoanInfo
.
setReqID
(
repaymentLoanInfo
.
getRecordId
());
repaymentLoanInfo
.
setRecordId
(
null
);
repaymentLoanInfo
.
setRecordId
(
null
);
String
logJson
=
JSON
.
toJSONString
(
repaymentLoanInfo
);
repaymentLoanInfo
.
setPid
(
interfaceUploadClient
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setPid
(
interfaceUploadClient
(
repaymentLoanInfo
.
getPid
()));
repaymentLoanInfo
.
setName
(
interfaceUploadClient
(
repaymentLoanInfo
.
getName
()));
repaymentLoanInfo
.
setName
(
interfaceUploadClient
(
repaymentLoanInfo
.
getName
()));
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
(
"众信利民助贷模式TO百行手动报送还款记录 reqID: {} , result: {} "
,
repaymentLoanInfo
.
getReqID
(),
resultStr
);
log
.
info
(
"众信利民助贷模式TO百行手动报送还款记录 reqID: {} , bean: {} , result: {} "
,
repaymentLoanInfo
.
getReqID
(),
logJson
,
resultStr
);
}
catch
(
Exception
e
)
{
log
.
error
(
"百行征信助贷模式手动报送还款异常, params: {} "
,
repaymentLoanInfos
.
get
(
i
),
e
);
}
}
/*} catch (Exception e) {
}
log.error("百行征信助贷模式手动报送还款异常", e);
}*/
log
.
info
(
"众信利民助贷模式TO百行手动报送还款记录结束, 大小: {} , 耗时: {} "
,
repaymentLoanInfos
.
size
(),
((
sendWatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
));
log
.
info
(
"众信利民助贷模式TO百行手动报送还款记录结束, 大小: {} , 耗时: {} "
,
repaymentLoanInfos
.
size
(),
((
sendWatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
));
}
}
...
@@ -727,7 +718,7 @@ public class BaiHangZhuDaiService {
...
@@ -727,7 +718,7 @@ public class BaiHangZhuDaiService {
* 创建人: yanhui.Hao <br/>
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.23 <br/>
* 创建时间: 2019.10.23 <br/>
*/
*/
public
String
stockApplyLoanInfoZhuDai
(
String
startDate
,
String
noEndDate
)
{
public
String
stockApplyLoanInfoZhuDai
(
String
startDate
,
String
noEndDate
,
String
isNotHaveReqID
)
{
//"2019-05-07T00:00:00"
//"2019-05-07T00:00:00"
if
(
StringUtils
.
isAnyBlank
(
startDate
,
noEndDate
))
{
if
(
StringUtils
.
isAnyBlank
(
startDate
,
noEndDate
))
{
log
.
warn
(
"stockLoanInfoZhuDai日期格式有误, startDate : {} , noEndDate : {} "
,
startDate
,
noEndDate
);
log
.
warn
(
"stockLoanInfoZhuDai日期格式有误, startDate : {} , noEndDate : {} "
,
startDate
,
noEndDate
);
...
@@ -738,6 +729,11 @@ public class BaiHangZhuDaiService {
...
@@ -738,6 +729,11 @@ public class BaiHangZhuDaiService {
return
"日期格式有误"
;
return
"日期格式有误"
;
}
}
boolean
notHaveReqID
=
true
;
if
(
StringUtils
.
isNotEmpty
(
isNotHaveReqID
)
&&
"true"
.
equals
(
isNotHaveReqID
)){
notHaveReqID
=
false
;
}
final
String
fileName
=
zl_file_path_name
+
"lhp_A1_"
+
startDate
.
substring
(
0
,
startDate
.
indexOf
(
"T"
)).
replace
(
"-"
,
""
)
+
"_"
+
noEndDate
.
substring
(
0
,
noEndDate
.
indexOf
(
"T"
)).
replace
(
"-"
,
""
);
final
String
fileName
=
zl_file_path_name
+
"lhp_A1_"
+
startDate
.
substring
(
0
,
startDate
.
indexOf
(
"T"
)).
replace
(
"-"
,
""
)
+
"_"
+
noEndDate
.
substring
(
0
,
noEndDate
.
indexOf
(
"T"
)).
replace
(
"-"
,
""
);
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
startDate
);
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
startDate
);
...
@@ -798,9 +794,11 @@ public class BaiHangZhuDaiService {
...
@@ -798,9 +794,11 @@ public class BaiHangZhuDaiService {
try
{
try
{
ApplyLoanInfoZhuDai
applyLoanInfo
=
applyLoanInfoList
.
get
(
i
);
ApplyLoanInfoZhuDai
applyLoanInfo
=
applyLoanInfoList
.
get
(
i
);
applyLoanInfo
.
setUploadTs
(
upladTs
);
applyLoanInfo
.
setUploadTs
(
upladTs
);
String
uuid
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
if
(
notHaveReqID
){
log
.
info
(
"history log A1 oldReqID="
+
applyLoanInfo
.
getReqID
()+
",newReqID="
+
uuid
);
String
uuid
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
applyLoanInfo
.
setReqID
(
uuid
);
log
.
info
(
"history log A1 oldReqID="
+
applyLoanInfo
.
getReqID
()+
",newReqID="
+
uuid
);
applyLoanInfo
.
setReqID
(
uuid
);
}
//邮箱有错误的就不传
//邮箱有错误的就不传
if
(!
TuoMinUtils
.
checkEmail
(
applyLoanInfo
.
getEmailAddress
())){
if
(!
TuoMinUtils
.
checkEmail
(
applyLoanInfo
.
getEmailAddress
())){
...
@@ -851,7 +849,7 @@ public class BaiHangZhuDaiService {
...
@@ -851,7 +849,7 @@ public class BaiHangZhuDaiService {
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
noEndDate
);
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
noEndDate
);
boolean
notHaveReqID
=
true
;
boolean
notHaveReqID
=
true
;
if
(
StringUtils
.
isNotEmpty
(
isNotHaveReqID
)
&&
"tr
eu
"
.
equals
(
isNotHaveReqID
)){
if
(
StringUtils
.
isNotEmpty
(
isNotHaveReqID
)
&&
"tr
ue
"
.
equals
(
isNotHaveReqID
)){
notHaveReqID
=
false
;
notHaveReqID
=
false
;
}
}
...
@@ -999,7 +997,7 @@ public class BaiHangZhuDaiService {
...
@@ -999,7 +997,7 @@ public class BaiHangZhuDaiService {
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
noEndDate
);
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
noEndDate
);
boolean
notHaveReqID
=
true
;
boolean
notHaveReqID
=
true
;
if
(
StringUtils
.
isNotEmpty
(
isNotHaveReqID
)
&&
"tr
eu
"
.
equals
(
isNotHaveReqID
)){
if
(
StringUtils
.
isNotEmpty
(
isNotHaveReqID
)
&&
"tr
ue
"
.
equals
(
isNotHaveReqID
)){
notHaveReqID
=
false
;
notHaveReqID
=
false
;
}
}
...
@@ -1508,7 +1506,7 @@ public class BaiHangZhuDaiService {
...
@@ -1508,7 +1506,7 @@ public class BaiHangZhuDaiService {
if
(
"A1"
.
equalsIgnoreCase
(
type
))
{
if
(
"A1"
.
equalsIgnoreCase
(
type
))
{
//贷款申请信息(A1)
//贷款申请信息(A1)
log
.
warn
(
"Async zhuDaiStockSyn Start {}, {}, {}, "
,
type
,
startDate
,
noEndDate
);
log
.
warn
(
"Async zhuDaiStockSyn Start {}, {}, {}, "
,
type
,
startDate
,
noEndDate
);
stockApplyLoanInfoZhuDai
(
startDate
,
noEndDate
);
stockApplyLoanInfoZhuDai
(
startDate
,
noEndDate
,
isNotHaveReqID
);
}
else
if
(
"D2"
.
equalsIgnoreCase
(
type
))
{
}
else
if
(
"D2"
.
equalsIgnoreCase
(
type
))
{
//非循环贷款账户数据信息(D2)
//非循环贷款账户数据信息(D2)
...
...
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