From b0d4aa079f359643afa887e8272daa48e5d7c8ac Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Wed, 19 May 2021 16:10:15 +0800
Subject: [PATCH] 添加dataToQianDeng报警

---
 src/main/resources/mapper/DeviceMapper.xml |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml
index eca27c3..a455140 100644
--- a/src/main/resources/mapper/DeviceMapper.xml
+++ b/src/main/resources/mapper/DeviceMapper.xml
@@ -295,4 +295,27 @@
         <foreach item="item" collection="list" index="index" open="(" separator="," close=")">#{item}</foreach>
         and is_delete=0;
     </select>
+
+    <select id="getAllByMacList" resultType="java.util.Map">
+        select * from device
+        where mac in
+        <foreach item="item" collection="list" index="index" open="(" separator="," close=")">#{item}</foreach>
+    </select>
+
+    <select id="getOfflineDevice" resultType="java.util.Map">
+        SELECT name,mac
+        from device
+        WHERE state=4 and is_delete=0 and monitor_point_id in
+        (SELECT id FROM monitor_point WHERE city_code!=130900 or (city_code=130900 and  organization_id  in (60, 65, 159, 165, 166) and id!=56 and id!=83 and id!=84))
+        and mac not in (SELECT mac FROM special_device_config);
+    </select>
+
+    <select id="getOfflineDeviceOfDiseaseCenter" resultType="java.util.Map">
+       SELECT name,mac
+       FROM `device`
+       WHERE state=4 and is_delete=0
+       and monitor_point_id in(
+        SELECT id FROM monitor_point WHERE organization_id=#{orgId}
+    );
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0