编辑组时权限里面单独加绩效管理人员时,导致前端展示不一致问题
This commit is contained in:
parent
c2ba51d97b
commit
c7f2afdbfa
@ -71,8 +71,9 @@ public interface StaffRoleService extends IService<StaffRole> {
|
|||||||
List<StaffRole> selectAllGroupManageRoles();
|
List<StaffRole> selectAllGroupManageRoles();
|
||||||
|
|
||||||
List<StaffRole> selectAllStaffRoleByDepartmentLevel(List<String> asList);
|
List<StaffRole> selectAllStaffRoleByDepartmentLevel(List<String> asList);
|
||||||
|
//获取指定组的请按不管理人员
|
||||||
List<StaffRole> selectByEvaluationGroupId(Long id);
|
List<StaffRole> selectByEvaluationGroupId(Long id);
|
||||||
|
|
||||||
StaffRole selectStaffRolesByStaffIdDepartmentLevelList(Long loginUserId, List<String> asList);
|
StaffRole selectStaffRolesByStaffIdDepartmentLevelList(Long loginUserId, List<String> asList);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2,6 +2,7 @@ package com.lz.modules.performance.controller;
|
|||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.google.common.base.Joiner;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.R;
|
import com.lz.common.utils.R;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
@ -91,9 +92,35 @@ public class EvaluationGroupController extends AbstractController {
|
|||||||
return Long.parseLong(s);
|
return Long.parseLong(s);
|
||||||
}
|
}
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
//下面的操作是防止在权限里面单独加绩效管理人员时,导致前端展示不一致问题
|
||||||
|
//搜索管理表里面的人员去重
|
||||||
|
List<StaffRole> staffRoles = staffRoleService.selectAllGroupManageRoles();
|
||||||
|
if(staffRoles.size() > 0){
|
||||||
|
List<Long> roleIds = staffRoles.stream().map(new Function<StaffRole, Long>() {
|
||||||
|
@Override
|
||||||
|
public Long apply(StaffRole staffRole) {
|
||||||
|
return staffRole.getStaffId();
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
ids.addAll(roleIds);
|
||||||
|
}
|
||||||
|
//获取管理特定组的
|
||||||
|
staffRoles = staffRoleService.selectByEvaluationGroupId(evaluationGroup.getId());
|
||||||
|
if(staffRoles.size() > 0){
|
||||||
|
List<Long> roleIds = staffRoles.stream().map(new Function<StaffRole, Long>() {
|
||||||
|
@Override
|
||||||
|
public Long apply(StaffRole staffRole) {
|
||||||
|
return staffRole.getStaffId();
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
ids.addAll(roleIds);
|
||||||
|
}
|
||||||
|
//去重
|
||||||
|
Map<Long, Long> mapIds = ids.stream().collect(Collectors.toMap(Long::longValue,Function.identity(), (e, r) -> e));
|
||||||
|
ids = mapIds.values().stream().collect(Collectors.toList());
|
||||||
//指定人员,搜索人员信息
|
//指定人员,搜索人员信息
|
||||||
List<StaffSimpleDto> staffSimpleDtos = staffService.selectStaffSimpleInfoByIds(ids);
|
List<StaffSimpleDto> staffSimpleDtos = staffService.selectStaffSimpleInfoByIds(ids);
|
||||||
|
|
||||||
evaluationGroupDto.setManagers(staffSimpleDtos);
|
evaluationGroupDto.setManagers(staffSimpleDtos);
|
||||||
}
|
}
|
||||||
if(evaluationGroup.getOutIds() != null && evaluationGroup.getOutIds().length() > 0){
|
if(evaluationGroup.getOutIds() != null && evaluationGroup.getOutIds().length() > 0){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user