| | |
| | | return AQIMAX; |
| | | } |
| | | |
| | | /** |
| | | * @Description: 小时AQI首要污染物 |
| | | * @Param: [map] |
| | | * @return: java.util.Map<java.lang.String,java.lang.Object> |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/10/29 |
| | | */ |
| | | public static Map<String,Object> hourlyAqi_pollutant(Map<String, Object> map) { |
| | | List<Integer> AQIList = new ArrayList<>(); |
| | | Map<String,Integer> AQIMap = new HashMap<>(); |
| | |
| | | return resultMap; |
| | | } |
| | | |
| | | /** |
| | | * @Description: 计算AQI污染等级 |
| | | * @Param: |
| | | * @return: |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/10/29 |
| | | */ |
| | | public static String classOfPollutionByAqi(Integer aqi){ |
| | | if(aqi>300) |
| | | return Constants.SERVER; |
| | | if(aqi>200) |
| | | return Constants.SERIOUS; |
| | | if(aqi>150) |
| | | return Constants.MIDDLE; |
| | | if(aqi>100) |
| | | return Constants.MILD; |
| | | if(aqi>50) |
| | | return Constants.GOOD; |
| | | return Constants.EXCELLENT; |
| | | } |
| | | //PM2.5 IAQI |
| | | public static int PM2_5AQI(Double value) { |
| | | private static int PM2_5AQI(Double value) { |
| | | double result; |
| | | if (value <= 0) { |
| | | result = 0; |
| | |
| | | } |
| | | |
| | | //PM10 IAQI |
| | | public static int PM10AQI(Double value) { |
| | | private static int PM10AQI(Double value) { |
| | | double result; |
| | | if (value <= 0) { |
| | | result = 0; |
| | |
| | | } |
| | | |
| | | //SO2 IAQI |
| | | public static int SO2AQI(Double value) { |
| | | private static int SO2AQI(Double value) { |
| | | double result; |
| | | if (value <= 0) { |
| | | result = 0; |
| | |
| | | } |
| | | |
| | | //NO2 IAQI |
| | | public static int NO2AQI(Double value) { |
| | | private static int NO2AQI(Double value) { |
| | | double result; |
| | | if (value <= 0) { |
| | | result = 0; |
| | |
| | | } |
| | | |
| | | //CO IAQI |
| | | public static int COAQI(Double value) { |
| | | private static int COAQI(Double value) { |
| | | double result; |
| | | if (value <= 0) { |
| | | result = 0; |
| | |
| | | } |
| | | |
| | | //O3 IAQI |
| | | public static int O3AQI(Double value) { |
| | | private static int O3AQI(Double value) { |
| | | double result; |
| | | if (value <= 0) { |
| | | result = 0; |