| | |
| | |
|
| | | //实测天气
|
| | | int x = 0;
|
| | | parameters.put("cityCode", code);
|
| | | List<Map<String, Object>> realList = realWeatherMapper.getRealWeather(parameters);
|
| | | if (realList.size() == 0) {
|
| | | //1-23点数据必然是同一个月份,最后一个可能是下一个月
|
| | |
| | | listMap.put("city", name);
|
| | | String time1 = listMap.get("time").toString();
|
| | | for (Map<String, Object> aqiMap : realAqilist) {
|
| | | if(time1.equals(aqiMap.get("time"))){
|
| | | if (time1.equals(aqiMap.get("time"))) {
|
| | | listMap.putAll(aqiMap);
|
| | | }
|
| | | }
|
| | |
| | | map.put("river", geographyMap.get("river").toString());
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < resultList.size(); i = i + 2) {
|
| | | Map<String, Object> foreMap = resultList.get(i);
|
| | | Map<String, Object> realMap = resultList.get(i + 1);
|
| | | if (foreMap.get("O3C") != null && realMap.get("O3C") != null) {
|
| | | Double foreO3 = Double.valueOf(foreMap.get("O3C").toString());
|
| | | Double realO3 = Double.valueOf(realMap.get("O3C").toString());
|
| | | int round = (int) Math.round((realO3 - foreO3) / realO3 * 100);
|
| | | if (round < 0) {
|
| | | round = -round;
|
| | | }
|
| | | realMap.put("errorRate", round + "%");
|
| | | }
|
| | | }
|
| | | return resultList;
|
| | | }
|
| | | }
|