diff --git a/src/main/java/com/lz/modules/performance/service/impl/AssessServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/AssessServiceImpl.java index a7f404ec..6421ba46 100644 --- a/src/main/java/com/lz/modules/performance/service/impl/AssessServiceImpl.java +++ b/src/main/java/com/lz/modules/performance/service/impl/AssessServiceImpl.java @@ -103,8 +103,17 @@ public class AssessServiceImpl implements AssessService { public List 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 depIds = staffService.selectAllDeparmentIdsByDepartmentParentId(entity.getDepartmentId()); + log.info("获取部门领导管理部门ids: " + JSON.toJSONString(depIds)); + return depIds; } log.info("获取 roleDepartment,staffRole: " + JSON.toJSONString(staffRole)); // 0 标识全部部门