zhubaomin
2025-03-25 427d87e5572d72d0e3aaa4364e4f53569222e321
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/parse/Cd_83_Up.java
@@ -116,20 +116,26 @@
        short index = ProtocolConstantV206V1.dataIndex + 1 ;
        //累计流量:5字节BCD码,取值范围0~99999999.99,单位为m3。
        int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ;
        cdData.totalAmount = tpInt/100.0 ;
        long tpLong = ByteUtil.BCD2Long_LE(bs, index, index + 4) ;
        cdData.totalAmount = tpLong/100.0 ;
        index += 5 ;
        //用水户号数据格式:8字节低位在前高位在后。
        if(ByteUtil.bytesIsAll0xFF(bs, index, 8)){
            throw new Exception("IC卡号数据格式错误,8字节全部为0xFF,舍弃数据") ;
        }
        cdData.icCardNo = GlParse.parseIcCardNo(bs, index) ;
        index += 8 ;
        //IC卡号格式:4字节HEX码低位在前高位在后。
        if(ByteUtil.bytesIsAll0xFF(bs, index, 4)){
            throw new Exception("IC地址数据格式错误,4字节全部为0xFF,舍弃数据") ;
        }
        cdData.icCardAddr = ByteUtil.bytes2Hex_LE(bs, false,  index, 4) ;
        index += 4 ;
        //用水户余额:用户余额4字节BCD码,取值范围0.00~999999.99,单位为元。
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
        int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
        cdData.remainMoney = tpInt/100.0 ;
        index += 4 ;
@@ -154,21 +160,27 @@
        short index = ProtocolConstantV206V1.dataIndex + 1 ;
        //累计流量:5字节BCD码,取值范围0~9999999999,单位为m3。
        int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ;
        cdData.totalAmount = tpInt/100.0 ;
        long tpLong = ByteUtil.BCD2Long_LE(bs, index, index + 4) ;
        cdData.totalAmount = tpLong/100.0 ;
        index += 5 ;
        //用水户号数据格式:8字节低位在前高位在后。
        if(ByteUtil.bytesIsAll0xFF(bs, index, 8)){
            throw new Exception("IC卡号数据格式错误,8字节全部为0xFF,舍弃数据") ;
        }
        cdData.icCardNo = GlParse.parseIcCardNo(bs, index) ;
        index += 8 ;
        //IC卡号格式:4字节HEX码低位在前高位在后。
        if(ByteUtil.bytesIsAll0xFF(bs, index, 4)){
            throw new Exception("IC地址数据格式错误,4字节全部为0xFF,舍弃数据") ;
        }
        cdData.icCardAddr = ByteUtil.bytes2Hex_LE(bs, false,  index, 4) ;
        index += 4 ;
        //用水户余额:用户余额4字节BCD码,取值范围0.00~999999.99,单位为元。
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
        cdData.remainMoney = tpInt/100.0 ;
        tpLong = ByteUtil.BCD2Long_LE(bs, index, index + 3) ;
        cdData.remainMoney = tpLong/100.0 ;
        index += 4 ;
        //用水户用水开始时间:6字节BCD码,顺序是年月日时分秒,其中公元年=2000+年。
@@ -180,17 +192,17 @@
        index += 6 ;
        //用水户本次用水量:累计流量5字节BCD码,取值范围0~9999999999,单位为m3。
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ;
        cdData.thisAmount = tpInt/100.0 ;
        tpLong = ByteUtil.BCD2Long_LE(bs, index, index + 4) ;
        cdData.thisAmount = tpLong/100.0 ;
        index += 5 ;
        //用水户本次消费金额:用户余额4字节BCD码,取值范围0.00~999999.99,单位为元。
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
        cdData.thisMoney = tpInt/100.0 ;
        tpLong = ByteUtil.BCD2Long_LE(bs, index, index + 3) ;
        cdData.thisMoney = tpLong/100.0 ;
        index += 4 ;
        //用水户本次用水时长:用水时长2字节BCD码,取值范围0~9999,单位为分钟。
        tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 1) ;
        int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 1) ;
        cdData.thisTime = tpInt;
        index += 2 ;