feat(REQ-3714): 处理job为空的情况

This commit is contained in:
zhanghonghao 2025-03-12 14:08:10 +08:00
parent 90ff9f1f70
commit 89f2f81692

View File

@ -135,7 +135,10 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
List<NodeUserDTO> organizationalNodeUserList = nodeUserService.list(nodeUserQueryVO); List<NodeUserDTO> organizationalNodeUserList = nodeUserService.list(nodeUserQueryVO);
Set<Long> teamLeader = Sets.newHashSet(); Set<Long> teamLeader = Sets.newHashSet();
organizationalNodeUserList.forEach(organizationalNodeUserVO -> { organizationalNodeUserList.forEach(organizationalNodeUserVO -> {
if (IdentityTypeEnum.WORKER_LEADER.getCode().equals(organizationalNodeUserVO.getIdentityType()) || entTeamLeader.equals(organizationalNodeUserVO.getJob().getCode())) { if (IdentityTypeEnum.WORKER_LEADER.getCode().equals(organizationalNodeUserVO.getIdentityType())) {
teamLeader.add(organizationalNodeUserVO.getPersonId());
}
if (Objects.nonNull(organizationalNodeUserVO.getJob()) && entTeamLeader.equals(organizationalNodeUserVO.getJob().getCode())) {
teamLeader.add(organizationalNodeUserVO.getPersonId()); teamLeader.add(organizationalNodeUserVO.getPersonId());
} }
}); });
@ -471,7 +474,7 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
if (Objects.equals(nodeUser.getIdentityType(), IdentityType.PRACTITIONER.getCode())) { if (Objects.equals(nodeUser.getIdentityType(), IdentityType.PRACTITIONER.getCode())) {
return 20; return 20;
} }
if (StrUtil.isBlank(nodeUser.getJob().getCode())) { if (Objects.isNull(nodeUser.getJob()) || StrUtil.isBlank(nodeUser.getJob().getCode())) {
return 9999; return 9999;
} }
switch (nodeUser.getJob().getCode()) { switch (nodeUser.getJob().getCode()) {