Commit e30065ef authored by fangxinjiang's avatar fangxinjiang

提示信息优化-fxj

parent 8a4127db
...@@ -698,7 +698,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -698,7 +698,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
if (CommonConstants.ONE_STRING.equals(preVo.getContractTerm())){ if (CommonConstants.ONE_STRING.equals(preVo.getContractTerm())){
if (!preVo.getContractDurationYear().equals(preVo.getDispatchPeriodYear()) if (!preVo.getContractDurationYear().equals(preVo.getDispatchPeriodYear())
|| !preVo.getContractDurationMonth().equals(preVo.getDispatchPeriodMonth())){ || !preVo.getContractDurationMonth().equals(preVo.getDispatchPeriodMonth())){
errorMessages.add("劳务派遣合同需要和标准合同一致"); errorMessages.add("劳务派遣合同年限需要和标准合同年限一致");
} }
} }
// 如果有错误信息,一起返回 // 如果有错误信息,一起返回
...@@ -708,8 +708,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -708,8 +708,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
} }
//同商务合同一直 要 验证时间 截止时间大于等于开始时间、时间交叉 //同商务合同一直 要 验证时间 截止时间大于等于开始时间、时间交叉
if (Common.isNotNull(preVo.getContractStart()) && Common.isNotNull(preVo.getContractEnd())){ if (Common.isNotNull(preVo.getContractStart()) && Common.isNotNull(preVo.getContractEnd())){
if (preVo.getContractEnd().before(preVo.getContractStart())){ if (!preVo.getContractEnd().after(preVo.getContractStart())){
return "合同截止日期需大于等于合同开始日期"; return "合同截止日期需大于合同开始日期";
} }
} }
//更新岗位名称 //更新岗位名称
......
...@@ -1282,21 +1282,21 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1282,21 +1282,21 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
&& CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractTerm())){ && CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractTerm())){
if (!employeeContractPreVo.getContractDurationYear().equals(employeeContractPreVo.getDispatchPeriodYear()) if (!employeeContractPreVo.getContractDurationYear().equals(employeeContractPreVo.getDispatchPeriodYear())
|| !employeeContractPreVo.getContractDurationMonth().equals(employeeContractPreVo.getDispatchPeriodMonth())){ || !employeeContractPreVo.getContractDurationMonth().equals(employeeContractPreVo.getDispatchPeriodMonth())){
allErrorMessages.add("劳务派遣合同需要和标准合同一致"); allErrorMessages.add("劳务派遣合同年限需要和标准合同年限一致");
} }
} }
// 如果有错误信息,一起返回
if (!allErrorMessages.isEmpty()) {
return "合同的年限、开始日期、截止日期同派遣的期限、开始日期、截止日期不一致,请调整!";
}
// 校验合同有效期:合同截止日期不得早于合同开始日期 // 校验合同有效期:合同截止日期不得早于合同开始日期
if (Common.isNotNull(employeeContractPreVo.getContractStart()) if (Common.isNotNull(employeeContractPreVo.getContractStart())
&& Common.isNotNull(employeeContractPreVo.getContractEnd())) { && Common.isNotNull(employeeContractPreVo.getContractEnd())) {
if (employeeContractPreVo.getContractEnd().before(employeeContractPreVo.getContractStart())) { if (!employeeContractPreVo.getContractEnd().after(employeeContractPreVo.getContractStart())) {
allErrorMessages.add("合同截止日期需大于等于合同开始日期"); return "合同截止日期需大于合同开始日期";
} }
} }
// 如果有错误信息,一起返回
if (!allErrorMessages.isEmpty()) {
return "合同的年限、开始日期、截止日期同派遣的期限、开始日期、截止日期不一致,请调整!";
}
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