From 5cceb01ea15fa807ebe0011c5b38780cb3e3e2c3 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 12 Nov 2021 23:50:26 +0800
Subject: [PATCH] 部门数菜单修改,考试审核修改
---
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 107 insertions(+), 8 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 0278850..16728bc 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>
@@ -117,7 +120,11 @@
blade_dept
where is_deleted = 0
and
- (id = 1413470343230877697 or id = 1425366663452196865 or id = 1418458374477549569 or id = 1420222768149966850)
+ (id = 1413470343230877697
+ or id = 1425366663452196865
+ or id = 1418458374477549569
+ or id = 1420222768149966850
+ or id = 1426354978959691778)
)
union
(
@@ -142,17 +149,16 @@
sys_information si
on
si.departmentid = dept.id
+ left join
+ sys_jurisdiction sj
+ on
+ sj.id = si.jurisdiction
WHERE
1=1
and si.stats != 4
AND dept.is_deleted = 0
- and dept.id !=1420222961377357825
- and dept.parent_id!=1420222961377357825
- and dept.parent_id!=1425365577303621633
- and dept.id != 1425365577303621633
- and dept.id != 1432625856013971457
- <if test="param1!=null and param1!='' and param1!='1372091709474910209'">
- and si.jurisdiction = #{param1}
+ <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
+ and (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction})
</if>
)
</select>
@@ -655,4 +661,97 @@
and (sj.id = #{param1} or sj.parent_id = #{param1})
</if>
</select>
+
+ <!--查询树菜单,区以下-->
+ <select id="lazyTreeCity" resultMap="treeNodeResultMap" >
+ (SELECT
+ id,
+ parent_id,
+ dept_name AS title,
+ id AS "value",
+ id AS "key",
+ 1 AS "has_children"
+ from blade_dept
+ where id = #{param2})
+
+ union
+ (
+ 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
+ blade_dept
+ WHERE
+ parent_id = dept.id and is_deleted = 0
+ ) AS "has_children"
+ FROM
+ blade_dept dept
+ WHERE
+ dept.is_deleted = 0
+ <if test="param2!=null and param2!=0">
+ and dept.parent_id = #{param2}
+ </if>
+ <if test="param1!=null and param1!=''">
+ and dept.tenant_id = #{param1}
+ </if>
+ )
+ </select>
+
+ <!--查询树菜单,区以下-->
+ <select id="lazyTreeCityOne" resultMap="treeNodeResultMap" >
+ SELECT
+ id,
+ parent_id,
+ dept_name AS title,
+ id AS "value",
+ id AS "key",
+ 0 AS "has_children"
+ from blade_dept
+ where id = #{param2}
+ </select>
+
+ <!--查询用户信息-->
+ <select id="getUserInfoById" resultType="org.springblade.modules.system.vo.UserVO">
+ select bu.*,bd.dept_name deptName,br.role_alias roleAlias from blade_user bu
+ left join
+ blade_dept bd
+ on
+ bu.dept_id = bd.id
+ left join
+ blade_role br
+ on
+ br.id = bu.role_id
+ 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