This commit is contained in:
杜建超 2020-11-25 14:17:22 +08:00
parent 6540811216
commit e8d2155210

View File

@ -103,8 +103,17 @@ public class AssessServiceImpl implements AssessService {
public List<String> roleDepartments(Long staffId) {
StaffRole staffRole = staffRoleService.selectByStaffId(staffId);
if(staffRole == null){
log.info("staffRole 为空");
return Collections.EMPTY_LIST;
log.info("staffRole 为空,不存在次人员权限配置信息staffId" + staffId);
//判断是否是领导
DepartmentsStaffRelateEntity entity = departmentsStaffRelateService.selectByStaffId(staffId);
if(entity == null || 0 == entity.getIsLeader()){
log.info("非 leader,此人员无管理部门权限");
return Collections.EMPTY_LIST;
}
List<String> depIds = staffService.selectAllDeparmentIdsByDepartmentParentId(entity.getDepartmentId());
log.info("获取部门领导管理部门ids: " + JSON.toJSONString(depIds));
return depIds;
}
log.info("获取 roleDepartment,staffRole: " + JSON.toJSONString(staffRole));
// 0 标识全部部门