| | |
| | | public Long getCheckDeptIdByLoginDeptId(Long deptId) |
| | | { |
| | | SysDept loginDept = selectDeptById(deptId); |
| | | if (loginDept.getParentId()==100){ |
| | | if (loginDept.getDeptId()==100 || loginDept.getParentId()==100){ |
| | | return loginDept.getDeptId(); |
| | | } else { |
| | | return getCheckDeptIdByLoginDeptId(loginDept.getParentId()); |
| | |
| | | * @return names列表 |
| | | */ |
| | | public List<String> getAncestorsNames(long deptId, List<String> names) { |
| | | SysDept dept = this.getById(deptId); |
| | | SysDept dept = deptMapper.selectDeptById(deptId); |
| | | if (dept == null) { |
| | | return new ArrayList<>(); |
| | | return names; |
| | | } |
| | | if (deptId == 100) { |
| | | names.add(dept.getDeptName()); |
| | | return names; |
| | | } |
| | | if (dept.getParentId() != null && dept.getParentId() == 100) { |
| | | names.add(dept.getDeptName()); |