| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 查询部门树结构信息
|
| | | * |
| | | * @param dept 部门信息
|
| | | * @return 部门树信息集合
|
| | | */
|
| | | @Override
|
| | | public List<TreeSelect> selectDeptTreeList(SysDept dept)
|
| | | {
|
| | | List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
|
| | | return buildDeptTreeSelect(depts);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 构建前端所需要树结构
|
| | | *
|
| | | * @param depts 部门列表
|
| | |
| | | {
|
| | | tempList.add(dept.getDeptId());
|
| | | }
|
| | | for (SysDept dept : depts) {
|
| | | for (SysDept dept : depts)
|
| | | {
|
| | | // 如果是顶级节点, 遍历该父节点的所有子节点
|
| | | if (!tempList.contains(dept.getParentId())) {
|
| | | if (!tempList.contains(dept.getParentId()))
|
| | | {
|
| | | recursionFn(depts, dept);
|
| | | returnList.add(dept);
|
| | | }
|