package com.dxhy.common.enums;

/**
 * @author jiaohongyang
 */
public enum JxszcZtEnum {

    /**
     * 未转出
     */
    WZC("0", 1),
    /**
     * 全部转出
     */
    QBZC("1", 2),
    /**
     * 部分转出
     */
    BFZC("2", 3);

    private static final String[] ZCZTMC = {"未转出", "全部转出", "部分转出"};

    private String zcztDm;
    private int index;

    JxszcZtEnum(String zcztDm, int index) {
        this.zcztDm = zcztDm;
        this.index = index;
    }

    public String getZcztDm(int index) {
        for (JxszcZtEnum zczt : JxszcZtEnum.values()) {
            if (zczt.getIndex() == index) {
                return zczt.zcztDm;
            }
        }
        return null;
    }

    public String getZcztMc(int index) {
        int length = ZCZTMC.length;
        if (index <= length) {
            return ZCZTMC[index - 1];
        }
        return null;
    }

    public String getZcztDm() {
        return zcztDm;
    }

    public void setZcztDm(String zcztDm) {
        this.zcztDm = zcztDm;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
