流量数据查询接口
parent
35baafdfb2
commit
d350eb591a
|
|
@ -3,11 +3,10 @@ package com.gunshi.project.xyt.controller;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.gunshi.core.result.R;
|
import com.gunshi.core.result.R;
|
||||||
import com.gunshi.project.xyt.entity.vo.GateHistoryInfoVo;
|
import com.gunshi.project.xyt.entity.vo.GateHistoryInfoVo;
|
||||||
import com.gunshi.project.xyt.model.StWaterQualityR;
|
|
||||||
import com.gunshi.project.xyt.service.GateService;
|
|
||||||
import com.gunshi.project.xyt.entity.vo.GateInfoVo;
|
import com.gunshi.project.xyt.entity.vo.GateInfoVo;
|
||||||
|
import com.gunshi.project.xyt.entity.vo.StFlowRVo;
|
||||||
|
import com.gunshi.project.xyt.service.GateService;
|
||||||
import com.gunshi.project.xyt.so.GateHistoryPageSo;
|
import com.gunshi.project.xyt.so.GateHistoryPageSo;
|
||||||
import com.gunshi.project.xyt.so.WaterQualityPageSo;
|
|
||||||
import com.gunshi.project.xyt.validate.markers.QueryPage;
|
import com.gunshi.project.xyt.validate.markers.QueryPage;
|
||||||
import com.gunshi.project.xyt.validate.markers.QueryTimeRange;
|
import com.gunshi.project.xyt.validate.markers.QueryTimeRange;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
@ -50,4 +49,10 @@ public class GateController {
|
||||||
return R.ok(gateService.page(gateHistoryPageSo));
|
return R.ok(gateService.page(gateHistoryPageSo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "流量计列表")
|
||||||
|
@GetMapping("/flow/list")
|
||||||
|
public R<List<StFlowRVo>> flowList() {
|
||||||
|
return R.ok(gateService.queryFlowList());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
package com.gunshi.project.xyt.controller;
|
package com.gunshi.project.xyt.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.gunshi.addressbook.entity.so.UamsOrgPageSo;
|
|
||||||
import com.gunshi.addressbook.entity.vo.UamsOrgFullInfoVo;
|
|
||||||
import com.gunshi.addressbook.model.UamsOrgB;
|
|
||||||
import com.gunshi.core.result.R;
|
import com.gunshi.core.result.R;
|
||||||
import com.gunshi.project.xyt.entity.dto.StGateRepairRecordDto;
|
import com.gunshi.project.xyt.entity.dto.StGateRepairRecordDto;
|
||||||
import com.gunshi.project.xyt.entity.vo.GateRepairDetailVo;
|
import com.gunshi.project.xyt.entity.vo.GateRepairDetailVo;
|
||||||
|
|
@ -58,7 +55,7 @@ public class GateRepairRecordController {
|
||||||
|
|
||||||
@Operation(summary = "根据recordId删除检修记录")
|
@Operation(summary = "根据recordId删除检修记录")
|
||||||
@Parameter(name = "recordId", description = "检修记录id")
|
@Parameter(name = "recordId", description = "检修记录id")
|
||||||
@DeleteMapping("/delete")
|
@GetMapping("/delete")
|
||||||
public R<String> delete(@RequestParam("recordId") Long recordId){
|
public R<String> delete(@RequestParam("recordId") Long recordId){
|
||||||
return R.ok(gateRepairRecordService.deleteRecord(recordId));
|
return R.ok(gateRepairRecordService.deleteRecord(recordId));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.gunshi.project.xyt.entity.vo;
|
package com.gunshi.project.xyt.entity.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -17,6 +19,7 @@ import java.util.Date;
|
||||||
public class GateInfoVo {
|
public class GateInfoVo {
|
||||||
|
|
||||||
@Schema(description = "闸阀ID")
|
@Schema(description = "闸阀ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long gateId;
|
private Long gateId;
|
||||||
|
|
||||||
@Schema(description = "闸阀名称")
|
@Schema(description = "闸阀名称")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.gunshi.project.xyt.entity.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.gunshi.core.dateformat.DateFormatString;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闸门详细信息
|
||||||
|
* Created by wanyan on 2024/1/26
|
||||||
|
*
|
||||||
|
* @author wanyan
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StFlowRVo {
|
||||||
|
|
||||||
|
@Schema(description = "测站编码")
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
@Schema(description="测站名称")
|
||||||
|
private String stnm;
|
||||||
|
|
||||||
|
@Schema(description = "采集时间")
|
||||||
|
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
@Schema(description = "通道")
|
||||||
|
private String chid;
|
||||||
|
|
||||||
|
@Schema(description = "小时流量")
|
||||||
|
private BigDecimal hq;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -3,13 +3,14 @@ package com.gunshi.project.xyt.mapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.gunshi.db.dao.IMapper;
|
import com.gunshi.db.dao.IMapper;
|
||||||
import com.gunshi.project.xyt.entity.vo.GateHistoryInfoVo;
|
import com.gunshi.project.xyt.entity.vo.GateHistoryInfoVo;
|
||||||
import com.gunshi.project.xyt.model.StGateB;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.gunshi.project.xyt.entity.vo.GateInfoVo;
|
import com.gunshi.project.xyt.entity.vo.GateInfoVo;
|
||||||
|
import com.gunshi.project.xyt.entity.vo.StFlowRVo;
|
||||||
|
import com.gunshi.project.xyt.model.StGateB;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StGateBMapper extends IMapper<StGateB> {
|
public interface StGateBMapper extends IMapper<StGateB> {
|
||||||
int batchInsert(@Param("list") List<StGateB> list);
|
int batchInsert(@Param("list") List<StGateB> list);
|
||||||
|
|
@ -18,4 +19,6 @@ public interface StGateBMapper extends IMapper<StGateB> {
|
||||||
List<GateInfoVo> queryGateList();
|
List<GateInfoVo> queryGateList();
|
||||||
|
|
||||||
Page<GateHistoryInfoVo> gateHistory(Page<Object> page,@Param("gateId") Long gateId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
Page<GateHistoryInfoVo> gateHistory(Page<Object> page,@Param("gateId") Long gateId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||||
|
|
||||||
|
List<StFlowRVo> queryFlowList();
|
||||||
}
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ package com.gunshi.project.xyt.service;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.gunshi.project.xyt.entity.vo.GateHistoryInfoVo;
|
import com.gunshi.project.xyt.entity.vo.GateHistoryInfoVo;
|
||||||
import com.gunshi.project.xyt.entity.vo.GateInfoVo;
|
import com.gunshi.project.xyt.entity.vo.GateInfoVo;
|
||||||
|
import com.gunshi.project.xyt.entity.vo.StFlowRVo;
|
||||||
import com.gunshi.project.xyt.so.GateHistoryPageSo;
|
import com.gunshi.project.xyt.so.GateHistoryPageSo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -28,4 +29,10 @@ public interface GateService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Page<GateHistoryInfoVo> page(GateHistoryPageSo gateHistoryPageSo);
|
Page<GateHistoryInfoVo> page(GateHistoryPageSo gateHistoryPageSo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流量计列表查询
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<StFlowRVo> queryFlowList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.gunshi.db.dao.BaseOrderDao;
|
||||||
import com.gunshi.db.dto.DateTimeRangeSo;
|
import com.gunshi.db.dto.DateTimeRangeSo;
|
||||||
import com.gunshi.project.xyt.entity.vo.GateHistoryInfoVo;
|
import com.gunshi.project.xyt.entity.vo.GateHistoryInfoVo;
|
||||||
import com.gunshi.project.xyt.entity.vo.GateInfoVo;
|
import com.gunshi.project.xyt.entity.vo.GateInfoVo;
|
||||||
|
import com.gunshi.project.xyt.entity.vo.StFlowRVo;
|
||||||
import com.gunshi.project.xyt.mapper.StGateBMapper;
|
import com.gunshi.project.xyt.mapper.StGateBMapper;
|
||||||
import com.gunshi.project.xyt.model.StGateB;
|
import com.gunshi.project.xyt.model.StGateB;
|
||||||
import com.gunshi.project.xyt.service.GateService;
|
import com.gunshi.project.xyt.service.GateService;
|
||||||
|
|
@ -55,4 +56,9 @@ public class GateServiceImpl extends BaseOrderDao<StGateBMapper, StGateB> implem
|
||||||
|
|
||||||
return stGateBMapper.gateHistory(gateHistoryPageSo.getPageSo().toPage(),gateHistoryPageSo.getGateId(),startTime,endTime);
|
return stGateBMapper.gateHistory(gateHistoryPageSo.getPageSo().toPage(),gateHistoryPageSo.getGateId(),startTime,endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StFlowRVo> queryFlowList() {
|
||||||
|
return stGateBMapper.queryFlowList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,4 +56,8 @@
|
||||||
and a.TM <![CDATA[ <= ]]> #{endTime}
|
and a.TM <![CDATA[ <= ]]> #{endTime}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryFlowList" resultType="com.gunshi.project.xyt.entity.vo.StFlowRVo">
|
||||||
|
select a.stcd,a.tm,a.chid,a.hq,b.stnm from ST_FLOW_R a
|
||||||
|
left join ST_STBPRP_B b on a.stcd = b.stcd
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue