jinpengyong
2020-10-23 2c42977a1a38e4f079c5c44fe51a46c27b865f80
src/main/java/com/moral/service/impl/RealWeatherDailyImpl.java
@@ -28,7 +28,7 @@
import com.moral.mapper.MonitorPointMapper;
import com.moral.mapper.ProvinceMapper;
import com.moral.mapper.RealWeatherDailyMapper;
import com.moral.mapper.RealWeatherMapper;
import com.moral.mapper.WeatherMapper;
import com.moral.service.RealWeatherDailyService;
import com.moral.util.Dom4jUtils;
@@ -48,7 +48,7 @@
    private ProvinceMapper provinceMapper;
    @Resource
    private RealWeatherMapper realWeatherMapper;
    private WeatherMapper weatherMapper;
    @Resource
    private RealWeatherDailyMapper realWeatherDailyMapper;
@@ -158,7 +158,7 @@
            Map<String, Object> dailyMap = (Map<String, Object>) JSONObject.parse(string);
            //温度平均值
            dailyMap.remove("date");
            Map<String, Object> dayData = realWeatherMapper.getDayData(map);
            Map<String, Object> dayData = weatherMapper.getDayData(map);
            for (String key : dayData.keySet()) {
                if (!key.equals("precip")) {
                    dayData.put(key, String.valueOf(Math.round(Double.valueOf(dayData.get(key).toString()))));
@@ -202,12 +202,12 @@
            }
            //最低温,最高温时间点
            Map<String, Object> timeMaxTemp = realWeatherMapper.getTimeMaxTemp(map);
            Map<String, Object> timeMaxTemp = weatherMapper.getTimeMaxTemp(map);
            String hour1 = timeMaxTemp.get("time").toString().substring(11, 13);
            System.out.println(hour1);
            dayData.put("maxTempTime", hour1);
            Map<String, Object> timeMinTemp = realWeatherMapper.getTimeMinTemp(map);
            Map<String, Object> timeMinTemp = weatherMapper.getTimeMinTemp(map);
            String hour2 = timeMinTemp.get("time").toString().substring(11, 13);
            dayData.put("minTempTime", hour2);
            System.out.println(hour2);