| | |
| | | return buildDeptTreeSelect(depts); |
| | | } |
| | | |
| | | @Override |
| | | public List<TreeSelect> selectDeptTreeListNoDataScope(SysDept dept) { |
| | | List<SysDept> depts = deptMapper.selectDeptListNoDataScope(dept); |
| | | return buildDeptTreeSelect(depts); |
| | | } |
| | | |
| | | /** |
| | | * 构建前端所需要树结构 |
| | | * |
| | |
| | | @Override |
| | | public List<SysDept> allByUser(List<Long> deptList) { |
| | | QueryWrapper<SysDept> queryWrapper = new QueryWrapper(); |
| | | queryWrapper.in("dept_id",deptList); |
| | | queryWrapper.in("dept_id",deptList).eq("del_flag","0"); |
| | | return deptMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | |
| | | return returnList; |
| | | } |
| | | |
| | | @Override |
| | | public List<Long> selectDeptIdBySubAndUserId(Long deptId, String usersId) { |
| | | List<Long> deptIdList = new ArrayList(); |
| | | //本级及下属部门 |
| | | List<Long> ownAndSubDeptIdList = deptMapper.selectDeptIdBySub(deptId); |
| | | //自定义 |
| | | List<Long> roleDeptIdList = deptMapper.selectRoleDeptIdByUsersId(usersId); |
| | | //去重 |
| | | Set<Long> deptIdSet = new HashSet(); |
| | | deptIdSet.addAll(ownAndSubDeptIdList); |
| | | deptIdSet.addAll(roleDeptIdList); |
| | | deptIdList.addAll(deptIdSet); |
| | | return deptIdList; |
| | | } |
| | | |
| | | private void recursionFnDeptUserTree(List<DeptUserTree> list, DeptUserTree t) |
| | | { |
| | | // 得到子节点列表 |