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())) {