zhubaomin
2024-10-12 22acc39ce207d951c6dcadbcb1cc68e27059d595
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/upVos/DataAlarmVo.java
@@ -20,23 +20,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");