From e3e9b168cbd9a60858843c622a3859896aefe5fb Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Mon, 07 Sep 2020 10:40:00 +0800
Subject: [PATCH] update
---
src/main/java/com/moral/controller/ScreenController.java | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/moral/controller/ScreenController.java b/src/main/java/com/moral/controller/ScreenController.java
index 207fe08..867b4ec 100644
--- a/src/main/java/com/moral/controller/ScreenController.java
+++ b/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,16 +1993,36 @@
mon=""+month;
}
String table="history_minutely_"+year+mon;
- log.info(table);
- log.info(time);
List list=deviceService.byMonitorIdGetDeviceAndWind(monitorPointId,time,table);
return list;
}
+ @GetMapping("/windAndDeviceDataByArea")
+ @ResponseBody
+ public List windAndDeviceDataByArea(String monitorPointId) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.MINUTE, (calendar.get(Calendar.MINUTE) - 2));
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+ String time = df.format(calendar.getTime())+":00";
+ int year = calendar.get(Calendar.YEAR);
+ int month = calendar.get(Calendar.MONTH) + 1;
+ String mon;
+ if (month<10){
+ mon="0"+month;
+ }else {
+ mon=""+month;
+ }
+ String table="history_minutely_"+year+mon;
+ log.info(table);
+ log.info(time);
+ List list=deviceService.byMonitorIdGetDeviceAndWindSpecial(monitorPointId,time,table);
+ return list;
+ }
+
@GetMapping("forecastO3")
@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);
--
Gitblit v1.8.0