From 836ec39fdad422b1a148699a4c5fb8c5b4d395f0 Mon Sep 17 00:00:00 2001
From: zuoxiao <lf_zuo@163.com>
Date: 星期三, 25 六月 2025 11:04:33 +0800
Subject: [PATCH] feat(card): 添加管理类型卡写卡功能并优化卡片相关逻辑- 在 OperateTypeENUM 中添加 SUPPLEMENT 和 MANAGEMENT_CARD_WRITE 枚举值 - 在 SeManagementCard 中添加 cancelTime 和 state 字段 - 更新相关 mapper 和 XML 文件以支持新增字段 - 修改 CardSv 中的回调处理逻辑,支持管理类型卡写卡 - 优化 CreateManagementCardDto 中识别码的示例值

---
 pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java |   48 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 46 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..a1803ac 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,45 @@
      * @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) ;
+        Integer itemTotal = prFlowmeterMapper.getRecordCountOfFlowMeterByOthers(params);
+        QueryResultVo<List<VoFlowMeter>> rsVo = new QueryResultVo<>() ;
+        rsVo.pageSize = queryVo.pageSize ;
+        rsVo.pageCurr = queryVo.pageCurr ;
+
+        // 璁$畻绗﹀悎鏉′欢鐨勮褰曟暟
+        rsVo.calculateAndSet(itemTotal.longValue(), params);
+        rsVo.obj = prFlowmeterMapper.getFlowMeters(params);
+
+        return rsVo ;
+    }
+
+    /**
+     * 寰楀埌鍏ㄩ儴娴侀噺璁�
+     * @return
+     */
+    public List<PrFlowmeter> getFlowMeterAll(){
+        List<PrFlowmeter> all = prFlowmeterMapper.selectAll();
+        return all;
+    }
+
+    /**
+     * 缁欐祦閲忚琛ㄥ姞鐩戞祴绔橧D澶栭敭
+     * @param
+     * @return
+     */
+    public Integer flowmeterAddMonId(PrFlowmeter record){
+        return prFlowmeterMapper.flowmeterAddMonId(record);
     }
 }

--
Gitblit v1.8.0