From e12a3875f9b1b0a5226786f616871e390e39f326 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期日, 16 三月 2025 20:36:35 +0800
Subject: [PATCH] 修改全局人员查询

---
 ruoyi-system/src/main/resources/mapper/system/UserMapper.xml |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/UserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UserMapper.xml
index 922251a..f16af39 100644
--- a/ruoyi-system/src/main/resources/mapper/system/UserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/UserMapper.xml
@@ -24,7 +24,8 @@
         company,
         is_custom
         from user
-        where del_flag = '0') a
+        where del_flag = '0'
+        and id != ) a
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
         </if>
@@ -60,4 +61,38 @@
                  left join custom c on u.company = c.id
         where u.id = #{userId}
     </select>
+
+    <!-- 鑾峰彇妫�娴嬩汉鍛樹俊鎭� -->
+    <select id="selectQualityUserList" resultType="com.ruoyi.common.core.domain.entity.User">
+        select u1.id,
+               u1.account,
+               u1.name,
+               u1.age,
+               u1.email,
+               u1.phone,
+               u1.company,
+               u1.is_custom,
+               u1.signature_url,
+               u1.picture_url,
+               u1.name_en,
+               u1.depart_lims_id
+        from user u1
+                 left join sys_user_role sur on sur.user_id = u1.id
+        where sur.role_id not in (1, 15, 16, 17)
+          and u1.status = '0'
+        group by u1.id
+    </select>
+
+    <!-- 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛閮ㄩ棬涓嬬殑鎵�鏈夌敤鎴� -->
+    <select id="selectDepartmentLimsUserList" resultType="com.ruoyi.common.core.domain.entity.User">
+        select id,
+               account,
+               name,
+               name_en
+        from user u
+        where depart_lims_id = (select u2.depart_lims_id
+                                from user u2
+                                where u2.id = #{userId})
+    </select>
+
 </mapper>

--
Gitblit v1.9.3