Commit 9783db0b authored by hongguangwu's avatar hongguangwu

1.7.19-合同相关

parent 5671abfd
...@@ -919,9 +919,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -919,9 +919,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} else { } else {
return R.failed("未找到关联的原合同"); return R.failed("未找到关联的原合同");
} }
// 2026-01-29 倩倩:将其他更新为不在用、审核不通过 doZhongZhiContract(contractInfo, user);
//该项目下其他在用的合同统一更新成不在用
doOtherContract(contractInfo, user);
// 作废、终止审核通过: // 作废、终止审核通过:
// 更新项目合同状态为(2不在用),档案状态要判断 // 更新项目合同状态为(2不在用),档案状态要判断
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query() TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query()
...@@ -2104,6 +2102,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -2104,6 +2102,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
errorCount++; errorCount++;
continue; continue;
} }
//该项目下其他在用的合同统一更新成不在用
doZhongZhiContract(contract, user);
// 作废、终止审核通过: // 作废、终止审核通过:
// 更新项目合同状态为(2不在用),档案状态要判断 // 更新项目合同状态为(2不在用),档案状态要判断
tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query() tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query()
...@@ -2429,36 +2431,38 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -2429,36 +2431,38 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
// 同步处理其他合同 // 同步处理其他合同
private void doOtherContract(TEmployeeContractInfo contractInfo, YifuUser user) { private void doOtherContract(TEmployeeContractInfo contract, YifuUser user) {
// 1将待审核的变为审核不通过且不在用
List<TEmployeeContractInfo> contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query() List<TEmployeeContractInfo> contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpIdcard, contractInfo.getEmpIdcard()) .lambda().eq(TEmployeeContractInfo::getEmpId, contract.getEmpId())
.eq(TEmployeeContractInfo::getSettleDomain, contractInfo.getSettleDomain()) .eq(TEmployeeContractInfo::getSettleDomain, contract.getSettleDomain())
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_STRING) .eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT) .eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.ne(TEmployeeContractInfo::getId, contractInfo.getId())); .ne(TEmployeeContractInfo::getId, contract.getId()));
if (Common.isNotNull(contractInfoList)) { if (Common.isNotNull(contractInfoList)) {
for (TEmployeeContractInfo contractInfo1 : contractInfoList) { for (TEmployeeContractInfo contractInfo1 : contractInfoList) {
contractInfo1.setInUse(CommonConstants.ONE_STRING); contractInfo1.setInUse(CommonConstants.ONE_STRING);
contractInfo1.setAuditStatus(CommonConstants.THREE_INT);
contractInfo1.setAuditUserName(user.getNickname()); contractInfo1.setAuditUserName(user.getNickname());
baseMapper.updateById(contractInfo1); baseMapper.updateById(contractInfo1);
//增加审核记录 //增加审核记录
this.setAuditInfoNew(contractInfo1); this.setAuditInfoNew(contractInfo1);
//this.sendLeave(contractInfo1.getId(), CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, "终止合同联动", user);
} }
} }
}
// 2将在用的变为不在用 // 同步处理终止合同
contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query() private void doZhongZhiContract(TEmployeeContractInfo contractInfo, YifuUser user) {
// 1将待审核的变为审核不通过且不在用
List<TEmployeeContractInfo> contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpIdcard, contractInfo.getEmpIdcard()) .lambda().eq(TEmployeeContractInfo::getEmpIdcard, contractInfo.getEmpIdcard())
.eq(TEmployeeContractInfo::getSettleDomain, contractInfo.getSettleDomain()) .eq(TEmployeeContractInfo::getSettleDomain, contractInfo.getSettleDomain())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING) .eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_STRING)
.eq(TEmployeeContractInfo::getSituation, EmployeeConstants.SITUATION_SEVEN)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT) .eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.ne(TEmployeeContractInfo::getId, contractInfo.getId())); .ne(TEmployeeContractInfo::getId, contractInfo.getId()));
if (Common.isNotNull(contractInfoList)) { if (Common.isNotNull(contractInfoList)) {
for (TEmployeeContractInfo contractInfo1 : contractInfoList) { for (TEmployeeContractInfo contractInfo1 : contractInfoList) {
contractInfo1.setInUse(CommonConstants.ONE_STRING); contractInfo1.setInUse(CommonConstants.ONE_STRING);
contractInfo1.setAuditStatus(CommonConstants.THREE_INT);
contractInfo1.setAuditUserName(user.getNickname()); contractInfo1.setAuditUserName(user.getNickname());
baseMapper.updateById(contractInfo1); baseMapper.updateById(contractInfo1);
//增加审核记录 //增加审核记录
...@@ -2466,7 +2470,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -2466,7 +2470,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//this.sendLeave(contractInfo1.getId(), CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, "终止合同联动", user); //this.sendLeave(contractInfo1.getId(), CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, "终止合同联动", user);
} }
} }
} }
//更新瓜子offer状态 //更新瓜子offer状态
......
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