Commit 2832dc62 authored by 陈宏杰's avatar 陈宏杰

计数不一致

parent 0d8126ec
...@@ -281,18 +281,14 @@ public class BaiHangFileReportService { ...@@ -281,18 +281,14 @@ public class BaiHangFileReportService {
reqId_log = applyLoanInfo.getReqID(); reqId_log = applyLoanInfo.getReqID();
zhuDaiLogList = applyLoanInfoZhuDaiMapper.findByApplyId(applyLoanInfo.getApplyId()); zhuDaiLogList = applyLoanInfoZhuDaiMapper.findByApplyId(applyLoanInfo.getApplyId());
if (CollectionUtils.isEmpty(zhuDaiLogList)) { if (CollectionUtils.isEmpty(zhuDaiLogList)) {
try { record = new ApplyLoanInfoZhuDai();
record = new ApplyLoanInfoZhuDai(); BeanUtils.copyProperties(applyLoanInfo, record);
BeanUtils.copyProperties(applyLoanInfo, record); record.setRecordId(UUID.randomUUID().toString().replaceAll("-", ""));
record.setRecordId(UUID.randomUUID().toString().replaceAll("-", "")); recordList.add(record);
recordList.add(record); if (recordList.size() >= A1_INITIAL_CAPACITY) {
if (recordList.size() >= A1_INITIAL_CAPACITY) { saveApplyLoanInfoZhuDai(recordList,starTime,endTime);
saveApplyLoanInfoZhuDai(recordList,starTime,endTime); clear(recordList);
clear(recordList); recordList = new ArrayList<>(A1_INITIAL_CAPACITY);
recordList = new ArrayList<>(A1_INITIAL_CAPACITY);
}
} catch (Exception e) {
log.error("量化派助贷TO百行报送(A1Refuse)-贷款申请信息保存记录失败", e);
} }
//邮箱有错误的就不传 //邮箱有错误的就不传
if (!TuoMinUtils.checkEmail(applyLoanInfo.getEmailAddress())) { if (!TuoMinUtils.checkEmail(applyLoanInfo.getEmailAddress())) {
...@@ -310,6 +306,9 @@ public class BaiHangFileReportService { ...@@ -310,6 +306,9 @@ public class BaiHangFileReportService {
log.error("量化派助贷TO百行报送(A1Refuse)-贷款申请信息异常, reqId_log: {} ", reqId_log, e); log.error("量化派助贷TO百行报送(A1Refuse)-贷款申请信息异常, reqId_log: {} ", reqId_log, e);
} }
} }
if (!CollectionUtils.isEmpty(recordList) && recordList.size() > 0) {
saveApplyLoanInfoZhuDai(recordList,starTime,endTime);
}
File file = new File(HOST_PATH+"量子数科科技有限公司_A1Re_"+fileNameReplaceAll(starTime.split("T")[0])+"_"+fileNameReplaceAll(endTime.split("T")[0])+"_"+String.format("%06d",new Random().nextInt(999999))+".txt"); File file = new File(HOST_PATH+"量子数科科技有限公司_A1Re_"+fileNameReplaceAll(starTime.split("T")[0])+"_"+fileNameReplaceAll(endTime.split("T")[0])+"_"+String.format("%06d",new Random().nextInt(999999))+".txt");
FileUtils.writeLines(file,reportList); FileUtils.writeLines(file,reportList);
if (reportList.size()<=1) { if (reportList.size()<=1) {
...@@ -321,7 +320,7 @@ public class BaiHangFileReportService { ...@@ -321,7 +320,7 @@ public class BaiHangFileReportService {
} catch (Exception e) { } catch (Exception e) {
log.error("量化派助贷TO百行报送(A1Refuse)-异常", e); log.error("量化派助贷TO百行报送(A1Refuse)-异常", e);
} finally { } finally {
clear(applyLoanInfos,reportList); clear(applyLoanInfos,reportList,recordList);
} }
return encryptFileName; return encryptFileName;
} }
......
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