From 57af844cb484b49fed612adbb35f388b1831aef2 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sun, 14 Nov 2021 22:24:28 +0800
Subject: [PATCH] 成绩审查查询修改

---
 src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
index be0d9ab..a0ba9b0 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -100,6 +100,9 @@
         <if test="param1!=null and param1!=''">
             and dept.tenant_id = #{param1}
         </if>
+        <if test="param3!=null">
+            and dept.dept_category = #{param3}
+        </if>
         ORDER BY dept.sort
     </select>
 
@@ -152,7 +155,7 @@
             sj.id = si.jurisdiction
             WHERE
             1=1
-            and si.stats != 4
+            and si.stats != 3
             AND dept.is_deleted = 0
             <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
                 and (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction})
@@ -727,4 +730,28 @@
         where bu.id = #{param1}
     </select>
 
+    <!--查所有公安局数据 tree -->
+    <select id="lazyTreeByJurisdiction" resultMap="treeNodeResultMap" >
+        SELECT
+        dept.id,
+        dept.parent_id,
+        dept.dept_name AS title,
+        dept.id AS "value",
+        dept.id AS "key",
+        (
+        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
+        left join
+        blade_dept dept
+        on
+        sj.dept_name = dept.dept_name
+    </select>
+
 </mapper>

--
Gitblit v1.9.3