From a1969bc264f5842b87205ffc9fa77e56c51d3058 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 18 十一月 2024 10:12:11 +0800
Subject: [PATCH] 在线监测对于纯车辆人脸可以恢复在线状态

---
 ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml |   70 ++++++++++++++++++++++++++++-------
 1 files changed, 56 insertions(+), 14 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
index 2ded25c..0b266b3 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
@@ -51,10 +51,6 @@
         <result column="column_value" property="columnValue"/>
     </resultMap>
 
-    <select id="selectData" resultType="com.ycl.platform.base.BaseSelect">
-
-    </select>
-
     <select id="page" resultMap="pageMap">
         SELECT
         typ.id,
@@ -80,8 +76,12 @@
         LEFT JOIN t_yw_unit tyu ON typ.unit_id = tyu.id AND tyu.deleted = 0
         LEFT JOIN sys_dept sd ON typ.dept_id = sd.dept_id AND sd.del_flag = 0
         <where>
+            typ.examine_status = 1
             <if test="query.pointName != null and query.pointName != ''">
                 AND typ.point_name like concat('%', #{query.pointName}, '%')
+            </if>
+            <if test="query.unitId != null">
+                AND typ.unit_id = #{query.unitId}
             </if>
         </where>
     </select>
@@ -94,9 +94,9 @@
         LEFT JOIN t_dynamic_column dc ON dc.id = dcv.dynamic_column_id AND dc.table_name = #{tableName}
         WHERE
         dcv.ref_id = #{id}
-        <if test="pointName != null and pointName != ''">
-            and dcv.column_value like concat('%', #{pointName}, '%')
-        </if>
+<!--        <if test="pointName != null and pointName != ''">-->
+<!--            and dcv.column_value like concat('%', #{pointName}, '%')-->
+<!--        </if>-->
     </select>
 
     <select id="dataCenterPage" resultType="com.ycl.platform.domain.vo.PointDetailVO">
@@ -229,15 +229,18 @@
         yu.unit_name,
         yp.start_time,
         yp.end_time,
+        d.area,
         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,
-        CASE WHEN yp.dept_tag = 0 THEN '鍚�' ELSE '鏄�' END AS deptTag
+        CASE WHEN yp.dept_tag = 0 THEN '鍚�' ELSE '鏄�' END AS deptTagString
         FROM
         t_yw_point yp
         INNER JOIN t_monitor m ON yp.serial_number = m.serial_number
         LEFT JOIN t_yw_unit yu ON yu.id = yp.unit_id
+        LEFT JOIN sys_dept d ON yp.dept_id = d.dept_id
         <where>
+            yp.examine_status = 1
             <if test="query.pointName != null and query.pointName != ''">
                 AND m.name like concat('%', #{query.pointName} ,'%')
             </if>
@@ -257,13 +260,9 @@
             <if test="point.pointName != null and point.pointName != ''">
                 point_name = #{point.pointName},
             </if>
-            <if test="point.unitId != null">
+            <if test="needUpdateUnit != null and needUpdateUnit">
                 unit_id = #{point.unitId},
-            </if>
-            <if test="point.startTime != null">
                 start_time = #{point.startTime},
-            </if>
-            <if test="point.endTime != null">
                 end_time = #{point.endTime},
             </if>
             province_tag = #{point.provinceTag},
@@ -358,5 +357,48 @@
         serial_number, province_tag, important_tag, important_command_image_tag, dept_tag
     </select>
 
-
+    <select id="selectToCount" resultType="com.ycl.platform.domain.vo.YwPointVO">
+        select p.* from t_yw_point p
+        left join t_monitor m on p.serial_number = m.serial_number
+        <where>
+            p.examine_status = 1 and m.camera_fun_type like concat('%',#{examineCategory},'%')
+            <if test="examineTag == 0">
+                and p.province_tag = 1
+            </if>
+            <if test="examineTag == 2">
+                and p.dept_tag = 1
+            </if>
+        </where>
+    </select>
+    <update id="myUpdateById">
+        update t_yw_point
+        <set>
+            <if test="pointName !=null and pointName !=''">
+                point_name = #{pointName},
+            </if>
+            <if test="updateTime !=null">
+                update_time = #{updateTime},
+            </if>
+            <if test="deptId !=null">
+                dept_id = #{deptId},
+            </if>
+            <if test="provinceTag !=null">
+                province_tag = #{provinceTag},
+            </if>
+            <if test="importantTag !=null">
+                important_tag = #{importantTag},
+            </if>
+            <if test="importantCommandImageTag !=null">
+                important_command_image_tag = #{importantCommandImageTag},
+            </if>
+            <if test="deptTag !=null">
+                dept_tag = #{deptTag},
+            </if>
+            unit_id = #{unitId},
+            start_time = #{startTime},
+            end_time = #{endTime},
+            remark = #{remark},
+        </set>
+        where id =#{id}
+    </update>
 </mapper>

--
Gitblit v1.8.0