From 3c79960dcc900d33b99587e7fb5f1baf46c0a255 Mon Sep 17 00:00:00 2001
From: 于紫祥_1901 <email@yuzixiang_1910>
Date: Thu, 13 Aug 2020 13:01:23 +0800
Subject: [PATCH] 风场图update
---
src/main/resources/mapper/SensorUnitMapper.xml | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/SensorUnitMapper.xml b/src/main/resources/mapper/SensorUnitMapper.xml
index a24a98f..03d19ab 100644
--- a/src/main/resources/mapper/SensorUnitMapper.xml
+++ b/src/main/resources/mapper/SensorUnitMapper.xml
@@ -35,4 +35,28 @@
AND su.is_delete=0
AND mp.id = #{id}
</select>
+ <select id="getSensorUnitByDeviceMac" resultType="java.util.Map">
+ SELECT
+ su.* ,
+ s.sensor_key
+ FROM
+ device d,
+ sensor_unit su,
+ organization_sensor_unit osu,
+ monitor_point mp,
+ device_version_sensor dvs,
+ sensor s
+ WHERE
+ d.monitor_point_id = mp.id
+ AND su.is_delete = '0'
+ AND mp.organization_id = osu.organization_id
+ AND osu.sensor_unit_id = su.id
+ AND su.sensor_id = s.id
+ AND d.device_version_id = dvs.device_version_id
+ AND su.sensor_id = dvs.sensor_id
+ AND d.mac = #{mac}
+ <if test="sensorKey != null">
+ AND s.sensor_key = #{sensorKey}
+ </if>
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0