|
|
@@ -179,45 +179,45 @@ public class ExportReportService { |
|
|
|
String singlePointConcentrationMax = ""; |
|
|
|
String singlePointConcentrationMin = ""; |
|
|
|
if ("co".equals(airDataType.getDataType())) { |
|
|
|
list = airDataList.stream().map(p -> Double.parseDouble(p.getCo())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().max(Comparator.comparing(x -> Double.parseDouble(x.getCo()))).get(); |
|
|
|
airDataMin = airDataList.stream().min(Comparator.comparing(x -> Double.parseDouble(x.getCo()))).get(); |
|
|
|
list = airDataList.stream().filter(x -> x != null && !x.getCo().isEmpty()).map(p -> Double.parseDouble(p.getCo())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().filter(x -> x != null && !x.getCo().isEmpty()).max(Comparator.comparing(x -> Double.parseDouble(x.getCo()))).get(); |
|
|
|
airDataMin = airDataList.stream().filter(x -> x != null && !x.getCo().isEmpty()).min(Comparator.comparing(x -> Double.parseDouble(x.getCo()))).get(); |
|
|
|
singlePointConcentrationMax = airDataMax.getCo(); |
|
|
|
singlePointConcentrationMin = airDataMin.getCo(); |
|
|
|
} else if ("pm_10".equals(airDataType.getDataType())) { |
|
|
|
list = airDataList.stream().map(p -> Double.parseDouble(p.getPm10())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().max(Comparator.comparing(x -> Double.parseDouble(x.getPm10()))).get(); |
|
|
|
airDataMin = airDataList.stream().min(Comparator.comparing(x -> Double.parseDouble(x.getPm10()))).get(); |
|
|
|
list = airDataList.stream().filter(x -> x != null && !x.getPm10().isEmpty()).map(p -> Double.parseDouble(p.getPm10())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().filter(x -> x != null && !x.getPm10().isEmpty()).max(Comparator.comparing(x -> Double.parseDouble(x.getPm10()))).get(); |
|
|
|
airDataMin = airDataList.stream().filter(x -> x != null && !x.getPm10().isEmpty()).min(Comparator.comparing(x -> Double.parseDouble(x.getPm10()))).get(); |
|
|
|
singlePointConcentrationMax = airDataMax.getPm10(); |
|
|
|
singlePointConcentrationMin = airDataMin.getPm10(); |
|
|
|
} else if ("pm_2_5".equals(airDataType.getDataType())) { |
|
|
|
list = airDataList.stream().map(p -> Double.parseDouble(p.getPm25())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().max(Comparator.comparing(x -> Double.parseDouble(x.getPm25()))).get(); |
|
|
|
airDataMin = airDataList.stream().min(Comparator.comparing(x -> Double.parseDouble(x.getPm25()))).get(); |
|
|
|
list = airDataList.stream().filter(x -> x != null && !x.getPm25().isEmpty()).map(p -> Double.parseDouble(p.getPm25())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().filter(x -> x != null && !x.getPm25().isEmpty()).max(Comparator.comparing(x -> Double.parseDouble(x.getPm25()))).get(); |
|
|
|
airDataMin = airDataList.stream().filter(x -> x != null && !x.getPm25().isEmpty()).min(Comparator.comparing(x -> Double.parseDouble(x.getPm25()))).get(); |
|
|
|
singlePointConcentrationMax = airDataMax.getPm25(); |
|
|
|
singlePointConcentrationMin = airDataMin.getPm25(); |
|
|
|
} else if ("so2".equals(airDataType.getDataType())) { |
|
|
|
list = airDataList.stream().map(p -> Double.parseDouble(p.getSo2())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().max(Comparator.comparing(x -> Double.parseDouble(x.getSo2()))).get(); |
|
|
|
airDataMin = airDataList.stream().min(Comparator.comparing(x -> Double.parseDouble(x.getSo2()))).get(); |
|
|
|
list = airDataList.stream().filter(x -> x != null && !x.getSo2().isEmpty()).map(p -> Double.parseDouble(p.getSo2())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().filter(x -> x != null && !x.getSo2().isEmpty()).max(Comparator.comparing(x -> Double.parseDouble(x.getSo2()))).get(); |
|
|
|
airDataMin = airDataList.stream().filter(x -> x != null && !x.getSo2().isEmpty()).min(Comparator.comparing(x -> Double.parseDouble(x.getSo2()))).get(); |
|
|
|
singlePointConcentrationMax = airDataMax.getSo2(); |
|
|
|
singlePointConcentrationMin = airDataMin.getSo2(); |
|
|
|
} else if ("vocs".equals(airDataType.getDataType())) { |
|
|
|
list = airDataList.stream().map(p -> Double.parseDouble(p.getVocs())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().max(Comparator.comparing(x -> Double.parseDouble(x.getVocs()))).get(); |
|
|
|
airDataMin = airDataList.stream().min(Comparator.comparing(x -> Double.parseDouble(x.getVocs()))).get(); |
|
|
|
list = airDataList.stream().filter(x -> x != null && !x.getVocs().isEmpty()).map(p -> Double.parseDouble(p.getVocs())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().filter(x -> x != null && !x.getVocs().isEmpty()).max(Comparator.comparing(x -> Double.parseDouble(x.getVocs()))).get(); |
|
|
|
airDataMin = airDataList.stream().filter(x -> x != null && !x.getVocs().isEmpty()).min(Comparator.comparing(x -> Double.parseDouble(x.getVocs()))).get(); |
|
|
|
singlePointConcentrationMax = airDataMax.getVocs(); |
|
|
|
singlePointConcentrationMin = airDataMin.getVocs(); |
|
|
|
} else if ("no2".equals(airDataType.getDataType())) { |
|
|
|
list = airDataList.stream().map(p -> Double.parseDouble(p.getNo2())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().max(Comparator.comparing(x -> Double.parseDouble(x.getNo2()))).get(); |
|
|
|
airDataMin = airDataList.stream().min(Comparator.comparing(x -> Double.parseDouble(x.getNo2()))).get(); |
|
|
|
list = airDataList.stream().filter(x -> x != null && !x.getNo2().isEmpty()).map(p -> Double.parseDouble(p.getNo2())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().filter(x -> x != null && !x.getNo2().isEmpty()).max(Comparator.comparing(x -> Double.parseDouble(x.getNo2()))).get(); |
|
|
|
airDataMin = airDataList.stream().filter(x -> x != null && !x.getNo2().isEmpty()).min(Comparator.comparing(x -> Double.parseDouble(x.getNo2()))).get(); |
|
|
|
singlePointConcentrationMax = airDataMax.getNo2(); |
|
|
|
singlePointConcentrationMin = airDataMin.getNo2(); |
|
|
|
} else if ("o3".equals(airDataType.getDataType())) { |
|
|
|
list = airDataList.stream().map(p -> Double.parseDouble(p.getO3())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().max(Comparator.comparing(x -> Double.parseDouble(x.getO3()))).get(); |
|
|
|
airDataMin = airDataList.stream().min(Comparator.comparing(x -> Double.parseDouble(x.getO3()))).get(); |
|
|
|
list = airDataList.stream().filter(x -> x != null && !x.getO3().isEmpty()).map(p -> Double.parseDouble(p.getO3())).collect(Collectors.toList()); |
|
|
|
airDataMax = airDataList.stream().filter(x -> x != null && !x.getO3().isEmpty()).max(Comparator.comparing(x -> Double.parseDouble(x.getO3()))).get(); |
|
|
|
airDataMin = airDataList.stream().filter(x -> x != null && !x.getO3().isEmpty()).min(Comparator.comparing(x -> Double.parseDouble(x.getO3()))).get(); |
|
|
|
singlePointConcentrationMax = airDataMax.getO3(); |
|
|
|
singlePointConcentrationMin = airDataMin.getO3(); |
|
|
|
} else { |