浏览代码

fix bug75

Danj0rr 11 月之前
父节点
当前提交
9cc3395a08
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/java/com/kexun/controller/CooperatorController.java

+ 2 - 1
src/main/java/com/kexun/controller/CooperatorController.java

@@ -130,8 +130,9 @@ public class CooperatorController {
         CooperatorInfo cooperatorInfo = CooperatorService.findByID(cooperatorId);
 
         List<CooperatorInfo> dupNumCooperatorInfo=CooperatorService.findByCorpCertificateNumAndType(req.getString("corp_certificate_num"),req.getString("corp_certificate_type"));
-        if (!dupNumCooperatorInfo.isEmpty())
+        if (!dupNumCooperatorInfo.isEmpty() && !(dupNumCooperatorInfo.size()==1&& dupNumCooperatorInfo.get(0).getId()==cooperatorId)) {
             return Result.error("证件号码重复!");
+        }
 
 
         cooperatorInfo.setCooperatorName(req.getString("cooperator_name"));