package com.goafanti.expenseAccount.Enums;

import java.util.HashMap;
import java.util.Map;

public enum EAsecondaryTypes {
//    0=其他，1=交通费，2=住宿费，3=市内车费，4=餐费，5=出差补贴，6=预借支,7=油费
//     * 8=招待费，9=办公费，10=福利费，11=物业水电费，12=打印费
    JTF(1,"交通费"),
    ZSF(2,"住宿费"),
    SNCF(3,"市内车费"),
    CF(4,"餐补"),
    CCBT(5,"出差补贴"),
    YJZ(6,"预借支"),
    YF(7,"油费"),
    ZDF(8,"招待费"),
    BGF(9,"办公费"),
    FLF(10,"福利费"),
    WYSDF(11,"物业水电费"),
    DYF(12,"打印费"),
    QT(0,"其他");

    private Integer code;
    private String desc;

    EAsecondaryTypes(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }
    private static Map<Integer, EAsecondaryTypes> status=new HashMap<Integer, EAsecondaryTypes>();

    static {
        for (EAsecondaryTypes value : EAsecondaryTypes.values()) {
            status.put(value.code, value);
        }
    }
    public static String getDescByCode(Integer code){
        for (EAsecondaryTypes value : EAsecondaryTypes.values()) {
            if (value.getCode() == code)return value.getDesc();
        }
        return "";
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
