From bc999a5035706c0cf5e559e69a177a9c9a88a438 Mon Sep 17 00:00:00 2001 From: zhanghonghao Date: Mon, 17 Mar 2025 10:48:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(REQ-3714):=20=E8=B0=83=E6=95=B4=E7=8F=AD?= =?UTF-8?q?=E7=BB=84=E9=95=BF=E5=88=A4=E6=96=AD=E9=A1=BA=E5=BA=8F=EF=BC=8C?= =?UTF-8?q?=E5=92=8C=E5=BD=93=E5=89=8D=E4=BA=BA=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/NodeUserCheckServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/orgmanax-server/src/main/java/cn/axzo/orgmanax/server/nodeuser/service/impl/NodeUserCheckServiceImpl.java b/orgmanax-server/src/main/java/cn/axzo/orgmanax/server/nodeuser/service/impl/NodeUserCheckServiceImpl.java index 3ca98dc..d511b84 100644 --- a/orgmanax-server/src/main/java/cn/axzo/orgmanax/server/nodeuser/service/impl/NodeUserCheckServiceImpl.java +++ b/orgmanax-server/src/main/java/cn/axzo/orgmanax/server/nodeuser/service/impl/NodeUserCheckServiceImpl.java @@ -350,7 +350,7 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService { private void checkPermission(List nodeUsers, Long personId, Set nodePersonIds) { if (CollUtil.isEmpty(nodeUsers)) { - if (nodePersonIds.size() == 1 && Objects.equals(personId, nodePersonIds.stream().findFirst().orElse(null))) { + if (nodePersonIds.size() == 1 && nodePersonIds.contains(personId)) { throw ResultCode.INVALID_PARAMS.toException("你已被移除当前项目,请刷新后重试当前操作!"); } } @@ -450,12 +450,6 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService { // 否则,自己下级小组,也可以。 boolean isGroup = target.getNode() != null && Objects.equals(target.getNode().getNodeType(), NodeTypeEnum.PROJECT_GROUP.getCode()); - if (!isGroup) { - BatchDeleteNodeUserCheckResp.CheckFailInfo checkFailInfo = new BatchDeleteNodeUserCheckResp.CheckFailInfo(); - checkFailInfo.setType(CheckInfoTypeEnum.NOT_IN_JURISDICTION); - addFailInfo(failInfoMap, target.getPersonId(), checkFailInfo); - return; - } if (isPractitioner(target)) { BatchDeleteNodeUserCheckResp.CheckFailInfo checkFailInfo = new BatchDeleteNodeUserCheckResp.CheckFailInfo(); checkFailInfo.setType(CheckInfoTypeEnum.ANY_ADMIN); @@ -466,6 +460,12 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService { if (isSameTeam) { return; } + if (!isGroup) { + BatchDeleteNodeUserCheckResp.CheckFailInfo checkFailInfo = new BatchDeleteNodeUserCheckResp.CheckFailInfo(); + checkFailInfo.setType(CheckInfoTypeEnum.NOT_IN_JURISDICTION); + addFailInfo(failInfoMap, target.getPersonId(), checkFailInfo); + return; + } Long belongProjectTeamNodeId = resolveProjectTeamNodeId(target.getOrganizationalNodeId()); if (Objects.equals(belongProjectTeamNodeId, operator.getOrganizationalNodeId())) {