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
4ba01391
Commit
4ba01391
authored
Dec 19, 2019
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优化。
parent
0066b435
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
41 deletions
+51
-41
ExZhuDaiBaiHangReSendController.java
.../controller/external/ExZhuDaiBaiHangReSendController.java
+3
-2
BaiHangZhuDaiService.java
...antgroup/report/service/baihang/BaiHangZhuDaiService.java
+13
-3
ManualToolService.java
...antgroup/report/service/manualTool/ManualToolService.java
+35
-36
No files found.
src/main/java/cn/quantgroup/report/controller/external/ExZhuDaiBaiHangReSendController.java
View file @
4ba01391
...
...
@@ -81,14 +81,15 @@ public class ExZhuDaiBaiHangReSendController {
//存量整理公共方法
@RequestMapping
(
"/manual/build/zhuDaiStockSyn"
)
public
String
zhuDaiStockSyn
(
String
type
,
String
startDate
,
String
noEndDate
)
{
public
String
zhuDaiStockSyn
(
String
type
,
String
startDate
,
String
noEndDate
,
String
d3Type
)
{
//d3Type=0 还款,type=1 逾期
if
(
StringUtils
.
isAnyBlank
(
type
,
startDate
,
noEndDate
))
{
return
"参数为空"
;
}
startDate
=
startDate
+
"T00:00:00"
;
noEndDate
=
noEndDate
+
"T00:00:00"
;
baiHangZhuDaiService
.
zhuDaiStockSyn
(
type
,
startDate
,
noEndDate
);
baiHangZhuDaiService
.
zhuDaiStockSyn
(
type
,
startDate
,
noEndDate
,
d3Type
);
return
"请求type="
+
type
+
",startDate="
+
startDate
+
",noEndDate="
+
noEndDate
+
",调度结束"
;
}
...
...
src/main/java/cn/quantgroup/report/service/baihang/BaiHangZhuDaiService.java
View file @
4ba01391
...
...
@@ -885,7 +885,7 @@ public class BaiHangZhuDaiService {
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.23 <br/>
*/
public
String
stockRepayMentInfoZhuDai
(
String
startDate
,
String
noEndDate
)
{
public
String
stockRepayMentInfoZhuDai
(
String
startDate
,
String
noEndDate
,
String
d3Type
)
{
//d3Type=0 还款,type=1 逾期
//"2019-05-07T00:00:00"
if
(
StringUtils
.
isAnyBlank
(
startDate
,
noEndDate
)){
log
.
warn
(
"stockRepayMentInfoZhuDai日期格式有误, startDate : {} , noEndDate : {} "
,
startDate
,
noEndDate
);
...
...
@@ -931,6 +931,11 @@ public class BaiHangZhuDaiService {
long
log_stUtc
=
System
.
currentTimeMillis
();
try
{
if
(
type
==
0
)
{
if
(
StringUtils
.
isNotEmpty
(
d3Type
)
&&
d3Type
.
equals
(
"1"
)){
//只要逾期
continue
;
}
//Stopwatch stopwatch = Stopwatch.createStarted();
/* repaymentInfoList = repaymentLoanInfoMapper.queryStockRepayMentInfoZhuDai(timeRecord);*/
...
...
@@ -946,6 +951,11 @@ public class BaiHangZhuDaiService {
}
}
else
{
if
(
StringUtils
.
isNotEmpty
(
d3Type
)
&&
d3Type
.
equals
(
"0"
)){
//只要还款
continue
;
}
Stopwatch
realTimeOverdueStopWatch3
=
Stopwatch
.
createStarted
();
repaymentInfoList
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentOverdue
(
timeRecord
);
log
.
info
(
"逾期存量-非联合贷查询结束, 大小: {} , starTime: {} , 耗时: {} "
,
repaymentInfoList
.
size
(),
starTime
,
(
realTimeOverdueStopWatch3
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)/
1000
)+
".s"
);
...
...
@@ -1371,7 +1381,7 @@ public class BaiHangZhuDaiService {
@Async
public
void
zhuDaiStockSyn
(
String
type
,
String
startDate
,
String
noEndDate
)
{
public
void
zhuDaiStockSyn
(
String
type
,
String
startDate
,
String
noEndDate
,
String
d3Type
)
{
//"2019-05-07T00:00:00"
if
(
StringUtils
.
isAnyBlank
(
type
,
startDate
,
noEndDate
))
{
log
.
warn
(
"Async zhuDaiStockSyn 参数不能为空, startDate : {} , noEndDate : {} "
,
startDate
,
noEndDate
);
...
...
@@ -1392,7 +1402,7 @@ public class BaiHangZhuDaiService {
stockLoanInfoZhuDai
(
startDate
,
noEndDate
);
}
else
if
(
"D3"
.
equalsIgnoreCase
(
type
))
{
//非循环贷款贷后数据信息(D3)
stockRepayMentInfoZhuDai
(
startDate
,
noEndDate
);
stockRepayMentInfoZhuDai
(
startDate
,
noEndDate
,
d3Type
);
}
else
{
log
.
warn
(
"Async zhuDaiStockSyn 参数 type: {} 未知."
,
type
);
}
...
...
src/main/java/cn/quantgroup/report/service/manualTool/ManualToolService.java
View file @
4ba01391
...
...
@@ -849,6 +849,18 @@ public class ManualToolService implements CommonSuperService {
}
}
public
static
void
writeLogByName
(
String
fileName
,
String
msg
)
{
System
.
out
.
println
(
msg
);
try
{
//String fileName = "D:\\JavaTeam\\D3_build\\out_log.txt";
FileUtils
.
write
(
new
File
(
fileName
),
msg
+
"\r\n"
,
"UTF-8"
,
true
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
System
.
err
.
println
(
"writeLog Error."
+
e
);
}
}
public
static
void
buildA1
()
{
//A1
String
[]
err_inp_reqIDs
=
{
"..."
};
...
...
@@ -1010,23 +1022,25 @@ public class ManualToolService implements CommonSuperService {
public
static
void
buildD3_logicerror
()
{
//"D3_041", 贷款账户编号loanId+还款期数termNo+还款状态确认时间statusConfirmAt+业务发生机构代码在还款记录中唯一。
List
<
String
>
logicerrorList
=
ReadOrWriteTxt
.
readTxtList
(
"D:\\
JavaTeam\\D3_build\\d3_041_errData.txt
"
);
List
<
String
>
logicerrorList
=
ReadOrWriteTxt
.
readTxtList
(
"D:\\
用户目录\\Downloads\\生产p2p\\err041_6.log
"
);
Map
<
String
,
String
>
err_log_loanIdMap
=
new
HashMap
<>(
logicerrorList
.
size
());
for
(
String
strs
:
logicerrorList
){
String
[]
tmpArr
=
strs
.
split
(
"[|]"
);
//err_log_loanIdMap.put(tmpArr[1], strs);
err_log_loanIdMap
.
put
(
tmpArr
[
1
]+
","
+
tmpArr
[
2
]+
","
+
tmpArr
[
3
],
strs
);
err_log_loanIdMap
.
put
(
tmpArr
[
0
]+
","
+
tmpArr
[
1
]+
","
+
tmpArr
[
2
],
strs
);
}
System
.
out
.
println
(
"err_log_loanIdMap 大小:"
+
err_log_loanIdMap
.
size
());
List
<
String
>
lineList
=
ReadOrWriteTxt
.
readTxtList
(
"D:\\
JavaTeam\\D3_build\\D3_04
.txt"
);
List
<
String
>
lineList
=
ReadOrWriteTxt
.
readTxtList
(
"D:\\
用户目录\\Downloads\\生产p2p\\sc_D3_20190701_20190910_6
.txt"
);
System
.
out
.
println
(
"lineList:"
+
lineList
.
size
());
String
fileName
=
"D:\\JavaTeam\\D3_build\\new_D3_04.txt"
;
int
totalCount
=
0
,
removeCount
=
0
;
String
ok_fileName
=
"D:\\用户目录\\Downloads\\生产p2p\\bulid_ok\\"
+
"ok6_D3_20190701_20190910_6.txt"
;
String
err_D3_041_fileName
=
"D:\\用户目录\\Downloads\\生产p2p\\remove\\"
+
"rm6_e041.txt"
;
String
err_30003_fileName
=
"D:\\用户目录\\Downloads\\生产p2p\\remove\\"
+
"rm6_e30003.txt"
;
int
totalCount
=
0
,
removeCount
=
0
,
removeCount2
=
0
;
for
(
int
i
=
0
;
i
<
lineList
.
size
();
i
++){
System
.
out
.
println
(
"START:"
+
i
);
...
...
@@ -1034,45 +1048,38 @@ public class ManualToolService implements CommonSuperService {
if
(
str
.
length
()
<
30
){
//#applyInfo #singleLoanAccountInfo
continue
;
}
RepaymentInfoZhuDai
repaymentLoanInfo
=
new
Gson
().
fromJson
(
str
,
new
TypeToken
<
RepaymentInfoZhuDai
>(){}.
getType
());
String
loanId
=
repaymentLoanInfo
.
getLoanId
();
/*if(err_log_loanIdMap.containsKey(loanId)){
//2|100011189|9|2019-02-22T00:00:00|
String[] errMsgArr = err_log_loanIdMap.get(loanId).split("[|]");
if(repaymentLoanInfo.getTermNo()==Integer.parseInt(errMsgArr[2]) && repaymentLoanInfo.getStatusConfirmAt().equals(errMsgArr[3])){
if(repaymentLoanInfo.getRealRepayment()==null || repaymentLoanInfo.getRealRepayment().intValue()==0){
if(repaymentLoanInfo.getRealRepaymentDate()==null || repaymentLoanInfo.getRealRepaymentDate().equals("")){
writeLog(JSON.toJSONString(repaymentLoanInfo));
removeCount++;
continue;
}
}
}
}*/
String
key
=
loanId
+
","
+
repaymentLoanInfo
.
getTermNo
()+
","
+
repaymentLoanInfo
.
getStatusConfirmAt
();
//"errorCode":"D3_041"
if
(
err_log_loanIdMap
.
containsKey
(
key
))
{
//100011189,9,2019-02-22T00:00:00
//删掉 本次还款金额 实际还款时间 为空的一条 "realRepayment":0,"realRepaymentDate":""
if
(
repaymentLoanInfo
.
getRealRepayment
()
==
null
||
repaymentLoanInfo
.
getRealRepayment
().
intValue
()
==
0
)
{
if
(
repaymentLoanInfo
.
getRealRepaymentDate
()
==
null
||
repaymentLoanInfo
.
getRealRepaymentDate
().
equals
(
""
))
{
writeLog
(
JSON
.
toJSONString
(
repaymentLoanInfo
));
writeLog
ByName
(
err_D3_041_fileName
,
JSON
.
toJSONString
(
repaymentLoanInfo
));
removeCount
++;
continue
;
}
}
}
//{"errorCode":"ERR_30003"
if
(
repaymentLoanInfo
.
getMobile
()==
null
||
repaymentLoanInfo
.
getMobile
().
length
()!=
11
){
writeLogByName
(
err_30003_fileName
,
JSON
.
toJSONString
(
repaymentLoanInfo
));
removeCount2
++;
continue
;
}
try
{
FileUtils
.
write
(
new
File
(
fileName
),
JSON
.
toJSONString
(
repaymentLoanInfo
)+
"\r\n"
,
"UTF-8"
,
true
);
FileUtils
.
write
(
new
File
(
ok_
fileName
),
JSON
.
toJSONString
(
repaymentLoanInfo
)+
"\r\n"
,
"UTF-8"
,
true
);
}
catch
(
IOException
e
)
{
System
.
err
.
println
(
"build D3 data,"
+
e
);
}
totalCount
++;
}
System
.
out
.
println
(
"build D3 end, lineList="
+
lineList
.
size
()+
",totalCount="
+
totalCount
+
",removeCount="
+
removeCount
+
", 合="
+(
totalCount
+
removeCount
));
System
.
out
.
println
(
"build D3 end, lineList="
+
lineList
.
size
()+
",totalCount="
+
totalCount
+
",removeCount="
+
removeCount
+
",removeCount2="
+
removeCount2
+
", 合="
+(
totalCount
+
removeCount
+
removeCount2
));
}
...
...
@@ -1271,26 +1278,18 @@ public class ManualToolService implements CommonSuperService {
/*String resMsgTemp = "申请A1报送: 查询 %d条(联合贷%d条), 报送成功 %d条; ";
System.out.println(String.format(resMsgTemp, 10, 2, 10));*/
//buildD2_inputerror();
// buildD2_logicerror();
// buildD3_logicerror();
//buildA1_uploadTs(null,null);
//buildD2_uploadTs(null,null);
// buildD3_uploadTs(null,null);
//testMd5();
testMd5_2
();
//testMd5_2();
buildD3_logicerror
();
}
}
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