2024-07-08 17:41:17 +08:00
|
|
|
package com.gunshi.project.xyt.controller;
|
|
|
|
|
|
|
|
|
|
|
2024-07-15 17:11:36 +08:00
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
2024-07-15 16:58:18 +08:00
|
|
|
import com.gunshi.core.annotation.Get;
|
2024-07-08 17:41:17 +08:00
|
|
|
import com.gunshi.core.annotation.Post;
|
|
|
|
|
import com.gunshi.core.result.R;
|
|
|
|
|
import com.gunshi.project.xyt.entity.so.DataQueryCommonSo;
|
2024-07-15 17:11:36 +08:00
|
|
|
import com.gunshi.project.xyt.entity.so.PicQuerySo;
|
2024-07-08 17:41:17 +08:00
|
|
|
import com.gunshi.project.xyt.entity.so.ReservoirWaterCommonSo;
|
|
|
|
|
import com.gunshi.project.xyt.entity.vo.AttResBaseVo;
|
|
|
|
|
import com.gunshi.project.xyt.entity.vo.AttResMonitorVo;
|
2024-07-15 16:58:18 +08:00
|
|
|
import com.gunshi.project.xyt.entity.vo.AttRvMonitorDetailVo;
|
2024-07-08 17:41:17 +08:00
|
|
|
import com.gunshi.project.xyt.entity.vo.StRsvrVo;
|
2024-07-15 17:11:36 +08:00
|
|
|
import com.gunshi.project.xyt.model.StImgR;
|
2024-07-08 17:41:17 +08:00
|
|
|
import com.gunshi.project.xyt.model.StImgRReal;
|
2024-07-15 16:58:18 +08:00
|
|
|
import com.gunshi.project.xyt.model.StStbprpB;
|
2024-07-08 17:41:17 +08:00
|
|
|
import com.gunshi.project.xyt.service.ReservoirWaterService;
|
2024-07-15 16:58:18 +08:00
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
2024-07-08 17:41:17 +08:00
|
|
|
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;
|
2024-07-15 16:58:18 +08:00
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
2024-07-08 17:41:17 +08:00
|
|
|
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());
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-15 16:58:18 +08:00
|
|
|
@Get(path = "/image/channel", summary = "图像监测视角下拉")
|
|
|
|
|
public R<List<StStbprpB>> channel(@Schema(name = "resCode") @RequestParam("resCode") String resCode) {
|
|
|
|
|
return R.ok(reservoirWaterService.channel(resCode));
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-15 17:11:36 +08:00
|
|
|
@Post(path = "/image/info", summary = "图片信息")
|
|
|
|
|
public R<Page<StImgR>> imageInfo(@RequestBody @Validated PicQuerySo picQuerySo) {
|
|
|
|
|
return R.ok(reservoirWaterService.imageInfo(picQuerySo));
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-08 17:41:17 +08:00
|
|
|
@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));
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-22 11:31:08 +08:00
|
|
|
@Post(path = "/data", summary = "闸阀总览-库容曲线")
|
|
|
|
|
public R<List<AttResMonitorVo>> data(@RequestBody @Validated DataQueryCommonSo dataQueryCommonSo) {
|
|
|
|
|
return R.ok(reservoirWaterService.data(dataQueryCommonSo));
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-15 16:58:18 +08:00
|
|
|
@Get(path = "/detail", summary = "监测详细数据(下方表格)")
|
|
|
|
|
public R<AttRvMonitorDetailVo> detail(@Schema(name = "stcd") @RequestParam("stcd") String stcd) {
|
|
|
|
|
return R.ok(reservoirWaterService.detail(stcd));
|
|
|
|
|
}
|
2024-07-08 17:41:17 +08:00
|
|
|
}
|