Commit 83a5cd18 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent 9ac74363
...@@ -242,7 +242,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -242,7 +242,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
&& null != preVo.getContractStart()){ && null != preVo.getContractStart()){
LocalDate reminderDate = LocalDateUtil.parseLocalDate(DateUtil.dateToString(preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT)); LocalDate reminderDate = LocalDateUtil.parseLocalDate(DateUtil.dateToString(preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT));
LocalDate contractStartDateNew = parseContractEndDate(preVo.getContractStart()); LocalDate contractStartDateNew = parseContractEndDate(preVo.getContractStart());
if (null != contractStartDateNew && reminderDate.isBefore(contractStartDateNew.minusMonths(1))){ if (null != contractStartDateNew && reminderDate.isAfter(contractStartDateNew.plusMonths(1))){
return R.failed(EmployeeConstants.DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR); return R.failed(EmployeeConstants.DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR);
} }
} }
...@@ -435,7 +435,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -435,7 +435,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
errorList.add(checkVo); errorList.add(checkVo);
continue; continue;
} }
if (reminderDate.isBefore(contractStartDateNew.minusMonths(1))) { if (reminderDate.isAfter(contractStartDateNew.plusMonths(1))) {
checkVo = buildErrorCheckVo(contract, preVo, EmployeeConstants.DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR); checkVo = buildErrorCheckVo(contract, preVo, EmployeeConstants.DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR);
errorList.add(checkVo); errorList.add(checkVo);
continue; continue;
......
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