liurunyu
2024-05-16 f3d3eacf5af65ebfcfcc3b82e7488401ac545453
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_65_Up.java
@@ -4,7 +4,6 @@
import com.dy.common.mw.protocol.*;
import com.dy.common.mw.protocol.p206V202404.*;
import com.dy.common.mw.protocol.p206V202404.parse.global.GlParse;
import com.dy.common.mw.protocol.p206V202404.upVos.DataCd5BVo;
import com.dy.common.mw.protocol.p206V202404.upVos.DataCd65Vo;
import com.dy.common.util.ByteUtil;
import org.apache.logging.log4j.LogManager;
@@ -64,7 +63,7 @@
        String controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ;
        index++ ;
        Integer projectNo = 0 + bs[index];
        Integer projectNo = (int)bs[index];
        index++ ;
        byte hasRecord = bs[index];
@@ -97,42 +96,28 @@
            cdData.icCardNo  = GlParse.parseIcCardNo(bs, index, 6, 2) ;
            index += 8 ;
            int moneyRemain = ByteUtil.BCD2Int_BE(bs, index, index + 4) ;
            Long moneyRemain = ByteUtil.BCD2Long_LE(bs, index, index + 4) ;
            cdData.moneyRemain = moneyRemain/100.0D;
            index += 5 ;
            int waterRemain = ByteUtil.BCD2Int_BE(bs, index, index + 4) ;
            Long waterRemain = ByteUtil.BCD2Long_LE(bs, index, index + 4) ;
            cdData.waterRemain = waterRemain/100.0D;
            index += 5 ;
            int thisEle = ByteUtil.BCD2Int_BE(bs, index, index + 3) ;
            int thisEle = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
            cdData.thisEle = thisEle/100.0D;
            index += 4 ;
            int thisWater = ByteUtil.BCD2Int_BE(bs, index, index + 3) ;
            int thisWater = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
            cdData.thisWater = thisWater/100.0D;
            index += 4 ;
            String mm = ByteUtil.BCD2String_BE(bs, index, index) ;
            index++ ;
            String HH = ByteUtil.BCD2String_BE(bs, index, index) ;
            index++ ;
            String dd = ByteUtil.BCD2String_BE(bs, index, index) ;
            index++ ;
            String MM = ByteUtil.BCD2String_BE(bs, index, index) ;
            cdData.rtuStartDt = MM + "-" + dd + " " + HH + ":" + mm ;
            cdData.rtuStartDt = GlParse.parseRtuDt(bs, index) ;
            index++ ;
            mm = ByteUtil.BCD2String_BE(bs, index, index) ;
            index++ ;
            HH = ByteUtil.BCD2String_BE(bs, index, index) ;
            index++ ;
            dd = ByteUtil.BCD2String_BE(bs, index, index) ;
            index++ ;
            MM = ByteUtil.BCD2String_BE(bs, index, index) ;
            cdData.rtuEndDt = MM + "-" + dd + " " + HH + ":" + mm ;
            index += 6 ;
            cdData.rtuEndDt = GlParse.parseRtuDt(bs, index) ;
            index++ ;
            index += 6 ;
            cdData.useWaterType = bs[index];
            return cdData ;