Commit efe8a960 authored by 郝彦辉's avatar 郝彦辉

修改优化

parent e9d185ba
......@@ -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.getApplyDate()!=null){
if(loanInfoZhuDaiVo.getIssueDate()!=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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment