From 1b07330b49df5390c6f59844b0fae1632182904a Mon Sep 17 00:00:00 2001 From: Angel <1050374295@qq.com> Date: Mon, 29 Jan 2024 10:16:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/business/controller/BigScreenController.java | 2 +- .../java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java b/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java index e33775e..3a3c3ea 100644 --- a/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java +++ b/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java @@ -293,7 +293,6 @@ public class BigScreenController extends BaseController { @ApiOperation("警情统计列表,重点警情") public AjaxResult policeSituationStatisticsList() { try { - List metaAlarmInfos = alarmInfoService.listAlarmAndHandleAlarm(); ArrayList alarmVos = new ArrayList<>(); for (MetaAlarmInfoAndHandleAlarmVo metaAlarmInfoAndHandleAlarmVo : metaAlarmInfos){ @@ -315,6 +314,7 @@ public class BigScreenController extends BaseController { metaAlarmInfoAndHandleAlarmVo.setJjxxAlarmResponseTime(dateFormat.format(jjxxAlarmResponse)); } alarmVos.add(metaAlarmInfoAndHandleAlarmVo); + Collections.sort(alarmVos,Collections.reverseOrder()); } return AjaxResult.success(alarmVos); } catch (Exception e) { 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 f6c8c47..b888a7f 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 @@ -90,4 +90,5 @@ public interface MetaAlarmInfoMapper extends BaseMapper { " AND DATE(informant_time) = CURDATE() " + " ORDER BY informant_time DESC LIMIT 100) a") public List listAlarmAndHandleAlarm(); + }