From 775524110885e27fe860be1feb156ca78b5040b2 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期六, 06 七月 2024 14:10:57 +0800
Subject: [PATCH] 电子围栏分页查询修改提交

---
 ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml |   43 +++++++++++++++++++++++++++----------------
 1 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml b/ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml
index 504bdd9..73dbb28 100644
--- a/ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml
+++ b/ard-work/src/main/resources/mapper/sy/ArdTankWallMapper.xml
@@ -7,23 +7,20 @@
     <resultMap type="ArdTankWall" id="ArdTankWallResult">
         <result property="id"    column="id"    />
         <result property="wallName"    column="wall_name"    />
-        <result property="longitude"    column="longitude"    />
-        <result property="latitude"    column="latitude"    />
-        <result property="distance"    column="distance"    />
+        <result property="wallPoi"    column="wall_poi"    />
     </resultMap>
 
     <sql id="selectArdTankWallVo">
-        select id, wall_name, longitude, latitude, distance from ard_tank_wall
+        select id, wall_name, wall_poi from ard_tank_wall
     </sql>
 
     <select id="selectArdTankWallList" parameterType="ArdTankWall" resultMap="ArdTankWallResult">
         <include refid="selectArdTankWallVo"/>
         <where>  
             <if test="wallName != null  and wallName != ''"> and wall_name like '%'||#{wallName}||'%'</if>
-            <if test="longitude != null "> and longitude = #{longitude}</if>
-            <if test="latitude != null "> and latitude = #{latitude}</if>
-            <if test="distance != null "> and distance = #{distance}</if>
+            <if test="wallPoi != null  and wallPoi != ''"> and wall_poi = #{wallPoi}</if>
         </where>
+        order by wall_name
     </select>
     
     <select id="selectArdTankWallById" parameterType="String" resultMap="ArdTankWallResult">
@@ -36,16 +33,12 @@
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">id,</if>
             <if test="wallName != null">wall_name,</if>
-            <if test="longitude != null">longitude,</if>
-            <if test="latitude != null">latitude,</if>
-            <if test="distance != null">distance,</if>
+            <if test="wallPoi != null">wall_poi,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="wallName != null">#{wallName},</if>
-            <if test="longitude != null">#{longitude},</if>
-            <if test="latitude != null">#{latitude},</if>
-            <if test="distance != null">#{distance},</if>
+            <if test="wallPoi != null">#{wallPoi},</if>
          </trim>
     </insert>
 
@@ -53,9 +46,7 @@
         update ard_tank_wall
         <trim prefix="SET" suffixOverrides=",">
             <if test="wallName != null">wall_name = #{wallName},</if>
-            <if test="longitude != null">longitude = #{longitude},</if>
-            <if test="latitude != null">latitude = #{latitude},</if>
-            <if test="distance != null">distance = #{distance},</if>
+            <if test="wallPoi != null">wall_poi = #{wallPoi},</if>
         </trim>
         where id = #{id}
     </update>
@@ -70,4 +61,24 @@
             #{id}
         </foreach>
     </delete>
+
+    <select id="getAllArdTankWall" resultMap="ArdTankWallResult">
+        select * from ard_tank_wall order by wall_name
+    </select>
+
+    <select id="getArdTankWallByLockId" resultType="java.util.Map" parameterType="java.lang.String">
+        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>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3