liurunyu
2024-07-05 b83f639362ae959de55900d14d132585cd72a90d
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_84_Up.java
@@ -94,7 +94,7 @@
        cdData.cardType = bs[index] ;
        index++ ;
        cdData.cardAddr = ByteUtil.bytes2Hex(bs, false,  index, 4) ;
        cdData.cardAddr = ByteUtil.bytes2Hex_LE(bs, false,  index, 4) ;
        index += 4 ;
        //用水户号数据格式:5字节BCD码低位在前高位在后。
@@ -102,56 +102,20 @@
        index += 5 ;
        //用水户余额:用户余额4字节BCD码,取值范围0.00~999999.99,单位为元。
        cdData.remainMoney = 0.0D ;
        int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.remainMoney += tpInt/100.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.remainMoney += tpInt;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.remainMoney += tpInt * 100.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.remainMoney += tpInt * 10000.0 ;
        int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
        cdData.remainMoney = tpInt/100.0 ;
        index += 4 ;
        //累计流量:5字节BCD码,取值范围0~9999999999,单位为m3。
        cdData.totalAmount = 0.0D ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.totalAmount += tpInt;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.totalAmount += tpInt * 100.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.totalAmount += tpInt * 10000.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.totalAmount += tpInt * 1000000.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.totalAmount += tpInt * 100000000.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ;
        cdData.totalAmount = tpInt/100.0;
        index += 5 ;
        //瞬时流量:5字节BCD码,取值范围0~9999999.999,单位为m3/h。
        cdData.instantAmount = 0.0D ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.instantAmount += tpInt/1000.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.instantAmount += tpInt/10.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.instantAmount += tpInt * 10.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.instantAmount += tpInt * 1000.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
        index++ ;
        cdData.instantAmount += tpInt * 100000.0 ;
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ;
        cdData.instantAmount = tpInt/1000.0 ;
        index += 5 ;
        cdData.alarmVo = GlParse.parseAlarm(bs, index) ;
        index += 2 ;
        cdData.stateVo = GlParse.parseState(bs, index) ;