于紫祥_1901
2020-08-24 7c32c8a9ec7943112360adc839e5292be40db74d
风场图update
5 files modified
23 ■■■■ changed files
src/main/java/com/moral/controller/ScreenController.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/mapper/HistoryMapper.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/service/HistoryService.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/service/impl/HistoryServiceImpl.java 6 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/HistoryMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/controller/ScreenController.java
@@ -1959,6 +1959,9 @@
            if (mac!=null){
                Device device=deviceService.byMacGetDevice(mac);
                List list1= LatLngTransformation.Convert_BD09_To_GCJ02(device.getLatitude(),device.getLongitude());
                if (device.getState()!=4+""){
                    devMap.put("state",device.getState());
                }
                devMap.put("lat",list1.get(1));
                devMap.put("lng",list1.get(0));
                devMap.put("monitorPointId",device.getMonitorPointId());
@@ -1990,8 +1993,6 @@
            mon=""+month;
        }
        String table="history_minutely_"+year+mon;
        log.info(table);
        log.info(time);
        List list=deviceService.byMonitorIdGetDeviceAndWind(monitorPointId,time,table);
        return list;
    }
@@ -2021,7 +2022,7 @@
    @ApiOperation(value = "预测和实际臭氧对比", notes = "预测和实际臭氧对比")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "monitorPointId", defaultValue = "1", value = "监控站id", required = true, paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "time", value = "时间(格式:2020-03-19)", required = true, paramType = "query", dataType = "String")})
            @ApiImplicitParam(name = "time", value = "时6间(格式:2020-03-19)", required = true, paramType = "query", dataType = "String")})
    public ResultBean<List<Map<String, Object>>> getWeatherNextDayDataByRegion(HttpServletRequest request) throws Exception {
        Map<String, Object> parameters = getParametersStartingWith(request, null);
        List<Map<String, Object>> resultList = weatherService.getForecastAndReal(parameters);
src/main/java/com/moral/mapper/HistoryMapper.java
@@ -39,4 +39,7 @@
    int getNum(@Param("timef") String timef,
               @Param("timea") String timea);
    String getJsonData(@Param("mac") String mac,
                       @Param("time") String time,
                       @Param("table") String table);
}
src/main/java/com/moral/service/HistoryService.java
@@ -36,5 +36,7 @@
    //获取一天的所有臭氧值
    List<Map<String, Object>> getO3AVG(Map<String, Object> parameters);
    String getJsonData(String mac,String time,String table);
}
src/main/java/com/moral/service/impl/HistoryServiceImpl.java
@@ -644,4 +644,10 @@
        }
        return maxList;
    }
    @Override
    public String getJsonData(String mac, String time,String table) {
        return historyMapper.getJsonData(mac,time,table);
    }
}
src/main/resources/mapper/HistoryMapper.xml
@@ -286,5 +286,10 @@
         and mac=#{mac}
         ORDER BY `time`
    </select>
    <select id="getJsonData" resultType="java.lang.String">
            select `json` from ${table}
        where  time = #{time} and mac = #{mac}
    </select>
</mapper>