燕山石化溯源三维电子沙盘-【后端】-服务
13693261870
2023-07-14 db44f336e46825afc855466512065cc08e5790bd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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.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.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;
 
    @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) {
        List<ForecastAnalyseVo> list = forecastAnalyseService.getForecastAnalyse(name, beginTime, endTime);
 
        return Result.OK(list);
    }
}