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-common/src/main/java/com/dy/common/mw/protocol/p206V1/upVos/DataAlarmVo.java |   90 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/upVos/DataAlarmVo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/upVos/DataAlarmVo.java
new file mode 100644
index 0000000..b704b26
--- /dev/null
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/upVos/DataAlarmVo.java
@@ -0,0 +1,90 @@
+package com.dy.common.mw.protocol.p206V1.upVos;
+
+import com.dy.common.mw.protocol.UpDataVo;
+import lombok.Data;
+
+@Data
+public class DataAlarmVo implements UpDataVo {
+    public Byte batteryVolt ;// 钃勭數姹犵數鍘�
+    public Byte loss ;//婕忔崯
+    public Byte meter ;//娴侀噺璁℃晠闅�
+    public Byte valve ;//闃�闂�
+
+    public boolean hasAlarm(){
+        boolean flag = false ;
+        if((batteryVolt != null && batteryVolt == 1) ||
+                (loss != null && loss == 1) ||
+                (meter != null && meter == 1) ||
+                (valve != null && valve == 1)){
+            flag = true ;
+        }
+        return flag ;
+    }
+
+
+    public boolean hasAlarmExcludeLoss(){
+        boolean flag = false ;
+        if((batteryVolt != null && batteryVolt == 1) ||
+                (meter != null && meter == 1) ||
+                (valve != null && valve == 1)){
+            flag = true ;
+        }
+        return flag ;
+    }
+
+    public String alarmContent(){
+        String txt = "" ;
+        boolean hasTxt = false ;
+        if(batteryVolt != null && batteryVolt == 1){
+            txt += (hasTxt?"銆�":"") + "钃勭數姹犵數鍘嬫姤璀�" ;
+            hasTxt = true ;
+        }
+        if(meter != null && meter == 1){
+            txt += (hasTxt?"銆�":"") + "娴侀噺璁℃晠闅滄姤璀�" ;
+            hasTxt = true ;
+        }
+        if(valve != null && valve == 1){
+            txt += (hasTxt?"銆�":"") + "闃�闂ㄦ晠闅滄姤璀�" ;
+            hasTxt = true ;
+        }
+       if(loss != null && loss == 1){
+            txt += (hasTxt?"銆�":"") + "婕忔崯鎶ヨ" ;
+           hasTxt = true ;
+        }
+        return txt ;
+    }
+
+    public String alarmContentExcludeLoss(){
+        String txt = "" ;
+        boolean hasTxt = false ;
+        if(batteryVolt != null && batteryVolt == 1){
+            txt += (hasTxt?"銆�":"") + "钃勭數姹犵數鍘嬫姤璀�" ;
+            hasTxt = true ;
+        }
+        if(meter != null && meter == 1){
+            txt += (hasTxt?"銆�":"") + "娴侀噺璁℃晠闅滄姤璀�" ;
+            hasTxt = true ;
+        }
+        if(valve != null && valve == 1){
+            txt += (hasTxt?"銆�":"") + "闃�闂ㄦ晠闅滄姤璀�" ;
+            hasTxt = true ;
+        }
+        return txt ;
+    }
+    public String toString(){
+        StringBuilder str = new StringBuilder() ;
+        str.append("      鎶ヨ:\n");
+        str.append("         钃勭數姹犵數鍘嬶細");
+        str.append(batteryVolt==null?"":(batteryVolt==1?"鎶ヨ(1)":"姝e父(0)"));
+        str.append("\n");
+        str.append("         婕忔崯锛�     ");
+        str.append(loss==null?"":(loss==1?"鎶ヨ(1)":"姝e父(0)"));
+        str.append("\n");
+        str.append("         娴侀噺璁℃晠闅滐細");
+        str.append(meter==null?"":(meter==1?"鎶ヨ(1)":"姝e父(0)"));
+        str.append("\n");
+        str.append("         闃�闂細     ");
+        str.append(valve==null?"":(valve==1?"鎶ヨ(1)":"姝e父(0)"));
+        return str.toString() ;
+    }
+}

--
Gitblit v1.8.0