From 57c72c8438ccb461d5d2f751f710d6908f0e0d32 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Thu, 04 Nov 2021 14:59:20 +0800
Subject: [PATCH] 版本修复

---
 blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
index dcc2a4e..f29ec2a 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
@@ -193,13 +193,13 @@
             and dtype=#{equipment.dtype}
         </if>
         <if test="dxtype!=null and dxtype == 0">
-            and heartbeat &lt; DATE_SUB(NOW(),INTERVAL 1 DAY)  and dtype=0
+            and  dtype=0
         </if>
         <if test="dxtype!=null and dxtype == 1">
-            and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=1
+            and  dtype=1
         </if>
         <if test="dxtype!=null and dxtype == 2">
-            and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=2
+            and  dtype=2
         </if>
         <if test="dxtype!=null and dxtype == 3">
             and dtype=3
@@ -259,6 +259,7 @@
         equipment.state,
         equipment.reason,
         equipment.street,
+        equipment.manufacturers,
         catalog.pid,
         equipment.oneContacts,
         equipment.onePhone,
@@ -364,6 +365,11 @@
      where id=#{id}
     </update>
 
+    <update id="updateRW">
+    update sys_alarm SET jtype= 1
+     where id=#{rwid}
+    </update>
+
     <update id="updataType">
         update sys_equipment SET devicestate = 1 where id in (${arr})
     </update>
@@ -453,13 +459,13 @@
     </update>
 
     <!--查询设备在线数量-->
-    <select id="selectEqCz" resultType="Integer">
-        select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=1
+        <select id="selectEqCz" resultType="Integer">
+        select COUNT(*) from sys_equipment where dtype=1
     </select>
 
     <!--查询设备掉线数量-->
     <select id="selectEqCd" resultType="Integer">
-        select COUNT(*) from sys_equipment where heartbeat &lt; DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=0
+        select COUNT(*) from sys_equipment where dtype=0
     </select>
 
     <!--查询预警设备数量-->
@@ -480,7 +486,7 @@
 
     <!--查询预警设备数量-->
     <select id="selectEqCys" resultType="Integer">
-        select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=2
+        select COUNT(*) from sys_equipment where dtype=2
     </select>
 
     <!--查询设故障数量-->

--
Gitblit v1.9.3