From 2b088b86c7ebf9e02a25d46520265fb7fd5b85f2 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 16 Dec 2022 16:32:25 +0800
Subject: [PATCH] 添加尘负荷报告模板

---
 screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml b/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml
index 54d7ade..2d3d74c 100644
--- a/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml
+++ b/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml
@@ -31,4 +31,20 @@
         AND organization_id = #{orgId}
     </select>
 
+
+    <select id="getDaily" resultType="java.lang.String">
+        select AVG(JSON_EXTRACT(value,'$.dustld'))
+        from `history_second_cruiser`
+        WHERE mac = #{mac}
+          AND `time` <![CDATA[>=]]> #{time1}
+          AND `time` <![CDATA[<=]]> #{time2}
+    </select>
+
+    <select id="getDust" resultType="java.lang.Double">
+        select JSON_EXTRACT(value,'$.dustld')
+        from `history_second_cruiser`
+        WHERE mac = #{mac}
+          AND `time` <![CDATA[>=]]> #{start}
+          AND `time` <![CDATA[<=]]> #{end}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0