| | |
| | | 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; |
| | |
| | | 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 ; |