package com.dxhy.common.enums;

/**
 * 抵账统计表申请状态
 * 
 * @author kangzq 20190507
 *
 */
public enum ApplyStatusEnum {

    /**
     * 未申请
     */
    WSQ("0", 1),
    /**
     * 申请中
     */
    SQZ("1", 2),
    /**
     * 申请成功
     */
    SQCG("2", 3),
    /**
     * 申请失败
     */
    SQSB("3", 4);

    private final String[] APPLYSTATUSMC = {"未申请", "申请中", "申请成功", "申请失败"};

    private String applyStatusDm;
    private int index;

    ApplyStatusEnum(String applyStatusDm, int index) {
        this.applyStatusDm = applyStatusDm;
        this.index = index;
    }

    public String getApplyStatusDm(int index) {
        for (ApplyStatusEnum fplx : ApplyStatusEnum.values()) {
            if (fplx.getIndex() == index) {
                return fplx.applyStatusDm;
            }
        }
        return null;
    }

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

    public String getApplyStatusDm() {
        return applyStatusDm;
    }

    public void setApplyStatusDm(String applyStatusDm) {
        this.applyStatusDm = applyStatusDm;
    }

    public int getIndex() {
        return index;
    }

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