| | |
| | | @PostMapping(value = "/dept/tree/auth") |
| | | @ManagerAuth |
| | | public R tree(@RequestParam(required = false, defaultValue = "") String condition) throws IOException, ClassNotFoundException { |
| | | ArrayList<Map> tree = treeUtils.getDeptTree(String.valueOf(getDeptId()), getHostId()); |
| | | ArrayList<Map<String, Object>> tree = treeUtils.getDeptTree(String.valueOf(getDeptId()), getHostId()); |
| | | // 深拷贝 |
| | | List<Map> result = ListUtils.deepCopy(tree); |
| | | List<Map<String, Object>> result = ListUtils.deepCopy(tree); |
| | | if (!Cools.isEmpty(condition)) { |
| | | treeUtils.remove(condition, result); |
| | | treeUtils.remove(condition, result); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @PostMapping(value = "/dept/user/tree/auth") |
| | | @ManagerAuth |
| | | public R deptUserTree(@RequestParam(required = false, defaultValue = "") String condition) throws IOException, ClassNotFoundException { |
| | | ArrayList<Map<String, Object>> tree = treeUtils.getDeptUserTree(String.valueOf(getDeptId()), getHostId()); |
| | | // 深拷贝 |
| | | List<Map<String, Object>> result = ListUtils.deepCopy(tree); |
| | | if (!Cools.isEmpty(condition)) { |
| | | treeUtils.remove(condition, result); |
| | | treeUtils.remove(condition, result); |