修改合同:更新逻辑修改

This commit is contained in:
guojunyun
2025-10-31 09:45:13 +08:00
parent 559c36b78f
commit bfe90f3892

View File

@@ -921,13 +921,9 @@ public class ContractServiceImpl implements ContractService {
}
// 更新合同主信息
contractMainMapper.updateById(newContractMainDO);
// 模板实例ID更新为null
if (newContractMainDO.getInstanceId() == null) {
contractMainMapper.update(new LambdaUpdateWrapper<>(ContractMainDO.class)
.set(ContractMainDO::getInstanceId, null)
contractMainMapper.update(newContractMainDO, new LambdaUpdateWrapper<>(ContractMainDO.class)
.set(ContractMainDO::getInstanceId, newContractMainDO.getInstanceId())
.eq(ContractMainDO::getId, newContractMainDO.getId()));
}
if (DictEnum.BSE_CTRT_STS_IN_PROGRESS.getCode().equals(newContractMainDO.getStatus())) {
// 执行中合同重新提交erp