|
|
|
@ -141,6 +141,11 @@ public class DeptServiceImpl implements IDeptService |
|
|
|
{ |
|
|
|
List<Dept> deptList = deptMapper.selectDeptList(dept); |
|
|
|
List<Ztree> ztrees = initZtree(deptList); |
|
|
|
ztrees = getZtrees(ztrees); |
|
|
|
return ztrees; |
|
|
|
} |
|
|
|
|
|
|
|
private List<Ztree> getZtrees(List<Ztree> ztrees) { |
|
|
|
if (CollectionUtils.isNotEmpty(ztrees)) { |
|
|
|
//拿到深圳市
|
|
|
|
Ztree ztree = new Ztree(); |
|
|
|
@ -194,9 +199,9 @@ public class DeptServiceImpl implements IDeptService |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return ztrees; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<Ztree> selectDeptTreeNotRole(Dept dept) |
|
|
|
{ |
|
|
|
@ -216,7 +221,9 @@ public class DeptServiceImpl implements IDeptService |
|
|
|
{ |
|
|
|
Long roleId = role.getRoleId(); |
|
|
|
List<Ztree> ztrees = new ArrayList<Ztree>(); |
|
|
|
List<Dept> deptList = selectDeptList(new Dept()); |
|
|
|
Dept dept = new Dept(); |
|
|
|
dept.setZoneList(role.getZoneList()); |
|
|
|
List<Dept> deptList = selectDeptList(dept); |
|
|
|
if (StringUtils.isNotNull(roleId)) |
|
|
|
{ |
|
|
|
List<String> roleDeptList = deptMapper.selectRoleDeptTree(roleId); |
|
|
|
@ -226,6 +233,9 @@ public class DeptServiceImpl implements IDeptService |
|
|
|
{ |
|
|
|
ztrees = initZtree(deptList); |
|
|
|
} |
|
|
|
if (CollectionUtils.isNotEmpty(role.getZoneList())) { |
|
|
|
ztrees = getZtrees(ztrees); |
|
|
|
} |
|
|
|
return ztrees; |
|
|
|
} |
|
|
|
|
|
|
|
|