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(); + }