瀏覽代碼

提交新增合同文件校验

chenxiaofei 1 月之前
父節點
當前提交
ae7a13997c

+ 4 - 0
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/operateService/KwcContractLogisticsService.java

@@ -1194,6 +1194,10 @@ public class KwcContractLogisticsService {
         if (Objects.nonNull(req.getId())){
             saveContractLogistics.setId(req.getId());
         }else {
+            KwcContractLogistics kwcContractLogistics = kwcContractLogisticsRepository.queryByContractCode(req.getBaseInfo().getContractCode());
+            if (Objects.nonNull(kwcContractLogistics)){
+                throw new BusinessException("合同编号已存在");
+            }
             saveContractLogistics.setId(contactId);
         }
         saveContractLogistics.setEntId(LoginUserHolder.getEntId());