Commit 121843d1 authored by 陈宏杰's avatar 陈宏杰

日期初始化

parent 7a32ea47
...@@ -118,7 +118,7 @@ public class BaiHangFileReportService { ...@@ -118,7 +118,7 @@ public class BaiHangFileReportService {
return ; return ;
} }
redisTemplate.expire(Constant.QG_ZHU_DAI_CREATE_REPORT_FILE_LOCK_KEY, 15, TimeUnit.MINUTES); redisTemplate.expire(Constant.QG_ZHU_DAI_CREATE_REPORT_FILE_LOCK_KEY, 15, TimeUnit.MINUTES);
if (StringUtils.isAnyBlank(type, start, end, loanStartDateStr, loanEndDateStr)) { if (StringUtils.isAnyBlank(type, start, end)) {
throw new QGException(COMMON_ILLEGAL_PARAM_TOAST,"存在为空参数"); throw new QGException(COMMON_ILLEGAL_PARAM_TOAST,"存在为空参数");
} }
String encryptFileName = null; String encryptFileName = null;
...@@ -129,8 +129,8 @@ public class BaiHangFileReportService { ...@@ -129,8 +129,8 @@ public class BaiHangFileReportService {
Date stepEndDate = org.apache.commons.lang3.time.DateUtils.addDays(stepStartDate,daySplitCount); Date stepEndDate = org.apache.commons.lang3.time.DateUtils.addDays(stepStartDate,daySplitCount);
// D3 还款记录 防止漏期 // D3 还款记录 防止漏期
Date endDate = "D3R".equalsIgnoreCase(type) ? org.apache.commons.lang3.time.DateUtils.addDays(new Date(),1) : DateUtils.parseDate(dateFormat,end); Date endDate = "D3R".equalsIgnoreCase(type) ? org.apache.commons.lang3.time.DateUtils.addDays(new Date(),1) : DateUtils.parseDate(dateFormat,end);
Date loanStartDate = DateUtils.parseDate(dateFormat,loanStartDateStr); Date loanStartDate = StringUtils.isBlank(loanStartDateStr) ? new Date() : DateUtils.parseDate(dateFormat,loanStartDateStr);
Date loanEndDate = DateUtils.parseDate(dateFormat,loanEndDateStr); Date loanEndDate = StringUtils.isBlank(loanEndDateStr) ? new Date() : DateUtils.parseDate(dateFormat,loanEndDateStr);
Stopwatch stopwatch = Stopwatch.createStarted(); Stopwatch stopwatch = Stopwatch.createStarted();
while (stepEndDate.getTime() <= endDate.getTime()){ while (stepEndDate.getTime() <= endDate.getTime()){
encryptFileName = createReportFile(type,stepStartDate,stepEndDate,loanStartDate,loanEndDate,prefix); encryptFileName = createReportFile(type,stepStartDate,stepEndDate,loanStartDate,loanEndDate,prefix);
......
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