feat(REQ-3714): 处理组织权限查询
This commit is contained in:
parent
cae7d05157
commit
35bca70644
@ -189,9 +189,7 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
|
||||
List<BatchDeleteNodeUserCheckResp> resultList = new ArrayList<>();
|
||||
Map<Long, List<BatchDeleteNodeUserCheckResp.CheckFailInfo>> failInfoMap = new HashMap<>();
|
||||
ListOrgCooperateShipReq listOrgCooperateShipReq = new ListOrgCooperateShipReq();
|
||||
if (NumberUtil.isPositiveNumber(req.getNodeId())) {
|
||||
listOrgCooperateShipReq.setOuIds(Collections.singleton(req.getOuId()));
|
||||
}
|
||||
listOrgCooperateShipReq.setOuIds(Collections.singleton(req.getOuId()));
|
||||
listOrgCooperateShipReq.setWorkspaceIds(Collections.singleton(req.getWorkspaceId()));
|
||||
listOrgCooperateShipReq.setStatuses(CollUtil.newHashSet(0, 1));
|
||||
List<OrgCooperateShipDTO> cooperateShipRespList = cooperateShipService.list(listOrgCooperateShipReq);
|
||||
@ -223,6 +221,16 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
|
||||
transformFailMap(failInfoMap, resultList);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
Set<Long> inJurisdictionPersonIds = nodeUsers.stream().map(NodeUserDTO::getPersonId).collect(Collectors.toSet());
|
||||
for (Long reqPersonIds : req.getPersonIds()) {
|
||||
if (!inJurisdictionPersonIds.contains(reqPersonIds)) {
|
||||
BatchDeleteNodeUserCheckResp.CheckFailInfo checkFailInfo = new BatchDeleteNodeUserCheckResp.CheckFailInfo();
|
||||
checkFailInfo.setType(CheckInfoTypeEnum.NOT_IN_JURISDICTION);
|
||||
addFailInfo(failInfoMap, reqPersonIds, checkFailInfo);
|
||||
}
|
||||
}
|
||||
|
||||
nodeUsers.stream().filter(e -> e.getIdentityType().equals(IdentityType.WORKER_LEADER.getCode())).findAny().ifPresent(e -> {
|
||||
BatchDeleteNodeUserCheckResp.CheckFailInfo checkFailInfo = new BatchDeleteNodeUserCheckResp.CheckFailInfo();
|
||||
checkFailInfo.setType(CheckInfoTypeEnum.TEAM_LEADER);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user