From 39a88b3fd870ad8a65f356561b42d465c4f2fc42 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期二, 26 九月 2023 09:35:28 +0800
Subject: [PATCH] 设备健康列表

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java |   14 ++++++++------
 ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java         |    2 +-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java b/ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java
index f844901..6637e42 100644
--- a/ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java
+++ b/ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java
@@ -164,7 +164,7 @@
                                     //濡傛灉璇ョ埗绫婚泦鍚堝湪缁撴瀯涓凡缁忓瓨鍦ㄥ苟涓斾笉鏄澶囨暟鎹氨涓嶇敤閲嶅娣诲姞浜�
                                     Long treeId = treeDeptWells.get(l).getDeptId();
                                     Integer id = treeDeptWells.get(l).getId();
-                                    if(ancestor.equals(treeId)){
+                                    if(ancestor.equals(treeId) && id==null){
                                         wellTrue = true;
                                     }
                                 }
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
index 85bdae2..0d33856 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
@@ -397,13 +397,15 @@
     private void recursionFnWell(List<TreeDeptWell> list, TreeDeptWell t)
     {
         // 寰楀埌瀛愯妭鐐瑰垪琛�
-        List<TreeDeptWell> childList = getChildListWell(list, t);
-        t.setChildren(childList);
-        for (TreeDeptWell tChild : childList)
-        {
-            if (hasChildWell(list, tChild))
+        if(t.getId() == null){
+            List<TreeDeptWell> childList = getChildListWell(list, t);
+            t.setChildren(childList);
+            for (TreeDeptWell tChild : childList)
             {
-                recursionFnWell(list, tChild);
+                if (hasChildWell(list, tChild))
+                {
+                    recursionFnWell(list, tChild);
+                }
             }
         }
     }

--
Gitblit v1.9.3