From b61c4537a78d58412ef7ccd6e2c30152d807c5b7 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期一, 29 七月 2024 11:04:54 +0800
Subject: [PATCH] 电磁锁密码查询去除上一组密码修改提交
---
ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml b/ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml
index 315401f..104d743 100644
--- a/ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml
+++ b/ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml
@@ -17,7 +17,7 @@
<result property="reserved3" column="reserved_3" />
</resultMap>
- <!--<resultMap type="ArdSyCar" id="ArdSyCarLockResult">
+ <resultMap type="ArdSyCar" id="ArdSyCarLockResult">
<result property="id" column="id" />
<result property="carId" column="car_id" />
<result property="carModel" column="car_model" />
@@ -39,7 +39,7 @@
<result property="restartState" column="restart_state" />
<result property="onlineTime" column="online_time" />
</collection>
- </resultMap>-->
+ </resultMap>
<sql id="selectArdSyCarVo">
select id, car_id, car_model, car_type, car_brand, dept_id, car_picture, reserved_1, reserved_2, reserved_3 from ard_sy_car
@@ -157,4 +157,27 @@
#{carId}
</foreach>
</select>
+ <select id="getCarListByDeptIdList" resultMap="ArdSyCarResult">
+ select * from ard_sy_car where dept_id in
+ <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
+ #{deptId}
+ </foreach>
+ </select>
+ <select id="selectArdSyCarAndTankLockByUserId" resultMap="ArdSyCarLockResult" parameterType="java.lang.String">
+ select "asc".id,"asc".car_id,"asc".car_model,"asc".car_type,
+ "asc".car_brand,"asc".dept_id,"asc".car_picture,atl.id as lid,
+ atl.lock_num,atl.lock_name,atl.img_position_top,atl.img_position_left,
+ atl.car_id as lcar_id,atl.enable,coalesce(atl.restart_state,'') as restart_state,
+ coalesce(atl.online_time,'') as online_time
+ from ard_sy_car "asc"
+ inner join ard_tank_lock atl on "asc".car_id = atl.car_id
+ where "asc".dept_id in (
+ with recursive rsd as (
+ select sd.dept_id from sys_dept sd where sd.dept_id =
+ (select dept_id from sys_user su where su.user_id = #{userId})
+ union
+ select csd.dept_id from sys_dept csd inner join rsd on rsd.dept_id = csd.parent_id
+ )
+ select dept_id from rsd) order by "asc".car_id desc,atl.lock_num
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3