| | |
| | | package com.yssh.controller; |
| | | |
| | | import com.yssh.entity.ForecastAnalyseVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.yssh.entity.vo.ForecastAnalyseVo; |
| | | import com.yssh.service.IForecastAnalyseService; |
| | | import com.yssh.service.ForecastAnalyseService; |
| | | import com.yssh.utils.Result; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Api(tags="预测分析") |
| | | @RestController |
| | | @RequestMapping("/forecast") |
| | | @SuppressWarnings("rawtypes") |
| | | public class ForecastAnalyseController { |
| | | @Resource |
| | | private ForecastAnalyseService forecastAnalyseService; |
| | | |
| | | @Autowired |
| | | private IForecastAnalyseService forecastAnalyseService; |
| | | |
| | | @GetMapping("/forecastAnalyse") |
| | | @ApiOperation(value = "查询预计及其实际监测数据", notes = "根据所选点位名称及其所选时间段,查询该点位在指定时间段内的监测数据及其预测数据") |
| | | public Result getForecastAnalyse( |
| | | @RequestParam(value = "name", required = true) String name, |
| | | @RequestParam(value = "beginTime", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date beginTime, |
| | | @RequestParam(value = "endTime", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime){ |
| | | @ApiOperation(value = "查询预计及其实际监测数据", notes = "根据所选点位名称及其所选时间段,查询该点位在指定时间段内的监测数据及其预测数据") |
| | | public Result getForecastAnalyse( |
| | | @RequestParam(value = "name", required = true) String name, |
| | | @RequestParam(value = "beginTime", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date beginTime, |
| | | @RequestParam(value = "endTime", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime) { |
| | | List<ForecastAnalyseVo> list = forecastAnalyseService.getForecastAnalyse(name, beginTime, endTime); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | return Result.OK(list); |
| | | } |
| | | } |