From 8853292babb2ad94de4a3207966f1e83b767cd2d Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sun, 17 Sep 2023 16:38:34 +0800
Subject: [PATCH] 新增流程节点进程查询接口
---
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml b/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
index 69f49cf..b7eb9d0 100644
--- a/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
+++ b/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
@@ -86,9 +86,11 @@
FROM
sys_jurisdiction dept
WHERE dept.is_deleted = 0
- and dept.parent_id = #{param2}
<if test="param1!=null and param1!=''">
and dept.tenant_id = #{param1}
+ </if>
+ <if test="param2!=null and param2!=''">
+ and dept.parent_id = #{param2}
</if>
</select>
@@ -111,4 +113,27 @@
sys_jurisdiction dept
WHERE dept.is_deleted = 0
</select>
+
+ <select id="jurisdictionLazyTree" resultType="org.springblade.modules.system.node.TreeNode">
+ SELECT
+ sj.id,
+ sj.parent_id as parentId,
+ sj.dept_name AS name,
+ (
+ SELECT
+ CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+ FROM
+ sys_jurisdiction
+ WHERE
+ parent_id = sj.id and is_deleted = 0
+ ) AS "has_children"
+ FROM
+ sys_jurisdiction sj
+ WHERE sj.is_deleted = 0
+ </select>
+
+
+ <select id="selJur" resultType="java.lang.String">
+ SELECT id FROM sys_jurisdiction WHERE dept_name=#{deptname}
+ </select>
</mapper>
--
Gitblit v1.9.3