Commit 49bc5ae1 authored by huyuchen's avatar huyuchen

优化修改

parent 14489e65
...@@ -725,30 +725,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -725,30 +725,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeInfoMapper.updateById(tEmployeeInfo); tEmployeeInfoMapper.updateById(tEmployeeInfo);
} }
} else { } else {
//先停用项目内的其他的员工合同————不要这个逻辑了 //是否同步终止合同、减项、减档为是的时候 单独写逻辑
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可 if (EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation())
//baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain(), contractInfo.getId(), CommonConstants.ONE_STRING) && CommonConstants.ZERO_STRING.equals(contractInfo.getChangeContractAndEmployee())) {
if (Common.isNotNull(contractInfo.getOldContractId())) {
TEmployeeContractInfo old = this.getById(contractInfo.getOldContractId());
if (old != null && Common.isNotNull(old.getId())) {
if (!CommonConstants.ZERO_STRING.equals(old.getInUse())) {
return R.failed("关联的原合同已不在用");
} else {
old.setInUse(CommonConstants.ONE_STRING);
this.updateById(old);
}
} else {
return R.failed("未找到关联的原合同");
}
} else {
return R.failed("未找到关联的原合同");
}
//同步任务处理清单执行详情 //同步任务处理清单执行详情
StringBuilder workInfo = new StringBuilder(); StringBuilder workInfo = new StringBuilder();
StringBuilder failueInfo = new StringBuilder(); StringBuilder failueInfo = new StringBuilder();
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if (EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation())
&& CommonConstants.ONE_STRING.equals(contractInfo.getChangeContractAndEmployee())) {
workInfo.append("合同终止成功,"); workInfo.append("合同终止成功,");
//该项目下其他在用的合同统一更新成不在用 //该项目下其他在用的合同统一更新成不在用
List<TEmployeeContractInfo> contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query() List<TEmployeeContractInfo> contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
...@@ -837,6 +819,24 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -837,6 +819,24 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
handlerInfo.setOperTime(LocalDateTime.now()); handlerInfo.setOperTime(LocalDateTime.now());
workHandlerInfoService.save(handlerInfo); workHandlerInfoService.save(handlerInfo);
} else { } else {
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
//baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain(), contractInfo.getId(), CommonConstants.ONE_STRING)
if (Common.isNotNull(contractInfo.getOldContractId())) {
TEmployeeContractInfo old = this.getById(contractInfo.getOldContractId());
if (old != null && Common.isNotNull(old.getId())) {
if (!CommonConstants.ZERO_STRING.equals(old.getInUse())) {
return R.failed("关联的原合同已不在用");
} else {
old.setInUse(CommonConstants.ONE_STRING);
this.updateById(old);
}
} else {
return R.failed("未找到关联的原合同");
}
} else {
return R.failed("未找到关联的原合同");
}
// 作废、终止审核通过: // 作废、终止审核通过:
// 更新项目合同状态为(2不在用),档案状态要判断 // 更新项目合同状态为(2不在用),档案状态要判断
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query() TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query()
...@@ -1632,36 +1632,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1632,36 +1632,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeInfoMapper.updateById(tEmployeeInfo); tEmployeeInfoMapper.updateById(tEmployeeInfo);
} }
} else { } else {
//先停用项目内的其他的员工合同————不要这个逻辑了 //是否同步终止合同、减项、减档为是的时候 单独写逻辑
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可 if (EmployeeConstants.SITUATION_SEVEN.equals(contract.getSituation())
if (Common.isNotNull(contract.getOldContractId())) { && CommonConstants.ZERO_STRING.equals(contract.getChangeContractAndEmployee())) {
TEmployeeContractInfo old = this.getById(contract.getOldContractId());
if (old != null && Common.isNotNull(old.getId())) {
if (!CommonConstants.ZERO_STRING.equals(old.getInUse())) {
errorMessages.add(new ErrorMessage(i, "关联的原合同已不在用!", CommonConstants.RED, contract.getApplyNo()));
errorCount++;
continue;
} else {
old.setInUse(CommonConstants.ONE_STRING);
this.updateById(old);
}
} else {
errorMessages.add(new ErrorMessage(i, "未找到关联的原合同!", CommonConstants.RED, contract.getApplyNo()));
errorCount++;
continue;
}
} else {
errorMessages.add(new ErrorMessage(i, "未找到关联的原合同!", CommonConstants.RED, contract.getApplyNo()));
errorCount++;
continue;
}
//同步任务处理清单执行详情 //同步任务处理清单执行详情
StringBuilder workInfo = new StringBuilder(); StringBuilder workInfo = new StringBuilder();
StringBuilder failueInfo = new StringBuilder(); StringBuilder failueInfo = new StringBuilder();
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if (EmployeeConstants.SITUATION_SIX.equals(contract.getSituation())
&& CommonConstants.ONE_STRING.equals(contract.getChangeContractAndEmployee())) {
workInfo.append("合同终止成功,"); workInfo.append("合同终止成功,");
//该项目下其他在用的合同统一更新成不在用 //该项目下其他在用的合同统一更新成不在用
contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query() contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
...@@ -1750,6 +1726,29 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1750,6 +1726,29 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
handlerInfo.setOperTime(LocalDateTime.now()); handlerInfo.setOperTime(LocalDateTime.now());
workHandlerInfoService.save(handlerInfo); workHandlerInfoService.save(handlerInfo);
} else{ } else{
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
if (Common.isNotNull(contract.getOldContractId())) {
TEmployeeContractInfo old = this.getById(contract.getOldContractId());
if (old != null && Common.isNotNull(old.getId())) {
if (!CommonConstants.ZERO_STRING.equals(old.getInUse())) {
errorMessages.add(new ErrorMessage(i, "关联的原合同已不在用!", CommonConstants.RED, contract.getApplyNo()));
errorCount++;
continue;
} else {
old.setInUse(CommonConstants.ONE_STRING);
this.updateById(old);
}
} else {
errorMessages.add(new ErrorMessage(i, "未找到关联的原合同!", CommonConstants.RED, contract.getApplyNo()));
errorCount++;
continue;
}
} else {
errorMessages.add(new ErrorMessage(i, "未找到关联的原合同!", CommonConstants.RED, contract.getApplyNo()));
errorCount++;
continue;
}
// 作废、终止审核通过: // 作废、终止审核通过:
// 更新项目合同状态为(2不在用),档案状态要判断 // 更新项目合同状态为(2不在用),档案状态要判断
tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query() tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query()
......
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