|
@ -484,21 +484,28 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService { |
|
|
List<Map<String,Object>> list = new ArrayList<>(); |
|
|
List<Map<String,Object>> list = new ArrayList<>(); |
|
|
for (String stationName : stationSet) { |
|
|
for (String stationName : stationSet) { |
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
Long allNum = 0L; |
|
|
map.put("stationName",stationName); |
|
|
map.put("stationName",stationName); |
|
|
if (closeStation.containsKey(stationName)){ |
|
|
if (closeStation.containsKey(stationName)){ |
|
|
map.put("close",closeStation.get(stationName)); |
|
|
map.put("close",closeStation.get(stationName)); |
|
|
|
|
|
allNum += closeStation.get(stationName); |
|
|
} else { |
|
|
} else { |
|
|
map.put("close",0); |
|
|
map.put("close",0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (restrictionStation.containsKey(stationName)){ |
|
|
if (restrictionStation.containsKey(stationName)){ |
|
|
map.put("restriction",restrictionStation.get(stationName)); |
|
|
map.put("restriction",restrictionStation.get(stationName)); |
|
|
|
|
|
allNum += restrictionStation.get(stationName); |
|
|
} else { |
|
|
} else { |
|
|
map.put("restriction",0); |
|
|
map.put("restriction",0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
map.put("allNum",allNum); |
|
|
list.add(map); |
|
|
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); |
|
|
return AjaxResult.success(list); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|