中扬CRM客户关系管理系统
#
luxiaotao1123
2022-09-18 6d020dc1be28c495510c6bf0344b1b183dfc9e4a
src/main/java/com/zy/crm/system/controller/DeptController.java
@@ -172,9 +172,22 @@
    @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);