From 5734b7e1c2fb6e64ddc5956b84c5a125a8c1ea0e Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 20 十月 2026 14:34:03 +0800
Subject: [PATCH] feat(order): 增加直绑模板下单标准库绑定与设备初始化
---
ruoyi-system/src/main/resources/mapper/system/UserMapper.xml | 46 +++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/UserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UserMapper.xml
index e3a4e6e..7075623 100644
--- a/ruoyi-system/src/main/resources/mapper/system/UserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/UserMapper.xml
@@ -83,6 +83,29 @@
group by u1.id
</select>
+ <!-- 鑾峰彇妫�娴嬪憳瑙掕壊浜哄憳淇℃伅 -->
+ <select id="selectInspectorUserList" resultType="com.ruoyi.common.core.domain.entity.User">
+ select u1.id,
+ u1.account,
+ u1.name,
+ u1.name_en,
+ u1.email,
+ u1.phone,
+ u1.company,
+ u1.is_custom,
+ u1.signature_url,
+ u1.picture_url,
+ u1.depart_lims_id
+ from user u1
+ left join sys_user_role sur on sur.user_id = u1.id
+ left join sys_role r on r.role_id = sur.role_id and r.role_name = '妫�娴嬪憳'
+ where r.role_id is not null
+ and u1.status = '0'
+ and u1.del_flag = '0'
+ and u1.id != 1
+ group by u1.id
+ </select>
+
<!-- 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛閮ㄩ棬涓嬬殑鎵�鏈夌敤鎴� -->
<select id="selectDepartmentLimsUserList" resultType="com.ruoyi.common.core.domain.entity.User">
select id,
@@ -91,11 +114,24 @@
name_en,
status
from user u
- where depart_lims_id is not null
- and depart_lims_id != ''
- and depart_lims_id = (select u2.depart_lims_id
- from user u2
- where u2.id = #{userId})
+ where (
+ (depart_lims_id is not null
+ and depart_lims_id != ''
+ and depart_lims_id = (select u2.depart_lims_id
+ from user u2
+ where u2.id = #{userId}))
+ or
+ (
+ ((select u3.depart_lims_id
+ from user u3
+ where u3.id = #{userId}) is null
+ or (select u3.depart_lims_id
+ from user u3
+ where u3.id = #{userId}) = '')
+ and u.status = '0'
+ and u.del_flag = '0'
+ )
+ )
</select>
</mapper>
--
Gitblit v1.9.3