From 2b29a4a26019e3d1692c4b4c76746dba9fac7b22 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期六, 07 十月 2023 14:39:16 +0800
Subject: [PATCH] 报警数量统计年

---
 ard-work/src/main/resources/mapper/alarm/ArdAlarmCameraMapper.xml |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/alarm/ArdAlarmCameraMapper.xml b/ard-work/src/main/resources/mapper/alarm/ArdAlarmCameraMapper.xml
index d46eeaf..2f919b5 100644
--- a/ard-work/src/main/resources/mapper/alarm/ArdAlarmCameraMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarm/ArdAlarmCameraMapper.xml
@@ -166,4 +166,10 @@
           and alarm_time&lt;=#{alarmTime}
           and view_time is null
     </update>
+
+    <select id="cameraYear" resultType="com.ruoyi.statistical.vo.CountVo">
+        select to_char(alarm_time::DATE, 'MM') as month,count(id)
+        from ard_alarm_camera
+        where alarm_time &gt;= #{start} and  alarm_time &lt;= #{end}  group by month order by month
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3