From db378184a2d710bdd96676f6ac1af41e1a638ceb Mon Sep 17 00:00:00 2001 From: Angel <1050374295@qq.com> Date: Sun, 28 Jan 2024 13:04:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B524=E5=B0=8F=E6=97=B6=E8=AD=A6?= =?UTF-8?q?=E6=83=85=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../database/mapper/MetaAlarmInfoMapper.java | 71 +++++++++++++------ 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java index 80e0689..f6c8c47 100644 --- a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java @@ -22,11 +22,41 @@ public interface MetaAlarmInfoMapper extends BaseMapper { @Select( "select alarm_response_type_name,count from ( " + - "select *,count(1) count from meta_alarm_info group by alarm_response_type_name " + - ") a order by count desc limit 3 ") + "select *,count(1) count from meta_alarm_info group by alarm_response_type_name " + + ") a order by count desc limit 3 ") public List selectTop3AlarmInfo(); + // @Select("SELECT a.id, " + +// "a.alarm_code jjxx_alarm_code, " + +// "a.police_receiver_name jjxx_police_receiver_name, " + +// "a.alarm_response_unit jjxx_alarm_response_unit, " + +// "a.alarm_response_time jjxx_alarm_response_time, " + +// "a.alarm_response_content jjxx_alarm_response_content, " + +// "a.alarm_response_type_name jjxx_alarm_response_type_name, " + +// "a.informant_name jjxx_informant_name, " + +// "a.informant_phone jjxx_informant_phone, " + +// "a.informant_time jjxx_informant_time, " + +// "a.alarm_address jjxx_alarm_address, " + +// "a.longitude jjxx_longitude, " + +// "a.latitude jjxx_latitude " + +// "FROM (SELECT * FROM meta_alarm_info WHERE " + +// "alarm_response_unit LIKE '射阳县公安局临海派出所' OR " + +// "alarm_response_unit LIKE '射阳县公安局临海派出所第一警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局临海派出所第二警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局临海派出所第三警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局临海派出所第四警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局临港派出所' OR " + +// "alarm_response_unit LIKE '射阳县公安局临港派出所社区警务责任区' OR " + +// "alarm_response_unit LIKE '射阳县公安局临港派出所第一警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局临港派出所第二警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局临港派出所第一警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局扁担港边防派出所' OR " + +// "alarm_response_unit LIKE '射阳县公安局扁担港边防派出所第一警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所' OR " + +// "alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所第一警务区' OR " + +// "alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所第三警务区' " + +// "ORDER BY informant_time DESC LIMIT 100) a" ) @Select("SELECT a.id, " + "a.alarm_code jjxx_alarm_code, " + "a.police_receiver_name jjxx_police_receiver_name, " + @@ -41,24 +71,23 @@ public interface MetaAlarmInfoMapper extends BaseMapper { "a.longitude jjxx_longitude, " + "a.latitude jjxx_latitude " + "FROM (SELECT * FROM meta_alarm_info WHERE " + - "alarm_response_unit LIKE '射阳县公安局临海派出所' OR " + - "alarm_response_unit LIKE '射阳县公安局临海派出所第一警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局临海派出所第二警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局临海派出所第三警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局临海派出所第四警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局临港派出所' OR " + - "alarm_response_unit LIKE '射阳县公安局临港派出所社区警务责任区' OR " + - "alarm_response_unit LIKE '射阳县公安局临港派出所第一警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局临港派出所第二警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局临港派出所第一警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局扁担港边防派出所' OR " + - "alarm_response_unit LIKE '射阳县公安局扁担港边防派出所第一警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所' OR " + - "alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所第一警务区' OR " + - "alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所第三警务区' " + - "ORDER BY informant_time DESC LIMIT 100) a") + " (alarm_response_unit LIKE '射阳县公安局临海派出所' OR " + + " alarm_response_unit LIKE '射阳县公安局临海派出所第一警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局临海派出所第二警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局临海派出所第三警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局临海派出所第四警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局临港派出所' OR " + + " alarm_response_unit LIKE '射阳县公安局临港派出所社区警务责任区' OR " + + " alarm_response_unit LIKE '射阳县公安局临港派出所第一警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局临港派出所第二警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局临港派出所第一警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局扁担港边防派出所' OR " + + " alarm_response_unit LIKE '射阳县公安局扁担港边防派出所第一警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所' OR " + + " alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所第一警务区' OR " + + " alarm_response_unit LIKE '射阳县公安局黄沙河边防派出所第三警务区' " + + ") " + + " AND DATE(informant_time) = CURDATE() " + + " ORDER BY informant_time DESC LIMIT 100) a") public List listAlarmAndHandleAlarm(); - - - }