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/ArdTankWallMapper.xml | 37 ++++++++++++++++++++++++++++++++++---
1 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml b/ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml
index 1ae019e..125528f 100644
--- a/ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml
+++ b/ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml
@@ -8,10 +8,11 @@
<result property="id" column="id" />
<result property="wallName" column="wall_name" />
<result property="wallPoi" column="wall_poi" />
+ <result property="wallType" column="wall_type" />
</resultMap>
<sql id="selectArdTankWallVo">
- select id, wall_name, wall_poi from ard_tank_wall
+ select id, wall_name, wall_poi, wall_type from ard_tank_wall
</sql>
<select id="selectArdTankWallList" parameterType="ArdTankWall" resultMap="ArdTankWallResult">
@@ -19,8 +20,8 @@
<where>
<if test="wallName != null and wallName != ''"> and wall_name like '%'||#{wallName}||'%'</if>
<if test="wallPoi != null and wallPoi != ''"> and wall_poi = #{wallPoi}</if>
+ <if test="wallType != null and wallType != ''"> and wall_type = #{wallType}</if>
</where>
- order by wall_name
</select>
<select id="selectArdTankWallById" parameterType="String" resultMap="ArdTankWallResult">
@@ -34,11 +35,13 @@
<if test="id != null">id,</if>
<if test="wallName != null">wall_name,</if>
<if test="wallPoi != null">wall_poi,</if>
+ <if test="wallType != null">wall_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="wallName != null">#{wallName},</if>
<if test="wallPoi != null">#{wallPoi},</if>
+ <if test="wallType != null">#{wallType},</if>
</trim>
</insert>
@@ -47,6 +50,7 @@
<trim prefix="SET" suffixOverrides=",">
<if test="wallName != null">wall_name = #{wallName},</if>
<if test="wallPoi != null">wall_poi = #{wallPoi},</if>
+ <if test="wallType != null">wall_type = #{wallType},</if>
</trim>
where id = #{id}
</update>
@@ -67,11 +71,38 @@
</select>
<select id="getArdTankWallByLockId" resultType="java.util.Map" parameterType="java.lang.String">
- select atw.id,atw.wall_name as "wallName",atw.wall_poi as "wallPoi",
+ select atw.id as "wallId",atw.wall_name as "wallName",atw.wall_poi as "wallPoi",
atwl.process_type as "processType",case process_type when '-1' then '鍏冲姩浣�'
when '0' then '鏃犲姩浣�' when '1' then '寮�鍔ㄤ綔' end as process
from ard_tank_wall_lock atwl
inner join ard_tank_wall atw on atwl.wall_id = atw.id
where atwl.lock_id = #{id}
</select>
+
+ <select id="selectArdTankWallTotal" parameterType="java.lang.String" resultType="java.lang.Long">
+ select count(*) from ard_tank_wall atw
+ <where>
+ <if test="wallName != null and wallName != ''"> and wall_name like '%'||#{wallName}||'%'</if>
+ </where>
+ </select>
+
+ <select id="getDistinctArdTankWallByCarId" resultMap="ArdTankWallResult" parameterType="java.lang.String">
+ select distinct atw.* from ard_tank_lock atl
+ inner join ard_tank_wall_lock atwl on atl.id = atwl.lock_id
+ inner join ard_tank_wall atw on atwl.wall_id = atw.id
+ where atl.car_id = #{carId}
+ </select>
+
+ <select id="getArdTankWallProcessByLockId" resultMap="ArdTankWallResult" parameterType="java.lang.String">
+ select atw.* from ard_tank_wall_lock atwl
+ inner join ard_tank_wall atw on atwl.wall_id = atw.id
+ where atwl.lock_id = #{lockId} and atwl.process_type != '0'
+ </select>
+
+ <select id="getDistinctArdTankWallByCarId" resultMap="ArdTankWallResult" parameterType="java.lang.String">
+ select distinct atw.* from ard_tank_lock atl
+ inner join ard_tank_wall_lock atwl on atl.id = atwl.lock_id
+ inner join ard_tank_wall atw on atwl.wall_id = atw.id
+ where atl.car_id = #{carId}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3