zhanghua
2023-04-03 c8688c4239077b123165f3e86a380a41b40f39db
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
40
41
package com.ycl.controller.trend;
 
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ycl.api.CommonResult;
import com.ycl.dto.trend.TrendAnalysisParam;
import com.ycl.service.trend.TrendAnalysisService;
import com.ycl.vo.TrendVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
@Api(tags = "趋势分析")
@RestController
@RequestMapping("/trendAnalysis")
public class TrendAnalysisController {
    @Autowired
    TrendAnalysisService trendAnalysisService;
 
    @ApiOperation("数据查询")
    @PostMapping("/info")
    public CommonResult<List<TrendVo>> list(@RequestBody TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) {
        return CommonResult.success(trendAnalysisService.list(trendAnalysisParam,pageSize,pageNum));
    }
 
    @ApiOperation("点位数据查询")
    @GetMapping("/pointInfo")
    public CommonResult<List<TrendVo>> queryPointInfo(@RequestParam(required = false) String longitude,
                                                      @RequestParam(required = false) String latitude) {
        return CommonResult.success(trendAnalysisService.queryPointInfo(longitude,latitude));
    }
 
    @ApiOperation("首次报警点位数据查询")
    @PostMapping("/firstInfo")
    public CommonResult<List<TrendVo>> queryListByCount(@RequestBody TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) {
        return CommonResult.success(trendAnalysisService.queryListByCount(trendAnalysisParam,pageSize,pageNum));
    }
}