From 8b0501f73b6d92b611c7df74535566f65faa7d7b Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Thu, 17 Sep 2020 13:51:15 +0800 Subject: [PATCH] update --- src/main/java/com/moral/controller/ScreenController.java | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/moral/controller/ScreenController.java b/src/main/java/com/moral/controller/ScreenController.java index 867b4ec..637e37d 100644 --- a/src/main/java/com/moral/controller/ScreenController.java +++ b/src/main/java/com/moral/controller/ScreenController.java @@ -88,7 +88,6 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; import org.xml.sax.InputSource; - import static com.moral.common.util.ResourceUtil.getValue; import static com.moral.common.util.WebUtils.getParametersStartingWith; import static java.util.Calendar.*; @@ -175,6 +174,7 @@ @Resource private QualityDailyService qualityDailyService; + /** * Screen login. ������������ @@ -1996,6 +1996,8 @@ List list=deviceService.byMonitorIdGetDeviceAndWind(monitorPointId,time,table); return list; } + + //������������ @GetMapping("/windAndDeviceDataByArea") @ResponseBody public List windAndDeviceDataByArea(String monitorPointId) { @@ -2012,8 +2014,6 @@ mon=""+month; } String table="history_minutely_"+year+mon; - log.info(table); - log.info(time); List list=deviceService.byMonitorIdGetDeviceAndWindSpecial(monitorPointId,time,table); return list; } @@ -2030,7 +2030,7 @@ } @GetMapping("weatherData") - @ApiOperation(value = "������city���������������������������", notes = "������city���������������������������") + @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")}) @@ -2038,6 +2038,30 @@ Map<String, Object> parameters = getParametersStartingWith(request, null); List<Map<String, Object>> weatherList = weatherService.getWeatherData(parameters); return new ResultBean<List<Map<String, Object>>>(weatherList); + } + + @GetMapping("weatherDataDay") + @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>>> getWeatherDataByDay(HttpServletRequest request) throws Exception { + Map<String, Object> parameters = getParametersStartingWith(request, null); + List<Map<String, Object>> weatherList = weatherService.getWeatherDataByDay(parameters); + return new ResultBean<List<Map<String, Object>>>(weatherList); + } + + @GetMapping("monitorDeviceData") + @ApiOperation(value = "���������������5������������������������", notes = "���������������5������������������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "city", value = "���������", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "time", value = "������(���������2020-03-15)", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "type", value = "������(5���������m,������������h)", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "range", value = "������������������������(������������������m,���������a)", required = true, paramType = "query", dataType = "String")}) + public ResultBean<List<Map<String, Object>>> get5MinutesOrHalfHour(HttpServletRequest request) throws Exception { + Map<String, Object> parameters = getParametersStartingWith(request, null); + List<Map<String, Object>> deviceData = historyMinutelyService.get5MinutesOrHalfHour(parameters); + return new ResultBean<List<Map<String, Object>>>(deviceData); } @PostMapping("updateForecastWeather") @@ -2189,4 +2213,18 @@ return new ResultBean<List<Map<String, Object>>>(list); } + + + @GetMapping("/contrastFactor") + @ApiOperation(value = "������������", notes = "������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "mac", value = "������mac", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "sensor", value = "������", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "time", value = "������(���������2020-03-19���20���21)", required = true, paramType = "query", dataType = "String")}) + public ResultBean<List<Map<String, Object>>> contrastFactor(HttpServletRequest request) throws Exception { + Map<String, Object> parameters = getParametersStartingWith(request, null); + List list=historyHourlyService.getDataByMacAndTime(parameters); + //System.out.println(list); + return new ResultBean<List<Map<String, Object>>>(list); + } } -- Gitblit v1.8.0