Browse Source

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	zc-business/src/main/java/com/zc/business/controller/DcSdhsEventController.java
develop
王兴琳 3 months ago
parent
commit
d47ace37ef
  1. 8
      zc-business/src/main/java/com/zc/business/controller/DcSdhsEventController.java
  2. 7
      zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java

8
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)){
//路段拥堵时长
//路段平均拥堵时长
}

7
zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java

@ -835,21 +835,28 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService {
List<Map<String,Object>> list = new ArrayList<>();
for (String stationName : stationSet) {
Map<String,Object> 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<String, Object>) item).get("allNum").toString())).reversed()).collect(Collectors.toList());
return AjaxResult.success(list);
}

Loading…
Cancel
Save