From 5dccf0dc687dfef1c91936af3cea06fe0609b918 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 11 十二月 2024 17:31:11 +0800
Subject: [PATCH] osd时间bug、离线工单bug等

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

diff --git a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
index 37b54c3..57197dc 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -111,7 +111,7 @@
         left join (
         WITH cte AS (
         SELECT *,row_number() OVER(PARTITION BY serial_number ORDER BY create_time DESC) rn FROM t_work_order
-        WHERE deleted = 0 AND status = 'AUDITING_SUCCESS'
+        WHERE deleted = 0 AND status != 'AUDITING_SUCCESS'
         ) SELECT * FROM cte WHERE rn=1
         ) w on m.serial_number = w.serial_number and w.deleted = 0
         left join t_yw_unit u on p.unit_id = u.id and u.deleted = 0
@@ -141,9 +141,9 @@
                 #{cameraCaptureArea}
             </if>
             <if test="time !=null and time !=''">and TIMESTAMPDIFF(DAY, p.recovery_time, NOW()) <![CDATA[<=]]> #{time}</if>
-            <if test="onState != null and onState = 1">and (p.online = #{onState} and p.ping_online = #{onState})</if>
-            <if test="onState != null and onState = -1">and (p.online = #{onState} or p.ping_online = #{onState})</if>
-            <if test="onState != null and onState = 0">and (p.online = #{onState} and p.ping_online = #{onState})</if>
+            <if test="onState != null and onState == 1">and (p.online = #{onState} and p.ping_online = #{onState})</if>
+            <if test="onState != null and onState == -1">and (p.online = #{onState} or p.ping_online = #{onState})</if>
+            <if test="onState != null and onState == 0">and (p.online = #{onState} and p.ping_online = #{onState})</if>
             <if test="civilCode != null  and civilCode != ''">and civil_code = #{civilCode}</if>
             <if test="integratedDevice != null ">and integrated_device = #{integratedDevice}</if>
             <if test="cameraBrand != null ">and camera_brand = #{cameraBrand}</if>
@@ -197,9 +197,9 @@
             <if test="cameraFunType != null  and cameraFunType != ''">and camera_fun_type like concat('%',
                 #{cameraFunType}, '%')
             </if>
-            <if test="onState != null and onState = 1">and (p.online = #{onState} and p.ping_online = #{onState})</if>
-            <if test="onState != null and onState = -1">and (p.online = #{onState} or p.ping_online = #{onState})</if>
-            <if test="onState != null and onState = 0">and (p.online = #{onState} and p.ping_online = #{onState})</if>
+            <if test="onState != null and onState == 1">and (p.online = #{onState} and p.ping_online = #{onState})</if>
+            <if test="onState != null and onState == -1">and (p.online = #{onState} or p.ping_online = #{onState})</if>
+            <if test="onState != null and onState == 0">and (p.online = #{onState} and p.ping_online = #{onState})</if>
             <if test="civilCode != null  and civilCode != ''">and civil_code = #{civilCode}</if>
         </where>
     </select>

--
Gitblit v1.8.0