feat: 去除联络人管理唯一性限制
This commit is contained in:
+1
-1
@@ -371,7 +371,7 @@ public class EsRevisionServiceImpl extends ServiceImpl<EsRevisionMapper, Process
|
|||||||
advicesWrapper.eq(EsRevisionAdvice::getExecutionId, executionId);
|
advicesWrapper.eq(EsRevisionAdvice::getExecutionId, executionId);
|
||||||
contactWrapper.eq(LawsContactManage::getContactId, userId);
|
contactWrapper.eq(LawsContactManage::getContactId, userId);
|
||||||
List<LawsContactManage> list = contactManageService.list(contactWrapper);
|
List<LawsContactManage> list = contactManageService.list(contactWrapper);
|
||||||
if (list != null && !list.isEmpty()) {
|
if (list != null && list.size() == 1) {
|
||||||
data.setContactUserLeader(list.get(0).getLeaderId());
|
data.setContactUserLeader(list.get(0).getLeaderId());
|
||||||
}
|
}
|
||||||
case CONTACT_USER_LEADER_APPROVAL:
|
case CONTACT_USER_LEADER_APPROVAL:
|
||||||
|
|||||||
+16
-16
@@ -117,22 +117,22 @@ public class LawsContactManageServiceImpl extends ServiceImpl<LawsContactManageM
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(LawsContactManage lawsContactManage) {
|
public void add(LawsContactManage lawsContactManage) {
|
||||||
// 验证 部门名称+标准化工程师+联络人+部门联络人主管级领导唯一
|
// // 验证 部门名称+标准化工程师+联络人+部门联络人主管级领导唯一
|
||||||
LambdaQueryWrapper<LawsContactManage> queryLawsContactManage = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<LawsContactManage> queryLawsContactManage = new LambdaQueryWrapper<>();
|
||||||
queryLawsContactManage.eq(LawsContactManage::getDepartId, lawsContactManage.getDepartId());
|
// queryLawsContactManage.eq(LawsContactManage::getDepartId, lawsContactManage.getDepartId());
|
||||||
queryLawsContactManage.eq(LawsContactManage::getContactId, lawsContactManage.getContactId());
|
// queryLawsContactManage.eq(LawsContactManage::getContactId, lawsContactManage.getContactId());
|
||||||
queryLawsContactManage.eq(LawsContactManage::getLeaderId, lawsContactManage.getLeaderId());
|
// queryLawsContactManage.eq(LawsContactManage::getLeaderId, lawsContactManage.getLeaderId());
|
||||||
long l = count(queryLawsContactManage);
|
// long l = count(queryLawsContactManage);
|
||||||
if (l > 0) {
|
// if (l > 0) {
|
||||||
throw new JeroBootException("部门和联络人匹配关系已存在,请重新选择");
|
// throw new JeroBootException("部门和联络人匹配关系已存在,请重新选择");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
queryLawsContactManage.clear();
|
// queryLawsContactManage.clear();
|
||||||
queryLawsContactManage.eq(LawsContactManage::getContactId, lawsContactManage.getContactId());
|
// queryLawsContactManage.eq(LawsContactManage::getContactId, lawsContactManage.getContactId());
|
||||||
long n = count(queryLawsContactManage);
|
// long n = count(queryLawsContactManage);
|
||||||
if (n > 0) {
|
// if (n > 0) {
|
||||||
throw new JeroBootException("已存在相同的联络人");
|
// throw new JeroBootException("已存在相同的联络人");
|
||||||
}
|
// }
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
lawsContactManage.setCreateTime(now);
|
lawsContactManage.setCreateTime(now);
|
||||||
|
|||||||
Reference in New Issue
Block a user