From 1babbf1c0b2bc8d27f2874c85369e394b545594a Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Mon, 11 May 2020 11:24:00 +0800
Subject: [PATCH] add轨迹信息显示按秒级显示,update轨迹数据先从history表查询,update报表单位问题

---
 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