From 93558fd91ec870d7c8c758ace39501035349bed4 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期五, 25 十月 2024 10:11:17 +0800
Subject: [PATCH] 2024-10-25 朱宝民 优化微信支付JSAPI下单
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataAlarmVo.java | 44 +++++++++++++++++++++++++++++++++++++++-----
1 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataAlarmVo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataAlarmVo.java
index 25bd859..bc263ac 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataAlarmVo.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataAlarmVo.java
@@ -1,9 +1,10 @@
package com.dy.common.mw.protocol.p206V1_0_0.upVos;
+import com.dy.common.mw.protocol.UpDataVo;
import lombok.Data;
@Data
-public class DataAlarmVo {
+public class DataAlarmVo implements UpDataVo {
public Byte batteryVolt ;// 钃勭數姹犵數鍘�
public Byte loss ;//婕忔崯
public Byte meter ;//娴侀噺璁℃晠闅�
@@ -20,23 +21,56 @@
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 += "钃勭數姹犵數鍘嬫姤璀�" ;
+ txt += (hasTxt?"銆�":"") + "钃勭數姹犵數鍘嬫姤璀�" ;
+ hasTxt = true ;
}
if(meter != null && meter == 1){
- txt += "銆佹祦閲忚鏁呴殰鎶ヨ" ;
+ txt += (hasTxt?"銆�":"") + "娴侀噺璁℃晠闅滄姤璀�" ;
+ hasTxt = true ;
}
if(valve != null && valve == 1){
- txt += "銆侀榾闂ㄦ晠闅滄姤璀�" ;
+ txt += (hasTxt?"銆�":"") + "闃�闂ㄦ晠闅滄姤璀�" ;
+ hasTxt = true ;
}
if(loss != null && loss == 1){
- txt += "銆佹紡鎹熸姤璀�" ;
+ 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");
--
Gitblit v1.8.0