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.TrendAnalysisVo;
|
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("点位数据查询")
|
@GetMapping("/queryPointInfoByTime")
|
public CommonResult<TrendAnalysisVo> queryPointInfoByTime(@RequestParam Long pointId,
|
@RequestParam(required = false) String startTime,
|
@RequestParam(required = false) String endTime) {
|
return CommonResult.success(trendAnalysisService.queryPointInfoByTime(pointId, startTime, endTime));
|
}
|
|
@ApiOperation("首次报警点位数据查询")
|
@PostMapping("/firstInfo")
|
public CommonResult<List<TrendVo>> queryListByCount(@RequestBody TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) {
|
return CommonResult.success(trendAnalysisService.queryListByCount(trendAnalysisParam, pageSize, pageNum));
|
}
|
}
|