|
@@ -1,26 +1,25 @@
|
|
|
package com.gyee.frame.controller.weather;
|
|
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import com.gyee.frame.common.conf.AjaxStatus;
|
|
|
import com.gyee.frame.common.domain.AjaxResult;
|
|
|
+import com.gyee.frame.model.auto.Weatherfd;
|
|
|
import com.gyee.frame.model.custom.DataVo;
|
|
|
+import com.gyee.frame.model.custom.Tablepar;
|
|
|
import com.gyee.frame.service.weather.WeatherService;
|
|
|
import com.gyee.frame.service.websocket.GenreSetPushService;
|
|
|
import com.gyee.frame.service.websocket.RealPowerPushService;
|
|
|
+import com.gyee.frame.util.DateUtils;
|
|
|
import com.gyee.frame.util.StringUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Controller
|
|
|
@RequestMapping("/weather")
|
|
@@ -109,4 +108,18 @@ public class WeatherAnalysisController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @GetMapping("/history/list")
|
|
|
+ @ResponseBody
|
|
|
+ @ApiOperation(value = "气象历史数据查询", notes = "气象历史数据查询")
|
|
|
+ public AjaxResult getWeatherHistory(Tablepar tablepar,
|
|
|
+ @RequestParam("wpId") String wpId,
|
|
|
+ @RequestParam("startTs") String startTs,
|
|
|
+ @RequestParam("endTs") String endTs){
|
|
|
+ Date begin = DateUtils.parseDate(startTs);
|
|
|
+ Date end = DateUtils.parseDate(endTs);
|
|
|
+ PageInfo<Weatherfd> list = weatherService.getWeatherHistory(tablepar, wpId, begin, end);
|
|
|
+ return AjaxResult.successData(AjaxStatus.success.code, list);
|
|
|
+ }
|
|
|
+
|
|
|
}
|