Commit f3e2b21e authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.21' into MVP1.7.21

parents 247b997f cffcef32
......@@ -639,8 +639,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
}
}
if (CommonConstants.TWENTY_STRING.equals(preVo.getContractType())){
//处理务派遣合同: 先看上一份合同是否为劳务协议,如果是取值上一份合同的劳务协议结束日期
Date initDate = contract.getContractEnd();
if (Common.isNotNull(contract.getPreNewId())){
......@@ -659,6 +659,13 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
}
preVo.setDispatchPeriodStart(DateUtil.addDayByDate(initDate,1));
if (Common.isNotNull(preVo.getDispatchPeriodMonth()) && Common.isNotNull(preVo.getDispatchPeriodYear())) {
vo = new TEmployeeContractDateVo();
vo.setMonthAfter(Integer.parseInt(Common.isEmpty(preVo.getDispatchPeriodMonth()) ? "0": preVo.getDispatchPeriodMonth()));
vo.setYearAfter(Integer.parseInt(Common.isEmpty(preVo.getDispatchPeriodYear()) ? "0": preVo.getDispatchPeriodYear()));
vo.setRegistDate(preVo.getDispatchPeriodStart());
preVo.setDispatchPeriodEnd(this.addYearsMonths(vo));
}
List<String> errorMessages = new ArrayList<>();
if (Common.isNotNull(preVo.getContractDurationYear())
......@@ -707,13 +714,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
}
}
if (Common.isNotNull(preVo.getDispatchPeriodMonth()) && Common.isNotNull(preVo.getDispatchPeriodYear())) {
vo = new TEmployeeContractDateVo();
vo.setMonthAfter(Integer.parseInt(Common.isEmpty(preVo.getDispatchPeriodMonth()) ? "0": preVo.getDispatchPeriodMonth()));
vo.setYearAfter(Integer.parseInt(Common.isEmpty(preVo.getDispatchPeriodYear()) ? "0": preVo.getDispatchPeriodYear()));
vo.setRegistDate(preVo.getDispatchPeriodStart());
preVo.setDispatchPeriodEnd(this.addYearsMonths(vo));
}
// 如果有错误信息,根据具体错误项动态生成提示
if (!errorMessages.isEmpty()) {
......
......@@ -1230,9 +1230,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
|| "标准合同".equals(employeeContractPreVo.getContractType())) {
// 检查必要字段是否为空 关键字段不为空才校验
if (!Common.isEmpty(employeeContractPreVo.getContractTerm())
boolean flag = CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractTerm())
&& !Common.isEmpty(employeeContractPreVo.getTryPeriodNum())
&& CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getTryPeriodType())) {
&& CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getTryPeriodType());
if (!flag){
flag = CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractTerm())
&& !Common.isEmpty(employeeContractPreVo.getTryPeriodNum())
&& !"0".equals(employeeContractPreVo.getTryPeriodNum())
&& (CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractEndType())
|| CommonConstants.THREE_STRING.equals(employeeContractPreVo.getContractEndType()));
}
if (flag) {
// 安全解析试用期月数
int tryPeriodMonths = 0;
try {
......
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