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/FlowmeterSv.java | 31 +++++++++++++++++++++++++++++-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java index 84b38f9..3dff9b3 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java @@ -1,10 +1,16 @@ package com.dy.pipIrrProject.flowMonitoring; +import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.daoPr.PrFlowmeterMapper; import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter; +import com.dy.pipIrrGlobal.voPr.VoFlowMeter; 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; /** * @author ZhuBaoMin @@ -42,7 +48,28 @@ * @param flowmeterId * @return */ - public Integer getRecordCountOfFlowmeter(Long flowmeterId) { - return prFlowmeterMapper.getRecordCountOfFlowmeter(flowmeterId); + public Integer getRecordCountOfFlowmeterByCode(Long flowmeterId) { + return prFlowmeterMapper.getRecordCountOfFlowmeterByCode(flowmeterId); + } + + + /** + * 鏍规嵁鎸囧畾鏉′欢寰楀埌娴侀噺璁″疄浣撹褰� + * @param queryVo 缁欑殑鏉′欢 + * @return 娴侀噺璁″疄浣撻泦鍚� + */ + public QueryResultVo<List<VoFlowMeter>> getFlowMeters(QueryVoFlowMeter queryVo){ + Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo) ; + + QueryResultVo<List<VoFlowMeter>> rsVo = new QueryResultVo<>() ; + rsVo.pageSize = queryVo.pageSize ; + rsVo.pageCurr = queryVo.pageCurr ; + + // 璁$畻绗﹀悎鏉′欢鐨勮褰曟暟 + Integer itemTotal = prFlowmeterMapper.getRecordCountOfFlowMeterByOthers(params); + rsVo.calculateAndSet(itemTotal.longValue(), params); + rsVo.obj = prFlowmeterMapper.getFlowMeters(params); + + return rsVo ; } } -- Gitblit v1.8.0