From 53a8a9426f21c7f853c406e462486029c78018b2 Mon Sep 17 00:00:00 2001 From: zhangnaisong <2434969829@qq.com> Date: 星期六, 03 八月 2024 09:33:08 +0800 Subject: [PATCH] 电磁锁临时电子围栏加入主动操控失效提交 --- ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index ab32a54..e794039 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -343,7 +343,7 @@ </foreach> </select> - <select id="getOwnAndChildrenSoilderList" resultMap="SysUserOnlyResult"> + <select id="getOwnAndChildrenOnlineSoilderList" resultMap="SysUserOnlyResult"> select distinct su.user_id,su.dept_id,su.user_name, concat(su.nick_name,'(',sd.dept_name,')') as nick_name from sys_user su inner join sys_user_role sur on su.user_id = sur.user_id @@ -353,7 +353,41 @@ <foreach collection="deptIdList" item="deptId" open="(" close=")" separator=","> #{deptId} </foreach> - and su.app_online_state = '1' + and su.app_online_state = '1' and su.status = '0' and su.del_flag = '0' order by su.dept_id asc </select> + + <select id="getOwnAndChildrenSoilderListAll" resultMap="SysUserOnlyResult"> + select distinct su.user_id,su.dept_id,su.user_name, + concat(su.nick_name,'(',sd.dept_name,')') as nick_name, + su.app_online_state from sys_user su + inner join sys_user_role sur on su.user_id = sur.user_id + inner join sys_role sr on sur.role_id = sr.role_id + inner join sys_dept sd on su.dept_id = sd.dept_id + where sr.role_key = 'appUser' and su.dept_id in + <foreach collection="deptIdList" item="deptId" open="(" close=")" separator=","> + #{deptId} + </foreach> + and su.status = '0' and su.del_flag = '0' + order by su.dept_id asc + </select> + + <select id="selectUserByDeptIdList" resultMap="SysUserOnlyResult"> + select * from sys_user su where su.dept_id in + <foreach collection="deptIdList" item="deptId" open="(" close=")" separator=","> + #{deptId} + </foreach> + and su.status = '0' + </select> + + <select id="selectUserIdByCarId" resultType="java.lang.String"> + select user_id from sys_user where dept_id in ( + with recursive rsd as ( + select * from sys_dept sd where sd.dept_id = ( + select dept_id from ard_sy_car where car_id = #{carId}) + union + select psd.* from sys_dept psd inner join rsd on rsd.parent_id = psd.dept_id + ) + select rsd.dept_id from rsd) + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3