From acdbf06288c8cbeac4abe3518e8157d753e72574 Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期三, 19 六月 2024 17:49:47 +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 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 54 insertions(+), 2 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 08ff400..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; /** @@ -57,8 +61,56 @@ * @param flowMonitoringId 娴侀噺鐩戞祴绔欑紪鍙� * @return */ - public Integer getRecordCountOfFlowMonitoring(Long flowMonitoringId) { - return prFlowMonitoringMapper.getRecordCountOfFlowMonitoring(flowMonitoringId); + 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