From 774ac43c47d82d2b581c2c846a1dfc7b9ec46e64 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 25 Feb 2026 16:08:11 +0800
Subject: [PATCH] 机构,角色,用户 新增 sysType 字段
---
drone-service/drone-system/src/main/java/org/sxkj/system/mapper/DeptMapper.xml | 68 ++++++++++++++++++++++++++++++++++
1 files changed, 68 insertions(+), 0 deletions(-)
diff --git a/drone-service/drone-system/src/main/java/org/sxkj/system/mapper/DeptMapper.xml b/drone-service/drone-system/src/main/java/org/sxkj/system/mapper/DeptMapper.xml
index 3e97a06..07c77fd 100644
--- a/drone-service/drone-system/src/main/java/org/sxkj/system/mapper/DeptMapper.xml
+++ b/drone-service/drone-system/src/main/java/org/sxkj/system/mapper/DeptMapper.xml
@@ -80,6 +80,9 @@
<if test="_parameter!=null and _parameter!=''">
and tenant_id = #{_parameter}
</if>
+ <if test="param2!=null and param2!=''">
+ and sys_type = #{param2}
+ </if>
ORDER BY sort
</select>
@@ -276,6 +279,71 @@
AND r.code = #{areaCode}
</select>
+ <select id="selectDeptPage" resultType="org.sxkj.system.vo.DeptVO">
+ SELECT
+ bd.*,
+ br.name AS area_name
+ FROM
+ blade_dept bd LEFT JOIN blade_region br ON br.code = bd.area_code
+ WHERE
+ bd.is_deleted = 0
+ <if test="param2.deptName!=null and param2.deptName!=''">
+ and bd.dept_name like concat(concat('%', #{param2.deptName}),'%')
+ </if>
+ <if test="param2.areaCode!=null and param2.areaCode!=''">
+ and bd.area_code like concat(concat('%', #{param2.areaCode}),'%')
+ </if>
+ <if test="param2.deptCode!=null and param2.deptCode!=''">
+ and bd.dept_code = #{param2.deptCode}
+ </if>
+ ORDER BY bd.create_time DESC
+ </select>
+
+ <select id="exportDept" resultType="org.sxkj.system.excel.DeptExcel">
+ SELECT
+ bd.*,
+ br.name AS area_name
+ FROM
+ blade_dept bd
+ LEFT JOIN
+ blade_region br ON br.code = bd.area_code
+ WHERE
+ bd.is_deleted = 0
+ <if test="deptName!=null and deptName!=''">
+ and bd.dept_name like concat(concat('%', #{deptName}),'%')
+ </if>
+ <if test="fullName!=null and fullName!=''">
+ and bd.full_name like concat(concat('%', #{fullName}),'%')
+ </if>
+ <if test="areaCode!=null and areaCode!=''">
+ and bd.area_code = #{areaCode}
+ </if>
+ <if test="deptIds!=null and deptIds.size()>0">
+ and bd.id in
+ <foreach item="item" index="index" collection="deptIds" open="(" separator="," close=")">
+ #{item}
+ </foreach>
+ </if>
+ </select>
+
+ <!--获取部门详情(包含区域名称)-->
+ <select id="getDetailWithAreaName" resultType="org.sxkj.system.vo.DeptVO">
+ SELECT
+ bd.*,
+ br.name AS area_name
+ FROM
+ blade_dept bd
+ LEFT JOIN
+ blade_region br ON br.code = bd.area_code
+ WHERE
+ bd.is_deleted = 0
+ <if test="dept.id!=null">
+ and bd.id = #{dept.id}
+ </if>
+ <if test="dept.deptCode!=null and dept.deptCode!=''">
+ and bd.dept_code = #{dept.deptCode}
+ </if>
+ </select>
</mapper>
--
Gitblit v1.9.3