分页库容曲线
parent
0653c3ad63
commit
7f38997fb8
|
|
@ -78,6 +78,11 @@ public class ReservoirWaterController {
|
|||
return R.ok(reservoirWaterService.data(dataQueryCommonSo));
|
||||
}
|
||||
|
||||
@Post(path = "/data/page", summary = "分页库容曲线")
|
||||
public R<Page<AttResMonitorVo>> dataPage(@RequestBody @Validated PicQuerySo picQuerySo) {
|
||||
return R.ok(reservoirWaterService.dataPage(picQuerySo));
|
||||
}
|
||||
|
||||
@Get(path = "/detail", summary = "监测详细数据(下方表格)")
|
||||
public R<AttRvMonitorDetailVo> detail(@Schema(name = "stcd") @RequestParam("stcd") String stcd) {
|
||||
return R.ok(reservoirWaterService.detail(stcd));
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import lombok.Data;
|
|||
public class PicQuerySo {
|
||||
|
||||
@Schema(description="水库编码")
|
||||
@NotEmpty(message = "水库编码不可为空")
|
||||
private String resCode;
|
||||
|
||||
@Schema(description="测站编码")
|
||||
|
|
|
|||
|
|
@ -189,4 +189,15 @@ public interface AttResBaseMapper extends BaseMapper<AttResBase> {
|
|||
""")
|
||||
AttRvMonitorVo newRz(@Param("stcd") String stcd);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t.stcd,t.tm,t.rz from public.st_rsvr_r t
|
||||
where t.stcd = #{obj.stcd}
|
||||
and t.tm <![CDATA[>=]]> to_timestamp(#{obj.stm},'YYYY-MM-DD HH24:MI:SS')
|
||||
and t.tm <![CDATA[<=]]> to_timestamp(#{obj.etm},'YYYY-MM-DD HH24:MI:SS')
|
||||
and TRIM(TO_CHAR(t.tm, 'MI:SS')) = '00:00'
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
Page<AttResMonitorVo> rzDataPage(Page<AttResMonitorVo> page,@Param("obj") PicQuerySo picQuerySo);
|
||||
}
|
||||
|
|
@ -230,7 +230,18 @@ public class ReservoirWaterService {
|
|||
if(CollectionUtils.isNotEmpty(zvarl)){
|
||||
calcTqData(rzData,zvarl);
|
||||
}
|
||||
//根据监测时间合并雨量和水位数据
|
||||
return rzData;
|
||||
}
|
||||
|
||||
public Page<AttResMonitorVo> dataPage(PicQuerySo picQuerySo) {
|
||||
String stcd = picQuerySo.getStcd();
|
||||
//水位数据
|
||||
Page<AttResMonitorVo> rzData = attResBaseMapper.rzDataPage(picQuerySo.getPageSo().toPage(),picQuerySo);
|
||||
//获取库容曲线关系,算出库容
|
||||
List<StZvarlB> zvarl = zvarl(stcd);
|
||||
if(CollectionUtils.isNotEmpty(zvarl)){
|
||||
calcTqData(rzData.getRecords(),zvarl);
|
||||
}
|
||||
return rzData;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue