feat(REQ-3714): 处理班组长提示
This commit is contained in:
parent
2ed02cd04c
commit
15648e026f
@ -231,10 +231,12 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
|
||||
}
|
||||
}
|
||||
|
||||
Set<Long> teamLeadPersonSet = new HashSet<>();
|
||||
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);
|
||||
addFailInfo(failInfoMap, e.getPersonId(), checkFailInfo);
|
||||
teamLeadPersonSet.add(e.getPersonId());
|
||||
});
|
||||
|
||||
// 判断小组长,小组长不允许删除
|
||||
@ -251,6 +253,10 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
|
||||
List<RoleUserResp> saasRoleUserInfo = roleUserGateway.pageAll(roleUserParam);
|
||||
saasRoleUserInfo = saasRoleUserInfo.stream().filter(e -> Objects.nonNull(e.getRole())).collect(Collectors.toList());
|
||||
saasRoleUserInfo.forEach(e -> {
|
||||
// 班组长不用校验,因为班组长也会有管理员角色
|
||||
if (teamLeadPersonSet.contains(e.getPersonId())) {
|
||||
return;
|
||||
}
|
||||
Optional<RoleTypeEnum> roleTypeEnumOptional = RoleTypeEnum.fromValue(e.getRole().getRoleType());
|
||||
RoleTypeEnum roleTypeEnum = RoleTypeEnum.AUTO_OWN;
|
||||
if (roleTypeEnumOptional.isPresent()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user