Commit 201c561f authored by fangxinjiang's avatar fangxinjiang

合同新签-劳务派遣相关限制优化-fxj

parent fe79a932
......@@ -1151,7 +1151,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
employeeContractPreVo.setContractDurationMonth(CommonConstants.ZERO_STRING);
}
}
if (CommonConstants.TWENTY_STRING.equals(employeeContractPreVo.getContractType())){
if (CommonConstants.TWENTY_STRING.equals(employeeContractPreVo.getContractType())
||"劳务派遣合同".equals(employeeContractPreVo.getContractType())){
if (Common.isNotNull(employeeContractPreVo.getDispatchPeriodYear()) && Common.isNotNull(employeeContractPreVo.getDispatchPeriodMonth())){
//校验劳务派遣的派遣年限必须为两年
......@@ -1407,6 +1408,26 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
receiveVoList.add(receiveVo);
continue;
}
TEmployeeContractPreVo employeeContractPreVo = new TEmployeeContractPreVo();
if (preVo.getServerItem().contains("合同") && Common.isNotNull(preVo.getEmployeeContractPreVos())) {
BeanUtils.copyProperties(preVo.getEmployeeContractPreVos(),employeeContractPreVo);
//生成合同待购买数据
String errorStr = null;
try {
errorStr = initContractPreInfo(registration, employeeContractPreVo, user);
} catch (ParseException e) {
exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg("合同初始化异常:"+e.getMessage());
errorList.add(exitCheckVo);
continue;
}
if (null != errorStr){
exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg(errorStr);
errorList.add(exitCheckVo);
continue;
}
}
registration.setProcessStatus(CommonConstants.ZERO_STRING);
baseMapper.updateById(registration);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
......@@ -1422,17 +1443,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initInsruancePreInfo(registration, insurancePreVo, user, domainR.getData());
insuranceDaprUtil.saveInsurancePreInfo(preVo);
}
TEmployeeContractPreVo employeeContractPreVo = new TEmployeeContractPreVo();
if (preVo.getServerItem().contains("合同") && Common.isNotNull(preVo.getEmployeeContractPreVos())) {
BeanUtils.copyProperties(preVo.getEmployeeContractPreVos(),employeeContractPreVo);
//生成合同待购买数据
String errorStr = initContractPreInfo(registration, employeeContractPreVo, user);
if (null != errorStr){
exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg(errorStr);
errorList.add(exitCheckVo);
continue;
}
if (preVo.getServerItem().contains("合同") && Common.isNotNull(employeeContractPreVo)) {
employeeContractPreVo.setRegisterId(domainR.getData());
archivesDaprUtil.saveContractPreInfo(employeeContractPreVo);
}
......
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