From a60332d51fec0ae9f1afecc8c7a018c77e4ac101 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期二, 27 二月 2024 10:03:29 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java | 62 +++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java index 5cde54c..e8b2224 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java @@ -1,12 +1,16 @@ package com.dy.pipIrrProject.flowMonitoring; +import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper; import com.dy.pipIrrGlobal.daoPr.PrFlowMonitoringMapper; import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring; +import com.dy.pipIrrGlobal.voPr.VoFlowMonitoring; import lombok.extern.slf4j.Slf4j; +import org.apache.dubbo.common.utils.PojoUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; /** @@ -51,4 +55,62 @@ public Integer deleteFlowMonitoring(Long flowMonitoringId) { return prFlowMonitoringMapper.deleteFlowMonitoringById(flowMonitoringId); } + + /** + * 鏍规嵁鐩戞祴绔欑紪鍙疯幏鍙栨湭鍒犻櫎鐨勭洃娴嬬珯鏁伴噺 + * @param flowMonitoringId 娴侀噺鐩戞祴绔欑紪鍙� + * @return + */ + public Integer getRecordCountOfFlowMonitoringByFlowMonitoringId(Long flowMonitoringId) { + return prFlowMonitoringMapper.getRecordCountOfFlowMonitoringByFlowMonitoringId(flowMonitoringId); + } + + /** + * 寰楀埌涓�涓祦閲忕洃娴嬬珯 + * @param id 鐩戞祴绔橧D + * @return 鐩戞祴绔欏疄浣� + */ + public PrFlowMonitoring selectById(Long id) { + return prFlowMonitoringMapper.selectByPrimaryKey(id); + } + + /** + * 寰楀埌鍏ㄩ儴娴侀噺鐩戞祴绔� + * @return 鐩戞祴绔欏疄浣撻泦鍚� + */ + public QueryResultVo<List<PrFlowMonitoring>> selectAll(){ + QueryResultVo<List<PrFlowMonitoring>> rsVo = new QueryResultVo<>() ; + rsVo.obj = this.prFlowMonitoringMapper.selectAll() ; + return rsVo ; + } + + + /** + * 鏍规嵁鎸囧畾鏉′欢寰楀埌娴侀噺鐩戞祴绔欏疄浣撹褰� + * @param queryVo 缁欑殑鏉′欢 + * @return 鐩戞祴绔欏疄浣撻泦鍚� + */ + public QueryResultVo<List<VoFlowMonitoring>> getPrFlowMonitorings(QueryVo queryVo){ + Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo) ; + + QueryResultVo<List<VoFlowMonitoring>> rsVo = new QueryResultVo<>() ; + rsVo.pageSize = queryVo.pageSize ; + rsVo.pageCurr = queryVo.pageCurr ; + + // 璁$畻绗﹀悎鏉′欢鐨勮褰曟暟 + Integer itemTotal = prFlowMonitoringMapper.getRecordCountOfFlowMonitoring(params); + rsVo.calculateAndSet(itemTotal.longValue(), params); + rsVo.obj = prFlowMonitoringMapper.getPrFlowMonitoring(params); + + return rsVo ; + } + + /** + * 淇濆瓨淇敼涓�涓祦閲忕洃娴嬬珯瀹炰綋 + * @param po 淇敼鐨勫唴瀹癸紙id涓嶄负绌�) + * @return + */ + public int update (PrFlowMonitoring po){ + return prFlowMonitoringMapper.updateByPrimaryKeySelective(po); + } } -- Gitblit v1.8.0