Commit 15bd3f09 authored by fangxinjiang's avatar fangxinjiang

预计收集时间优化-fxj

parent 4d27c995
...@@ -2369,9 +2369,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2369,9 +2369,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
else if ((CommonConstants.ONE_STRING.equals(pushType) || CommonConstants.TWO_STRING.equals(pushType)) else if ((CommonConstants.ONE_STRING.equals(pushType) || CommonConstants.TWO_STRING.equals(pushType))
&& registration.getJoinLeaveDate() != null) { && registration.getJoinLeaveDate() != null) {
int workDaysBefore = CommonConstants.ONE_STRING.equals(pushType) ? 3 : 5; int workDaysBefore = CommonConstants.ONE_STRING.equals(pushType) ? 3 : 5;
LocalDate tempDate = parseContractEndDate(registration.getJoinLeaveDate(), preVo.getPushDate()); LocalDate tempDate = parseContractEndDate(registration.getJoinLeaveDate());
tempDate = calculateReminderWorkDaysBefore(tempDate, workDaysBefore, 1); tempDate = calculateReminderWorkDaysBefore(tempDate, workDaysBefore, 0);
preVo.setExpectedCollectionTime(DateUtil.getDateByLocalDate(tempDate)); Date temp = DateUtil.getDateByLocalDate(tempDate);
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
temp, DateUtil.ISO_EXPANDED_DATE_FORMAT) + " " + preVo.getPushDate(),
DateUtil.DATETIME_PATTERN_MINUTE));
} }
} catch (Exception e){ } catch (Exception e){
throw new RuntimeException("预期收款日期计算失败"); throw new RuntimeException("预期收款日期计算失败");
...@@ -2888,9 +2891,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2888,9 +2891,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
/** /**
* 解析合同结束日期 * 解析合同结束日期
*/ */
private LocalDate parseContractEndDate(Date contractEnd,String pushDate) { private LocalDate parseContractEndDate(Date contractEnd) {
try { try {
return LocalDateUtil.parseLocalDate(DateUtil.dateToString(contractEnd, DateUtil.ISO_EXPANDED_DATE_FORMAT) + " " + pushDate); return LocalDateUtil.parseLocalDate(DateUtil.dateToString(contractEnd, DateUtil.ISO_EXPANDED_DATE_FORMAT));
} catch (Exception e) { } catch (Exception e) {
return null; return 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