From c16a867c943e25a25d64f02fb95e755ef1a7c9f9 Mon Sep 17 00:00:00 2001
From: liyj <15602261488@163.com>
Date: Mon, 30 Sep 2024 18:03:25 +0800
Subject: [PATCH] 1、审核过程中申请记录的申请时间和申请人无法查看 2、审核联合处置申请在申请部门已办结后会报错,且无法继续审核 3、案件不予受理后在已办中无记录 4、上报的案件上级部门回退后下级部门接收不到 5、广州市综治中心纠纷依然可以选择上报,且点击上报后报错

---
 dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml
index 00e5dba..c42ddef 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml
@@ -351,4 +351,37 @@
         set target_unit_name = #{unitName}
         where target_unit_id = #{unitId}
     </update>
+
+    <!-- 查询某一单位下下一级所有管辖单位-->
+    <select id="listAllChild" resultMap="dataResult">
+        WITH RECURSIVE unit_hierarchy(id, parent_id, name) AS (
+        -- 锚成员 (起始点)
+        SELECT
+        id ,
+        parent_id,
+        unit_name
+        FROM
+        dyh_ct_unit
+        WHERE
+        id = #{unitId}
+
+        UNION ALL
+
+        -- 递归成员
+        SELECT
+        u.id,
+        u.parent_id,
+        u.unit_name
+        FROM
+        dyh_ct_unit u
+        JOIN
+        unit_hierarchy h ON u.parent_id = h.id where u.delete_status = 0
+        )
+        SELECT
+        id AS id,
+        parent_id AS parent_id,
+        name AS unit_name
+        FROM
+        unit_hierarchy;
+    </select>
 </mapper> 
\ No newline at end of file

--
Gitblit v1.8.0