package com.dxhy.common.enums;

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

    /**
     * 未统计
     */
    WSQ("0", 1),
    /**
     * 统计中
     */
    SQZ("1", 2),
    /**
     * 统计成功
     */
    TJCG("2", 3),
    /**
     * 统计失败
     */
    TJSB("3", 4);

    private final String[] TJSTATUSMC = {"未统计", "统计中", "统计成功", "统计失败"};

    private String tjStatusDm;
    private int index;

    TjStatusEnum(String tjStatusDm, int index) {
        this.tjStatusDm = tjStatusDm;
        this.index = index;
    }

    public String getTjStatusDm(int index) {
        for (TjStatusEnum fplx : TjStatusEnum.values()) {
            if (fplx.getIndex() == index) {
                return fplx.tjStatusDm;
            }
        }
        return null;
    }

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

    public String getTjStatusDm() {
        return tjStatusDm;
    }

    public void setTjStatusDm(String tjStatusDm) {
        this.tjStatusDm = tjStatusDm;
    }

    public int getIndex() {
        return index;
    }

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