From e25c689888a0dd80d07ffc4e4a45bd290b3d010c Mon Sep 17 00:00:00 2001
From: yuzixiang <yzx123456>
Date: Tue, 19 May 2020 16:50:21 +0800
Subject: [PATCH] 计算臭氧平缓平均值

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

diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml
index 68910e8..c2c17b5 100644
--- a/src/main/resources/mapper/DeviceMapper.xml
+++ b/src/main/resources/mapper/DeviceMapper.xml
@@ -216,7 +216,7 @@
 		</where>
 	</select>
 	<select id="selectByOrgIdAndMpId" resultMap="BaseResultMap">
-		SELECT dev.*,dve.version as device_version_value from device dev
+		SELECT dev.*,dve.version as device_version_value,mpt.* from device dev
 		left join monitor_point mpt on dev.monitor_point_id = mpt.id
 		left join device_version dve on dev.device_version_id = dve.id
 		<where>
@@ -418,4 +418,16 @@
 	<select id="getLimitDataByDevice" resultType="String">
 		SELECT limit_val FROM view_device_density WHERE mac = #{mac}
 	</select>
+
+    <select id="getMacsByOrganizationId" resultType="string">
+        SELECT d.mac
+        FROM monitor_point mp, device d
+        WHERE mp.id = d.monitor_point_id
+        AND mp.organization_id IN
+        <foreach collection="organizationIdList" index="index" item="organizationId" open="(" separator="," close=")">
+            #{organizationId}
+        </foreach>
+        AND d.is_delete = '0'
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0