| | |
| | | <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"> |
| | |
| | | <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 >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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 >= #{start} and alarm_time <= #{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 >= #{start} and alarm_time <= #{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') <= alarm_time GROUP BY name ORDER BY "value" desc LIMIT 10 |
| | | </select> |
| | | </mapper> |