From 492bae41a21616852b8007660c679fcd37e7ea2a Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期一, 06 十一月 2023 10:16:34 +0800
Subject: [PATCH] app人员查询

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

diff --git a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
index 37b0ceb..3ec6951 100644
--- a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
@@ -19,11 +19,11 @@
         <result property="createTime"    column="create_time"    />
         <result property="userId"    column="user_id"    />
         <result property="deptId"    column="dept_id"    />
-        <result property="guideFlag"    column="guide_flag"    />
+        <result property="guideTime"    column="guide_Time"    />
     </resultMap>
 
     <sql id="selectArdAlarmRadarMoveVo">
-        select id, name, target_id, alarm_type, alarm_time, longitude, latitude, record_url1,record_url2, view_time, create_by, create_time, user_id, dept_id, guide_flag from ard_alarm_radar_move
+        select id, name, target_id, alarm_type, alarm_time, longitude, latitude, record_url1,record_url2, view_time, create_by, create_time, user_id, dept_id, guide_time from ard_alarm_radar_move
     </sql>
 
     <select id="selectArdAlarmRadarMoveList" parameterType="ArdAlarmRadarMove" resultMap="ArdAlarmRadarMoveResult">
@@ -39,7 +39,7 @@
             <if test="viewTime != null "> and view_time = #{viewTime}</if>
             <if test="userId != null  and userId != ''"> and user_id = #{userId}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="guideFlag != null "> and guide_flag = #{guideFlag}</if>
+            <if test="guideTime != null "> and guide_time = #{guideTime}</if>
             <if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
                 AND alarm_time &gt;= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss')
             </if>
@@ -73,7 +73,7 @@
             <if test="updateTime != null">update_time,</if>
             <if test="userId != null">user_id,</if>
             <if test="deptId != null">dept_id,</if>
-            <if test="guideFlag != null">guide_flag,</if>
+            <if test="guideTime != null">guide_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -91,7 +91,7 @@
             <if test="updateTime != null">#{updateTime},</if>
             <if test="userId != null">#{userId},</if>
             <if test="deptId != null">#{deptId},</if>
-            <if test="guideFlag != null">#{guideFlag},</if>
+            <if test="guideTime != null">#{guideTime},</if>
          </trim>
     </insert>
 
@@ -112,7 +112,7 @@
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="userId != null">user_id = #{userId},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
-            <if test="guideFlag != null">guide_flag = #{guideFlag},</if>
+            <if test="guideTime != null">guide_time = #{guideTime},</if>
         </trim>
         where id = #{id}
     </update>
@@ -167,4 +167,19 @@
     <select id="selectArdAlarmRadarLastData" parameterType="String" resultMap="ArdAlarmRadarMoveResult">
         select * from ard_alarm_radar_move where name=#{name} order by update_time desc LIMIT 1
     </select>
+
+    <select id="moveYear" resultType="com.ruoyi.statistical.vo.CountVo">
+        select to_char(alarm_time::DATE, 'MM') as date,count(id)
+        from ard_alarm_radar_move
+        where alarm_time &gt;= #{start} and  alarm_time &lt;= #{end}  group by date order by date
+    </select>
+    <select id="moveMonth" resultType="com.ruoyi.statistical.vo.CountVo">
+        select to_char(alarm_time::DATE, 'dd') as date,count(id)
+        from ard_alarm_radar_move
+        where alarm_time &gt;= #{start} and  alarm_time &lt;= #{end}  group by date order by date
+    </select>
+    <select id="ten" resultType="com.ruoyi.statistical.vo.TenVo">
+        SELECT name,count(name) as "value" from ard_alarm_radar_move
+        where (current_timestamp - interval '1024 hour') &lt;= alarm_time GROUP BY name ORDER BY "value" desc LIMIT 10
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3