From af2ff6353abb09500ff08293490446a4d40d8e87 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 31 Jul 2020 17:03:19 +0800
Subject: [PATCH] 更换天气预测接口,根据城市名获取预测与实测数据对比

---
 src/main/java/com/moral/controller/ScreenController.java |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/moral/controller/ScreenController.java b/src/main/java/com/moral/controller/ScreenController.java
index 87e0182..a0149a3 100644
--- a/src/main/java/com/moral/controller/ScreenController.java
+++ b/src/main/java/com/moral/controller/ScreenController.java
@@ -77,11 +77,13 @@
 import com.moral.util.TempAllocationUtils;
 
 import com.moral.util.mapUtils;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import net.sf.json.JSONString;
+
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.MapUtils;
 import org.apache.commons.net.ftp.FTPClient;
@@ -1964,15 +1966,32 @@
         return params;
     }
 
-    @GetMapping("weather_nextDay")
-    @ApiOperation(value = "������������������������", notes = "������������������������")
+    @GetMapping("forecastO3")
+    @ApiOperation(value = "���������������������������", notes = "���������������������������")
     @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "monitorPointId", defaultValue = "6", value = "���������id", required = true, paramType = "query", dataType = "String"),
+            @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")})
     public ResultBean<List<Map<String, Object>>> getWeatherNextDayDataByRegion(HttpServletRequest request) throws Exception {
         Map<String, Object> parameters = getParametersStartingWith(request, null);
-        parameters.put("typeFormat", "%Y-%m-%d %H");
-        List<Map<String, Object>> resultList = weatherService.getNextDayWeatherDataByRegion(parameters);
+        parameters.put("typeFormat", "%Y-%m-%d %H:%i:%s");
+        List<Map<String, Object>> resultList = weatherService.getForecastAndReal(parameters);
         return new ResultBean<List<Map<String, Object>>>(resultList);
     }
+
+    @GetMapping("weatherData")
+    @ApiOperation(value = "������city���������������������������", notes = "������city���������������������������")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "city", value = "���������", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "time", value = "������(���������2020-03-19)", required = true, paramType = "query", dataType = "String")})
+    public ResultBean<List<Map<String, Object>>> getWeatherData(HttpServletRequest request) throws Exception {
+        Map<String, Object> parameters = getParametersStartingWith(request, null);
+        parameters.put("typeFormat", "%Y-%m-%d %H:%i:%s");
+        List<Map<String, Object>> weatherList = weatherService.getWeatherData(parameters);
+        return new ResultBean<List<Map<String, Object>>>(weatherList);
+    }
+
+    @RequestMapping("updateForecastWeather")
+    public void updateForecastWeather(@RequestBody List<Map<String,Object>> list) {
+        weatherService.updateForecastWeather(list);
+    }
 }

--
Gitblit v1.8.0