From 70f7f9d6f3a431662722f76e4da93cd3b4823857 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 22 八月 2024 18:51:00 +0800
Subject: [PATCH] 不定期抽检图片和录像完整

---
 ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
index ed1861a..0702c36 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
@@ -89,17 +89,35 @@
         yu.unit_name,
         yp.start_time,
         yp.end_time,
-        yp.province_tag,
-        yp.important_tag,
-        yp.important_command_image_tag
+        CASE WHEN yp.province_tag = 0 THEN '鍚�' ELSE '鏄�' END AS provinceTagString,
+        CASE WHEN yp.important_tag = 0 THEN '鍚�' ELSE '鏄�' END AS importantTagString,
+        CASE WHEN yp.important_command_image_tag = 0 THEN '鍚�' ELSE '鏄�' END AS importantCommandImageTagString
         FROM
         t_yw_point yp
         INNER JOIN t_monitor m ON yp.serial_number = m.serial_number
-        INNER JOIN t_yw_unit yu ON yu.id = yp.unit_id
+        LEFT JOIN t_yw_unit yu ON yu.id = yp.unit_id
         <where>
             <if test="query.pointName != null and query.pointName != ''">
                 AND m.name like concat('%', #{query.pointName} ,'%')
             </if>
         </where>
+        ORDER BY yu.unit_name
     </select>
+
+    <delete id="deleteAll">
+        delete from t_yw_point
+    </delete>
+
+    <update id="updatePoint">
+        update t_yw_point
+        <set>
+            <if test="point.pointName != null and point.pointName != ''">point_name = #{point.pointName},</if>
+            unit_id = #{point.unitId},
+            start_time = #{point.startTime},
+            end_time = #{point.endTime},
+            province_tag = #{point.provinceTag},
+            important_command_image_tag = #{point.importantCommandImageTag},
+        </set>
+            WHERE serial_number = #{point.serialNumber}
+    </update>
 </mapper>

--
Gitblit v1.8.0