feat:[REQ-3488] 修复BUG

This commit is contained in:
liuyang 2025-02-19 16:43:01 +08:00
parent 56d2607fed
commit 3b4e363e61

View File

@ -105,15 +105,15 @@ public class CooperateShipFoundationServiceImpl implements CooperateShipFoundati
return;
}
Map<Long, OrgJobQueryRepository.JobResp> jobMap = CollStreamUtil.toMap(jobList, OrgJob::getId, Function.identity());
List<Long> excludeJobNodeIds = nodeUsers.stream().filter(t -> {
List<Long> includeJobNodeIds = nodeUsers.stream().filter(t -> {
OrgJobQueryRepository.JobResp job = jobMap.get(t.getOrganizationalJobId());
// 岗位不存在不做排除
if (job == null) {
return false;
return true;
}
return excludeJobCodes.contains(job.getCode());
return !excludeJobCodes.contains(job.getCode());
}).map(OrganizationalNodeUser::getTopNodeId).collect(Collectors.toList());
nodeIds.removeIf(excludeJobNodeIds::contains);
nodeIds.removeIf(t -> !includeJobNodeIds.contains(t));
}
// 删除原协同关系节点