From 9619e60e3075a432d692f3cd8b76787568c53aad Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 07 五月 2025 15:56:58 +0800
Subject: [PATCH] 1、完善代码;2、禁止输出SpringBoot启动时Banner。
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/AlarmVo.java | 98 ++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 89 insertions(+), 9 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/AlarmVo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/AlarmVo.java
index e39949b..c1729b0 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/AlarmVo.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/AlarmVo.java
@@ -6,23 +6,97 @@
* @Description
*/
public class AlarmVo {
+ public static final byte DevOpenState = 1 ;
+ public static final byte DevCloseState = 0 ;
public Byte statePump ; //娉�/闃�鐘舵�� (1锛氬紑娉�/闃�锛�0锛氬叧娉�/闃�)
public Byte alarmWaterRemain ; //鍓╀綑姘撮噺鎶ヨ (1锛氬皬浜庢姤璀︿笂闄愭姤璀� 0锛氭甯�)
public Byte alarm0WaterRemain ; //鍓╀綑姘撮噺涓�0鍏虫车/闃� (1锛氬墿浣欐按閲忎负0鍏虫车 0锛氭甯�)
public Byte alarmExceedYear ; //骞村害瓒呴噰鎶ヨ (1锛氬勾鐢ㄦ按閲忓ぇ浜庨檺鍒舵按閲忔姤璀� 0锛氭甯�)
public Byte alarmWaterMeterFault ; //澶栭儴娴侀噺璁℃晠闅� (1锛氭祦閲忚鏁呴殰鎶ヨ 0锛氭甯�)
- public Byte alarmSteal ; //鍋锋按鎶ヨ (1锛氱粫寮�鎺у埗鍣ㄧ敤姘存姤璀� 0锛氭甯�)
+ public Byte alarmSteal ; //鍋锋按鎶ヨ (1锛氱粫寮�鎺у埗鍣ㄧ敤姘存姤璀� 0锛氭甯�)(2025-02-19锛氬搴旈澇鎬诲崗璁腑鐨勬紡鎹熸姤璀︼紝鍗冲叧闃�鎬佹椂鏈夋祦閲忎骇鐢�)
public Byte alarmWaterMeterBreak ; //娴侀噺璁℃崯鍧忔姤璀� (1锛氭甯搁�氳浣嗙灛鏃朵负0鎶ヨ 0锛氭甯�)
public Byte alarmEleMeterFault ; //鐢佃〃鏁呴殰鎶ヨ (1锛氬拰鐢佃〃閫氳鏂垨鏁版嵁涓嶆甯� 0锛氭甯�)
public Byte alarm0MoneyRemain ; //鍓╀綑閲戦涓�0 (1锛氬墿浣欓噾棰濅负0鎶ヨ 0锛氭甯�)
- public Byte alarmInnerDoor ; //鎺у埗鍣ㄥ唴闂ㄦ姤璀� (1锛氬唴闂ㄦ墦寮�鎶ヨ 0锛氭甯�)
- public Byte alarmOuterDoor ; //鎺у埗鍣ㄥ闂ㄦ姤璀� (1锛氬闂ㄦ墦寮�鎶ヨ 0锛氭甯�)
+ public Byte alarmDoor; //鎺у埗鍣ㄥ唴闂ㄦ姤璀� (1锛氬唴闂ㄦ墦寮�鎶ヨ 0锛氭甯�)
+ public Byte alarmBatteryVolt; //鐢垫睜鐢靛帇浣庢姤璀� (1锛氱數姹犱綆鍏抽榾鎶ヨ 0锛氭甯�)
public Byte alarmEleMiss ; //浜ゆ祦缂洪」鎶ヨ (1锛氫笁鐩哥己椤规姤璀� 0锛氭甯�)
- public Byte alarmEleExceed ; //浜ゆ祦杩囨祦鎶ヨ (1锛氫氦娴佽繃娴佹姤璀� 0锛氭甯�)
+ public Byte alarmEleExceed ; //浜ゆ祦杩囨祦鎶ヨ (1锛氫氦娴佽繃娴佹姤璀� 0锛氭甯�)
public Byte alarmEleLowVolt ; //涓夌浉鐢垫瑺鍘嬫姤璀� (1锛氭瑺鍘嬫姤璀� 0锛氭甯�)
- public Byte stateIcEnable ; //IC鍗′娇鑳� (1銆両C鏈夊埛鍗℃敮鎸� 0锛氫笉鏀寔)
+ public Byte stateIcEnable ; //IC鍗′娇鑳� (1锛欼C鏈夊埛鍗℃敮鎸� 0锛氫笉鏀寔)
+ public Byte alarmBlockValve; //闃�闂ㄦ晠闅滄姤璀� (1:闃�闂ㄥ牭杞� 0锛氶榾闂ㄦ甯革紙涓嶅牭杞級)
+ public Byte stateOpClValve ; //闃�闂ㄥ紑鍏崇姸鎬� (1锛氬紑鍏抽榾涓嶅埌浣� 0锛氬紑鍏抽榾鍒颁綅)
+ public boolean hasAlarm(){
+ boolean flag = false ;
+ if((alarmBatteryVolt != null && alarmBatteryVolt == 1) ||
+ (alarmWaterMeterFault != null && alarmWaterMeterFault == 1) ||
+ (alarmWaterMeterBreak != null && alarmWaterMeterBreak == 1) ||
+ (alarmSteal != null && alarmSteal == 1) ||
+ (alarmBlockValve != null && alarmBlockValve == 1) ){
+ flag = true ;
+ }
+ return flag ;
+ }
+
+ public boolean hasAlarmExcludeLoss(){
+ boolean flag = false ;
+ if((alarmBatteryVolt != null && alarmBatteryVolt == 1) ||
+ (alarmWaterMeterFault != null && alarmWaterMeterFault == 1) ||
+ (alarmWaterMeterBreak != null && alarmWaterMeterBreak == 1)||
+ (alarmBlockValve != null && alarmBlockValve == 1) ){
+ flag = true ;
+ }
+ return flag ;
+ }
+
+ public String alarmContent(){
+ String txt = "" ;
+ boolean hasTxt = false ;
+ if(alarmBatteryVolt != null && alarmBatteryVolt == 1){
+ txt += (hasTxt?"銆�":"") + "鐢垫睜鐢靛帇浣庢姤璀�" ;
+ hasTxt = true ;
+ }
+ if(alarmWaterMeterFault != null && alarmWaterMeterFault == 1){
+ txt += (hasTxt?"銆�":"") + "澶栭儴娴侀噺璁℃晠闅滄姤璀�" ;
+ hasTxt = true ;
+ }
+ if(alarmWaterMeterBreak != null && alarmWaterMeterBreak == 1){
+ txt += (hasTxt?"銆�":"") + "娴侀噺璁℃晠闅滄姤璀�" ;
+ hasTxt = true ;
+ }
+ if(alarmSteal != null && alarmSteal == 1){
+ txt += (hasTxt?"銆�":"") + "婕忔崯鎶ヨ" ;
+ hasTxt = true ;
+ }
+ if(alarmBlockValve != null && alarmBlockValve == 1){
+ txt += (hasTxt?"銆�":"") + "闃�闂ㄦ晠闅滄姤璀�" ;
+ hasTxt = true ;
+ }
+ return txt ;
+ }
+
+ public String alarmContentExcludeLoss(){
+ String txt = "" ;
+ boolean hasTxt = false ;
+ if(alarmBatteryVolt != null && alarmBatteryVolt == 1){
+ txt += (hasTxt?"銆�":"") + "鐢垫睜鐢靛帇浣庢姤璀�" ;
+ hasTxt = true ;
+ }
+ if(alarmWaterMeterFault != null && alarmWaterMeterFault == 1){
+ txt += (hasTxt?"銆�":"") + "澶栭儴娴侀噺璁℃晠闅滄姤璀�" ;
+ hasTxt = true ;
+ }
+ if(alarmWaterMeterBreak != null && alarmWaterMeterBreak == 1){
+ txt += (hasTxt?"銆�":"") + "娴侀噺璁℃晠闅滄姤璀�" ;
+ hasTxt = true ;
+ }
+ if(alarmBlockValve != null && alarmBlockValve == 1){
+ txt += (hasTxt?"銆�":"") + "闃�闂ㄦ晠闅滄姤璀�" ;
+ hasTxt = true ;
+ }
+ return txt ;
+ }
public String toString(){
StringBuffer sb = new StringBuffer() ;
sb.append(" 娉�/闃�鐘舵�� : ") ;
@@ -53,10 +127,10 @@
sb.append(alarm0MoneyRemain == null?"鏈煡":(alarm0MoneyRemain.byteValue() == 0 ? "姝e父":(alarm0MoneyRemain.byteValue() == 1 ? "鍏虫车/闃�":"鏈煡"))) ;
sb.append("\n") ;
sb.append(" 鎺у埗鍣ㄥ唴闂� : ") ;
- sb.append(alarmInnerDoor == null?"鏈煡":(alarmInnerDoor.byteValue() == 0 ? "姝e父":(alarmInnerDoor.byteValue() == 1 ? "鎶ヨ":"鏈煡"))) ;
+ sb.append(alarmDoor == null?"鏈煡":(alarmDoor.byteValue() == 0 ? "姝e父":(alarmDoor.byteValue() == 1 ? "鎶ヨ":"鏈煡"))) ;
sb.append("\n") ;
- sb.append(" 鎺у埗鍣ㄥ闂� : ") ;
- sb.append(alarmOuterDoor == null?"鏈煡":(alarmOuterDoor.byteValue() == 0 ? "姝e父":(alarmOuterDoor.byteValue() == 1 ? "鎶ヨ":"鏈煡"))) ;
+ sb.append(" 鐢垫睜鐢靛帇浣� : ") ;
+ sb.append(alarmBatteryVolt == null?"鏈煡":(alarmBatteryVolt.byteValue() == 0 ? "姝e父":(alarmBatteryVolt.byteValue() == 1 ? "鎶ヨ":"鏈煡"))) ;
sb.append("\n") ;
sb.append(" 浜ゆ祦缂洪」 : ") ;
sb.append(alarmEleMiss == null?"鏈煡":(alarmEleMiss.byteValue() == 0 ? "姝e父":(alarmEleMiss.byteValue() == 1 ? "鎶ヨ":"鏈煡"))) ;
@@ -68,7 +142,13 @@
sb.append(alarmEleLowVolt == null?"鏈煡":(alarmEleLowVolt.byteValue() == 0 ? "姝e父":(alarmEleLowVolt.byteValue() == 1 ? "鎶ヨ":"鏈煡"))) ;
sb.append("\n") ;
sb.append(" IC鍗″姛鑳� : ") ;
- sb.append(stateIcEnable == null?"鏈煡":(stateIcEnable.byteValue() == 0 ? "涓嶆敮鎸�":(stateIcEnable.byteValue() == 1 ? "鏀寔":"鏈煡"))) ;
+ sb.append(stateIcEnable == null?"鏈煡":(stateIcEnable.byteValue() == 0 ? "鏃犳晥":(stateIcEnable.byteValue() == 1 ? "鏈夋晥":"鏈煡"))) ;
+ sb.append("\n") ;
+ sb.append(" 闃�闂ㄥ紑鍏崇姸鎬� : ") ;
+ sb.append(stateOpClValve == null?"鏈煡":(stateOpClValve.byteValue() == 0 ? "姝e父":(stateOpClValve.byteValue() == 1 ? "鏈埌浣�":"鏈煡"))) ;
+ sb.append("\n") ;
+ sb.append(" 闃�闂ㄥ牭杞姤璀� : ") ;
+ sb.append(alarmBlockValve == null?"鏈煡":(alarmBlockValve.byteValue() == 0 ? "姝e父":(alarmBlockValve.byteValue() == 1 ? "鎶ヨ":"鏈煡"))) ;
sb.append("\n") ;
return sb.toString() ;
--
Gitblit v1.8.0