From e5afbe8d4feccaf34bce709402ed9eb0b4ef9159 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sun, 27 Jun 2021 22:57:17 +0800
Subject: [PATCH] 1.设备统计代码同步修改 2.考勤模糊查询代码同步修改

---
 blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml   |   12 ++++++------
 blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/attendance/mapper/AttendanceMapper.xml |    3 ++-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/attendance/mapper/AttendanceMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/attendance/mapper/AttendanceMapper.xml
index c276492..ed00443 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/attendance/mapper/AttendanceMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/attendance/mapper/AttendanceMapper.xml
@@ -20,10 +20,11 @@
     </resultMap>
 
 
+
     <select id="selectAttendancePage" resultMap="attendanceResultMap">
         select * from sys_attendance where is_deleted = 0
         <if test="attendance.name!=null and attendance.name != ''">
-            and name = #{attendance.name}
+            and name like concat('%',#{attendance.name},'%')
         </if>
         <if test="attendance.department!=null and attendance.department != ''">
             and department = #{department}
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..35bd9d9 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
@@ -454,12 +454,12 @@
 
     <!--查询设备在线数量-->
     <select id="selectEqCz" resultType="Integer">
-        select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=1
+        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 +480,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