package com.ankaibei.workFlow.webadmin.ankaibei.enums;

/**
 *
 * 费用管理
 * @return ResMsg
 */
public enum CostEnum {

    COMMUNICATION("通讯费"),
    PURCHASE("采购费"),
    REST("其他费用"),
    TRANSPORTATION("交通费"),
    REPAST("餐饮费"),
    TRAVEL("差旅费"),
    PROJECTADD("新建项目"),
    MANHOUR("人员工时"),
    PROJECTTASKADD("新建任务");
    /**
     * 信息
     */
    private final String reason;

    public String getReason() {
        return reason;
    }
    CostEnum(String reason) {
        this.reason = reason;
    }
    /**
     * 通过枚举的code,查询对应的枚举项
     * @param reason
     * @return
     */
    public static CostEnum getEnumByCode(String reason){
        CostEnum[] values = CostEnum.values();
        for(CostEnum statusEnums : values){
            if(statusEnums.getReason().equals(reason)){
                return statusEnums;
            }
        }
        return null;
    }
}
