Commit d2fe3c3f authored by 陈宏杰's avatar 陈宏杰

文件名时间格式

parent 995b3048
......@@ -153,7 +153,7 @@ public class BaiHangFileReportService {
log.error("量化派助贷TO百行报送(A1)-贷款申请信息异常, reqId_log: {} ", reqId_log, e);
}
}
File file = new File("量子数科科技有限公司_A1_"+starTime.split("T")[0].replaceAll("-","")+"_"+endTime.split("T")[0].replaceAll("-","")+"_0001"+".txt");
File file = new File("量子数科科技有限公司_A1_"+fileNameReplaceAll(starTime.split("T")[0])+"_"+fileNameReplaceAll(endTime.split("T")[0])+"_0001"+".txt");
FileUtils.writeLines(file,reportList);
if (CollectionUtils.isEmpty(reportList)) {
log.info("量化派助贷TO百行报送(A1)-贷款申请信息为空,加密文件不生成!starTime={},endTime={}",starTime,endTime);
......@@ -221,7 +221,7 @@ public class BaiHangFileReportService {
log.error("量化派助贷TO百行报送-放款信息异常, recordId: {} , loanId: {} ", id, loanInfo.getLoanId(), e);
}
}
File file = new File("量子数科科技有限公司_D2_"+starTime.split("T")[0].replaceAll("-","")+"_"+endTime.split("T")[0].replaceAll("-","")+"_0002"+".txt");
File file = new File("量子数科科技有限公司_D2_"+fileNameReplaceAll(starTime.split("T")[0])+"_"+fileNameReplaceAll(endTime.split("T")[0])+"_0002"+".txt");
FileUtils.writeLines(file,reportList);
createFile(file.getAbsolutePath());
log.info("量化派助贷TO百行报送-放款申请完成, 实际大小: {} , 报送成功大小: {} , 耗时: {} ", loanInfozdList.size(), atomicInteger.get(), sendWatch.stop().elapsed(TimeUnit.MILLISECONDS));
......@@ -282,7 +282,7 @@ public class BaiHangFileReportService {
log.error("量化派助贷TO百行报送-还款信息异常, recordId: {} , loanId: {} ", id, repaymentLoanInfo.getLoanId(), e);
}
}
File file = new File("量子数科科技有限公司_D3_"+startTime.split("T")[0].replaceAll("-","")+"_"+endTime.split("T")[0].replaceAll("-","")+"_"+"0003"+".txt");
File file = new File("量子数科科技有限公司_D3_"+fileNameReplaceAll(startTime.split("T")[0])+"_"+fileNameReplaceAll(endTime.split("T")[0])+"_"+"0003"+".txt");
FileUtils.writeLines(file,reportList);
createFile(file.getAbsolutePath());
log.info("量化派助贷TO百行报送-还款申请完成 J: {} , 开始时间: {} , 结束时间: {} , 实际大小: {} , 报送成功大小: {} , 耗时: {} ", j, startTime, endTime, repaymentLoanInfos.size(), atomicInteger.get(), sendWatch.stop().elapsed(TimeUnit.MILLISECONDS));
......@@ -333,4 +333,11 @@ public class BaiHangFileReportService {
return s;
}
}
private String fileNameReplaceAll(String str) {
if (str.length()<=0) {
return "";
}
return str.replaceAll("-","").replaceAll(":","").replaceAll(" ","");
}
}
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