gunshi-project-ss/src/main/java/com/gunshi/project/xyt/controller/ReservoirWaterController.java

60 lines
2.0 KiB
Java
Raw Normal View History

2024-07-08 17:41:17 +08:00
package com.gunshi.project.xyt.controller;
import com.gunshi.core.annotation.Post;
import com.gunshi.core.result.R;
import com.gunshi.project.xyt.entity.so.DataQueryCommonSo;
import com.gunshi.project.xyt.entity.so.ReservoirWaterCommonSo;
import com.gunshi.project.xyt.entity.vo.AttResBaseVo;
import com.gunshi.project.xyt.entity.vo.AttResMonitorVo;
import com.gunshi.project.xyt.entity.vo.StRsvrVo;
import com.gunshi.project.xyt.model.StImgRReal;
import com.gunshi.project.xyt.service.ReservoirWaterService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* Description:
* Created by wanyan on 2024/2/20
*
* @author wanyan
* @version 1.0
*/
@RestController
@RequestMapping("/reservoir/water")
@Tag(name = "水库水情")
public class ReservoirWaterController {
@Autowired
private ReservoirWaterService reservoirWaterService;
@Post(path = "/rz", summary = "水库水位")
public R<StRsvrVo> rz(@RequestBody ReservoirWaterCommonSo reservoirWaterCommonSo) {
return R.ok(reservoirWaterService.rz(reservoirWaterCommonSo));
}
@Post(path = "/list", summary = "水库水情列表")
public R<List<AttResBaseVo>> list() {
return R.ok(reservoirWaterService.list());
}
@Post(path = "/real/img", summary = "水库实时图像")
public R<List<StImgRReal>> realImg(@RequestBody ReservoirWaterCommonSo reservoirWaterCommonSo) {
return R.ok(reservoirWaterService.realImg(reservoirWaterCommonSo));
}
@Post(path = "/monitor/data", summary = "监测数据")
public R<List<AttResMonitorVo>> monitorData(@RequestBody @Validated DataQueryCommonSo dataQueryCommonSo) {
return R.ok(reservoirWaterService.monitorData(dataQueryCommonSo));
}
}