| | |
| | | Object aqiValue = null; |
| | | if (aqiMap != null) { |
| | | //String jsonStr = JsonUtil.readJsonFile("classpath:SensorContrast.json"); |
| | | String jsonStr = JsonUtil.testReadFile("SensorContrast.json"); |
| | | /*String jsonStr = JsonUtil.testReadFile("SensorContrast.json"); |
| | | JSONObject result = JSONObject.parseObject(jsonStr); |
| | | aqiValue = aqiMap.get(result.get(key)); |
| | | //aqiValue = aqiMap.get(SensorContrasts.sensorContrastMap.get(key)); |
| | | aqiValue = aqiMap.get(result.get(key));*/ |
| | | aqiValue = aqiMap.get(SensorContrasts.sensorContrastMap.get(key)); |
| | | } |
| | | env.put("aqi", ObjectUtils.isEmpty(aqiValue) ? 0F : Float.parseFloat((String) aqiValue)); |
| | | } |