From fffffbf5f498e2aff538fca3b4c2393d8716bdbd Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期二, 01 九月 2026 17:59:24 +0800
Subject: [PATCH] 【丽水】人工无-3已领取状态(service_subtask_preachform.sendstate = 3)

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

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 1718d66..08677d9 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
@@ -3,6 +3,10 @@
 import java.util.*;
 import java.util.stream.Collectors;
 
+import cn.hutool.core.lang.tree.TreeUtil;
+import com.ruoyi.common.core.domain.entity.SysUserDept;
+import com.ruoyi.common.utils.TreeUtils;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -315,4 +319,14 @@
     private boolean hasChild(List<SysDept> list, SysDept t) {
         return getChildList(list, t).size() > 0;
     }
+
+
+    public List<SysDept> selectLeafSysDeptListBySysUserDept(SysUserDept sysUserDept){
+        List<SysDept> list =  deptMapper.selectSysDeptListBySysUserDept(sysUserDept);
+        if(CollectionUtils.isNotEmpty(list)){
+            List<SysDept> tree = TreeUtils.buildDeptTree(list);
+            list = TreeUtils.getLeafDepts(tree);
+        }
+        return list;
+    }
 }

--
Gitblit v1.9.3