feat(REQ-3714): 人员不在管辖范围

This commit is contained in:
zhanghonghao 2025-03-12 10:24:37 +08:00
parent 2ad2378ab1
commit 8e111ebbae

View File

@ -317,10 +317,16 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
}
private void checkPermission(List<NodeUserDTO> nodeUsers, Long personId, Map<Long, List<BatchDeleteNodeUserCheckResp.CheckFailInfo>> failInfoMap) {
if (CollUtil.isEmpty(nodeUsers)
|| nodeUsers.stream().noneMatch(e -> Objects.equals(e.getPersonId(), personId))) {
if (CollUtil.isEmpty(nodeUsers)) {
throw ResultCode.INVALID_PARAMS.toException("你已被移除当前项目,请刷新后重试当前操作!");
}
if (nodeUsers.stream().noneMatch(e -> Objects.equals(e.getPersonId(), personId))) {
nodeUsers.forEach(e -> {
BatchDeleteNodeUserCheckResp.CheckFailInfo checkFailInfo = new BatchDeleteNodeUserCheckResp.CheckFailInfo();
checkFailInfo.setType(CheckInfoTypeEnum.NOT_IN_JURISDICTION);
addFailInfo(failInfoMap, e.getPersonId(), checkFailInfo);
});
}
}
private List<Long> getSpecialRole() {