From d5dfa0ea027ee9f09ffd22911f74e859b97bc4d4 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 02 三月 2021 08:19:02 +0800
Subject: [PATCH] #

---
 src/main/java/zy/cloud/wms/manager/controller/NodeController.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/main/java/zy/cloud/wms/manager/controller/NodeController.java b/src/main/java/zy/cloud/wms/manager/controller/NodeController.java
index 1a60a4a..c2ed398 100644
--- a/src/main/java/zy/cloud/wms/manager/controller/NodeController.java
+++ b/src/main/java/zy/cloud/wms/manager/controller/NodeController.java
@@ -12,11 +12,14 @@
 import com.core.common.R;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import zy.cloud.wms.common.utils.ListUtils;
+import zy.cloud.wms.common.utils.TreeUtils;
 import zy.cloud.wms.common.web.BaseController;
 import zy.cloud.wms.manager.entity.Node;
 import zy.cloud.wms.manager.service.NodeService;
 import zy.cloud.wms.manager.utils.NodeUtils;
 
+import java.io.IOException;
 import java.util.*;
 
 @RestController
@@ -24,6 +27,8 @@
 
     @Autowired
     private NodeService nodeService;
+    @Autowired
+    private TreeUtils treeUtils;
 
     @RequestMapping(value = "/node/{id}/auth")
     @ManagerAuth
@@ -175,4 +180,18 @@
         return R.ok().add(result);
     }
 
+    @PostMapping(value = "/node/tree/auth")
+    @ManagerAuth
+    public R tree(@RequestParam(required = false, defaultValue = "") String condition) throws IOException, ClassNotFoundException {
+        ArrayList<Map> tree = treeUtils.getNodeTree(String.valueOf(getOriginNode().getId()));
+        // 娣辨嫹璐�
+        List<Map> result = ListUtils.deepCopy(tree);
+        if (!Cools.isEmpty(condition)) {
+            treeUtils.remove(condition, result);
+            treeUtils.remove(condition, result);
+        }
+        return R.ok(result);
+    }
+
+
 }

--
Gitblit v1.9.1