diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/esRevision/service/impl/EsRevisionServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/esRevision/service/impl/EsRevisionServiceImpl.java index 2bbcc10c..7414d1d9 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/esRevision/service/impl/EsRevisionServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/esRevision/service/impl/EsRevisionServiceImpl.java @@ -371,7 +371,7 @@ public class EsRevisionServiceImpl extends ServiceImpl list = contactManageService.list(contactWrapper); - if (list != null && !list.isEmpty()) { + if (list != null && list.size() == 1) { data.setContactUserLeader(list.get(0).getLeaderId()); } case CONTACT_USER_LEADER_APPROVAL: diff --git a/laws-modules/src/main/java/com/jero/modules/laws/system/service/impl/LawsContactManageServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/system/service/impl/LawsContactManageServiceImpl.java index d552472c..3591b9df 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/system/service/impl/LawsContactManageServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/system/service/impl/LawsContactManageServiceImpl.java @@ -117,22 +117,22 @@ public class LawsContactManageServiceImpl extends ServiceImpl queryLawsContactManage = new LambdaQueryWrapper<>(); - queryLawsContactManage.eq(LawsContactManage::getDepartId, lawsContactManage.getDepartId()); - queryLawsContactManage.eq(LawsContactManage::getContactId, lawsContactManage.getContactId()); - queryLawsContactManage.eq(LawsContactManage::getLeaderId, lawsContactManage.getLeaderId()); - long l = count(queryLawsContactManage); - if (l > 0) { - throw new JeroBootException("部门和联络人匹配关系已存在,请重新选择"); - } - - queryLawsContactManage.clear(); - queryLawsContactManage.eq(LawsContactManage::getContactId, lawsContactManage.getContactId()); - long n = count(queryLawsContactManage); - if (n > 0) { - throw new JeroBootException("已存在相同的联络人"); - } +// // 验证 部门名称+标准化工程师+联络人+部门联络人主管级领导唯一 +// LambdaQueryWrapper queryLawsContactManage = new LambdaQueryWrapper<>(); +// queryLawsContactManage.eq(LawsContactManage::getDepartId, lawsContactManage.getDepartId()); +// queryLawsContactManage.eq(LawsContactManage::getContactId, lawsContactManage.getContactId()); +// queryLawsContactManage.eq(LawsContactManage::getLeaderId, lawsContactManage.getLeaderId()); +// long l = count(queryLawsContactManage); +// if (l > 0) { +// throw new JeroBootException("部门和联络人匹配关系已存在,请重新选择"); +// } +// +// queryLawsContactManage.clear(); +// queryLawsContactManage.eq(LawsContactManage::getContactId, lawsContactManage.getContactId()); +// long n = count(queryLawsContactManage); +// if (n > 0) { +// throw new JeroBootException("已存在相同的联络人"); +// } Date now = new Date(); lawsContactManage.setCreateTime(now);