jinpengyong
2022-10-19 1b92eb61fee576a51c58e34ede99fc199dcb3f13
screen-api/src/main/java/com/moral/api/utils/AdjustDataUtils.java
@@ -78,10 +78,10 @@
                        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));
                    }