diff --git a/zc-business/src/main/java/com/zc/business/controller/DcSdhsEventController.java b/zc-business/src/main/java/com/zc/business/controller/DcSdhsEventController.java index 93c74109..79b33350 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcSdhsEventController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcSdhsEventController.java @@ -112,14 +112,18 @@ public class DcSdhsEventController { PoiUtil.createHeading1(newDoc,"交通事件"); for (String trafficIncidentType : exportKey) { if ("1".equals(trafficIncidentType)){ + //事故多发路段 } else if ("2".equals(trafficIncidentType)){ + //事件类型分析 } else if ("3".equals(trafficIncidentType)){ + //事故车型分析 //事故车型 dcSdhsEventService.exportAccidentModelAnalysis(newDoc, dcSdhsEventQuery); } else if ("4".equals(trafficIncidentType)){ + //事故时间分析 //事故时间 dcSdhsEventService.exportAccidentTimeAnalysis(newDoc, dcSdhsEventQuery); @@ -157,13 +161,13 @@ public class DcSdhsEventController { } if (exportKey.contains("11") || exportKey.contains("12")){ - PoiUtil.createHeading1(newDoc,"交通量统计"); + PoiUtil.createHeading1(newDoc,"拥堵情况"); for (String trafficIncidentType : exportKey) { if ("11".equals(trafficIncidentType)){ //拥堵地点统计 } else if ("12".equals(trafficIncidentType)){ - //路段拥堵时长 + //路段平均拥堵时长 } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java index 083ab74a..c61da94b 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java @@ -835,21 +835,28 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { List> list = new ArrayList<>(); for (String stationName : stationSet) { Map map = new HashMap<>(); + Long allNum = 0L; map.put("stationName",stationName); if (closeStation.containsKey(stationName)){ map.put("close",closeStation.get(stationName)); + allNum += closeStation.get(stationName); } else { map.put("close",0); } if (restrictionStation.containsKey(stationName)){ map.put("restriction",restrictionStation.get(stationName)); + allNum += restrictionStation.get(stationName); } else { map.put("restriction",0); } + + map.put("allNum",allNum); list.add(map); } + //根据总数排序 + list = list.stream().sorted(Comparator.comparing(item -> Long.parseLong(((Map) item).get("allNum").toString())).reversed()).collect(Collectors.toList()); return AjaxResult.success(list); }