package com.tsi.comm.server.vo;

import lombok.Data;

@Data
public class TsiNodeAddDetailVo {
    private long nodeId;
    private int  originDirCode;
    private int  addNodeOrder;
    private byte[] addDirCode = new byte[2];
    private TsiNodeVo nodeObj;

    public void setAddDirCode(String addDirCode) {
        this.addDirCode[0] = 0x00;
        this.addDirCode[1] = 0x00;
        try {
            String[] arrAddDirCode = addDirCode.split(",");
            if (arrAddDirCode.length >= 1) {
                this.addDirCode[0] = (byte) Integer.parseInt(arrAddDirCode[0]);
            }
            if (arrAddDirCode.length >= 2) {
                this.addDirCode[1] = (byte) Integer.parseInt(arrAddDirCode[1]);
            }
        } catch (Exception e) {
        }
    }
}
