liurunyu
2 天以前 2daa780ed9c74cb689f7c1e6a13f8aadebd57208
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_87_Up.java
@@ -54,9 +54,9 @@
     * @throws Exception 异常
     */
    protected void doParse(byte[] bs, int bsLen, String dataCode, Data data) throws Exception {
        DataV202404 dV1 = (DataV202404)data.getSubData() ;
        DataV202404 dV202404 = (DataV202404)data.getSubData() ;
        DataCd87Vo cdData = new DataCd87Vo(CodeV202404.getCodeName(dataCode)) ;
        dV1.subData = cdData ;
        dV202404.subData = cdData ;
        int index = ProtocolConstantV206V202404.dataIndex ;
        cdData.controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ;
@@ -73,10 +73,17 @@
        short portLen = ByteUtilUnsigned.byte2Byte(bs, index) ;
        index++ ;
        cdData.domain = ByteUtil.bytes2String_BE(bs, index, index + domainLen - 1) ;
        if(domainLen > 0){
            cdData.domain = ByteUtil.bytes2String_BE(bs, index, index + domainLen - 1) ;
        }else{
            cdData.domain = "" ;
        }
        index += domainLen ;
        cdData.port = Integer.parseInt(ByteUtil.bytes2String_BE(bs, index, index + portLen - 1)) ;
        if(portLen > 0){
            cdData.port = Integer.parseInt(ByteUtil.bytes2String_BE(bs, index, index + portLen - 1)) ;
        }else{
            cdData.port = 0 ;
        }
    }
}