package com.moral.api.controller;
|
|
import com.moral.api.entity.GovMonitorPoint;
|
import com.moral.api.service.GovMonitorPointService;
|
import com.moral.constant.ResponseCodeEnum;
|
import com.moral.constant.ResultMessage;
|
import io.swagger.annotations.Api;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
/**
|
* @ClassName
|
* @Description TODO
|
* @Author 陈凯裕
|
* @Date 2021/9/24 9:07
|
* @Version TODO
|
**/
|
@Slf4j
|
@Api(tags = {"国控站"})
|
@RestController
|
@CrossOrigin(origins = "*", maxAge = 3600)
|
@RequestMapping("/govMonitorPoint")
|
public class GovMonitorPointController {
|
|
@Autowired
|
GovMonitorPointService govMonitorPointService;
|
|
|
/**
|
* @Description: 查询国控站以及数据接口接口
|
* @Param: [regionCode,sensorCode]
|
* @return: com.moral.constant.ResultMessage
|
* @Author: 陈凯裕
|
* @Date: 2021/9/9
|
*/
|
@GetMapping("queryStateControlStation")
|
public ResultMessage queryStateControlStation(Integer regionCode,String sensorCode) {
|
|
List<GovMonitorPoint> govMonitorPoints = govMonitorPointService.queryGovMonitorPointAndDataByRegionCode(regionCode,sensorCode);
|
|
return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(), govMonitorPoints);
|
}
|
}
|