From 8e944cfabb253fc2556588e308e282586043f7b0 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 18 十一月 2025 22:09:56 +0800
Subject: [PATCH] 即时消息时间出现负数的问题修改

---
 smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/StateMapper.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/StateMapper.xml b/smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/StateMapper.xml
index 6cb7a4d..2cb2583 100644
--- a/smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/StateMapper.xml
+++ b/smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/StateMapper.xml
@@ -26,8 +26,8 @@
     <sql id="all_columns">
         workstation_id,value_collect,calendar_code,factory_year,factory_month,factory_date,factory_week,shift_index,shift_time_type,wcs,rps,is_fix_point,is_sync,is_plan,feedback_point_type,feedback_id,is_deleted,employee_id
     </sql>
-    <select id="lastStateNotEqValue" resultMap="voResultMap">
-        select <include refid="all_columns" /> from root.f2.state_${workstationId} where is_fix_point=false and is_deleted=false and wcs &lt;&gt;#{value} and wcs &gt; 0 order by time desc limit 1 align by device
+    <select id="lastStateNotEqValueLtTime" resultMap="voResultMap">
+        select <include refid="all_columns" /> from root.f2.state_${workstationId} where is_fix_point=false and is_deleted=false and wcs &lt;&gt;#{value} and wcs &gt; 0 and time &lt; #{beforeTime} order by time desc limit 1 align by device
     </select>
 
     <select id="firstStateEqValueGtTime" resultMap="voResultMap">

--
Gitblit v1.9.3