Commit 6f13b952 by kangxiaoshan

提示在执行合同

parent 2c89f95f
......@@ -472,15 +472,7 @@ public class ContractServiceImpl implements ContractService {
}
}
List<String> codes = contractRepository.findContractBodyNames(resource.getCustomerBody(), resource.getContractCode());
if (!codes.isEmpty()) {
// 合同编号已存在
resource.setId(-200L);
resource.setErroMessage("当前" + resource.getCustomerBody() +
"仍有其他正在执行的合同" + String.join(",\n", codes));
return resource;
}
resource.setInvoice(0L);
Long extraFlow = resource.getExtraFlow();
......@@ -544,6 +536,13 @@ public class ContractServiceImpl implements ContractService {
this.saveContractRelations(resource, resource.getId());
List<String> codes = contractRepository.findContractBodyNames(resource.getCustomerBody(), resource.getContractCode());
if (!codes.isEmpty()) {
// 合同编号已存在
resource.setCustomBodyNames(codes);
return resource;
}
return resource;
}
......
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