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
efe8a960
Commit
efe8a960
authored
Nov 20, 2019
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优化
parent
e9d185ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
9 deletions
+30
-9
BaiHangZhuDaiService.java
...antgroup/report/service/baihang/BaiHangZhuDaiService.java
+30
-9
No files found.
src/main/java/cn/quantgroup/report/service/baihang/BaiHangZhuDaiService.java
View file @
efe8a960
...
...
@@ -650,6 +650,13 @@ public class BaiHangZhuDaiService {
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
startDate
);
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
noEndDate
);
//2019.11.20 把标题加就去,以免忘记加
try
{
FileUtils
.
write
(
new
File
(
fileName
+
"_01.txt"
),
"#applyInfo\r\n"
,
"UTF-8"
,
true
);
}
catch
(
Exception
e
){
log
.
error
(
"A1存量添加标题#applyInfo异常"
,
e
);
}
int
counter
=
0
;
log
.
info
(
"开始>>百行-助贷申请存量数据整理, startDate : {} , noEndDate : {} ......"
,
startDate
,
noEndDate
);
long
sUtc1
=
System
.
currentTimeMillis
();
...
...
@@ -712,7 +719,7 @@ public class BaiHangZhuDaiService {
FileUtils
.
write
(
new
File
(
fileName
+
"_01.txt"
),
JSON
.
toJSONString
(
applyLoanInfo
)+
"\r\n"
,
"UTF-8"
,
true
);
//脱敏数据写一份
testTuoMinFileWrite
(
fileName
+
"_TEST_01.txt"
,
starTime
,
applyLoanInfo
,
null
,
null
);
//
testTuoMinFileWrite(fileName+"_TEST_01.txt",starTime,applyLoanInfo,null,null);
}
catch
(
Exception
e
)
{
log
.
error
(
"申请存量数据处理异常, startTime: {} , endTime: {} "
,
starTime
,
endTime
,
e
);
...
...
@@ -749,6 +756,14 @@ public class BaiHangZhuDaiService {
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
startDate
);
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
noEndDate
);
//2019.11.20 把标题加就去,以免忘记加
try
{
FileUtils
.
write
(
new
File
(
fileName
+
"_01.txt"
),
"#singleLoanAccountInfo\r\n"
,
"UTF-8"
,
true
);
}
catch
(
Exception
e
){
log
.
error
(
"D2存量添加标题#singleLoanAccountInfo异常"
,
e
);
}
int
counter
=
0
;
log
.
info
(
"开始>>百行-助贷放款存量数据整理, startDate : {} , noEndDate : {} ......"
,
startDate
,
noEndDate
);
while
(
true
)
{
...
...
@@ -838,14 +853,14 @@ public class BaiHangZhuDaiService {
loanInfoZhuDaiVo
.
setReqID
(
id
);
//2019.11.18
if
(
loanInfoZhuDaiVo
.
get
Apply
Date
()!=
null
){
if
(
loanInfoZhuDaiVo
.
get
Issue
Date
()!=
null
){
loanInfoZhuDaiVo
.
setUploadTs
(
loanInfoZhuDaiVo
.
getIssueDate
());
//issueDate
}
FileUtils
.
write
(
new
File
(
fileName
+
"_01.txt"
),
JSON
.
toJSONString
(
loanInfoZhuDaiVo
)+
"\r\n"
,
"UTF-8"
,
true
);
//脱敏数据写一份
testTuoMinFileWrite
(
fileName
+
"_TEST_01.txt"
,
starTime
,
null
,
loanInfoZhuDaiVo
,
null
);
//
testTuoMinFileWrite(fileName+"_TEST_01.txt",starTime,null,loanInfoZhuDaiVo,null);
}
catch
(
Exception
e
)
{
log
.
error
(
"放款存量数据处理异常, startTime: {} , endTime: {} , recordId: {} , loanId: {} "
,
starTime
,
endTime
,
id
,
loanInfoZhuDaiVo
.
getLoanId
(),
e
);
...
...
@@ -881,6 +896,13 @@ public class BaiHangZhuDaiService {
LocalDateTime
erlyDate
=
LocalDateTime
.
parse
(
startDate
);
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
noEndDate
);
//2019.11.20 把标题加就去,以免忘记加
try
{
FileUtils
.
write
(
new
File
(
fileName
+
"_01.txt"
),
"#singleLoanRepayInfo\r\n"
,
"UTF-8"
,
true
);
}
catch
(
Exception
e
){
log
.
error
(
"D3存量添加标题#singleLoanRepayInfo异常"
,
e
);
}
int
counter
=
0
;
log
.
info
(
"开始>>整理百行-助贷还款&逾期存量数据 startDate : {} , noEndDate : {} ......"
,
startDate
,
noEndDate
);
while
(
true
)
{
...
...
@@ -953,12 +975,14 @@ public class BaiHangZhuDaiService {
// repaymentInfo.setUploadTs(repaymentInfo.getStatusConfirmAt());//statusConfirmAt还款状态确认时间
// }
//“还款状态确认时间”应早于等于记录生成时间(uploadTs)
repaymentInfo
.
setUploadTs
(
repaymentInfo
.
getStatusConfirmAt
());
if
(
repaymentInfo
.
getStatusConfirmAt
()!=
null
){
repaymentInfo
.
setUploadTs
(
repaymentInfo
.
getStatusConfirmAt
());
}
FileUtils
.
write
(
new
File
(
fileName
+
"_01.txt"
),
JSON
.
toJSONString
(
repaymentInfo
)+
"\r\n"
,
"UTF-8"
,
true
);
//脱敏数据写一份
testTuoMinFileWrite
(
fileName
+
"_TEST_01.txt"
,
starTime
,
null
,
null
,
repaymentInfo
);
//
testTuoMinFileWrite(fileName+"_TEST_01.txt",starTime,null,null,repaymentInfo);
}
}
catch
(
Exception
e
)
{
...
...
@@ -974,7 +998,7 @@ public class BaiHangZhuDaiService {
FileUtils
.
write
(
new
File
(
fileName
+
"_01.txt"
),
errMsgFlag
+
"\r\n"
,
"UTF-8"
,
true
);
//脱敏数据写一份
//testTuoMinFileWrite(fileName+"_TEST_01.txt",starTime,null,null,repaymentInfo);
FileUtils
.
write
(
new
File
(
fileName
+
"_TEST_01.txt"
),
errMsgFlag
+
"\r\n"
,
"UTF-8"
,
true
);
///
FileUtils.write(new File(fileName+"_TEST_01.txt"), errMsgFlag+"\r\n", "UTF-8", true);
}
catch
(
Exception
e2
){
log
.
error
(
"还款&逾期写入文件异常, startTime: {} , endTime: {} , type: {} "
,
starTime
,
endTime
,
type
,
e2
);
}
...
...
@@ -1371,9 +1395,6 @@ public class BaiHangZhuDaiService {
//用户三要素脱敏后数据写一份
private
void
testTuoMinFileWrite
(
String
fileName
,
String
startDate
,
ApplyLoanInfoZhuDai
bean_a1
,
LoanInfoZhuDaiVo
bean_d2
,
RepaymentInfoZhuDai
bean_d3
)
{
}
//2019.11.15 17:39
private
void
testTuoMinFileWrite_not_used
(
String
fileName
,
String
startDate
,
ApplyLoanInfoZhuDai
bean_a1
,
LoanInfoZhuDaiVo
bean_d2
,
RepaymentInfoZhuDai
bean_d3
)
{
String
pid
=
null
,
mapVal
=
null
,
jsonContext
=
""
;
try
{
if
(
bean_a1
!=
null
)
{
...
...
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