package cn.superdesk.uniorder.common.enums.accounting.operator;

/**
 * 供应商展示规则
 */
public enum SupnameDisplayRuleEnum {
    全部按原供应商名称导出(1, "全部按原供应商名称导出"),
    全部按自定义供应商名称导出(2, "全部按自定义供应商名称导出"),
    部分按原供应商名称导出(3, "部分按原供应商名称导出"),
    ;
    private Integer key;
    private String  desc;

    SupnameDisplayRuleEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }


    public Integer getKey() {
        return key;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByKey(Integer key) {
        for (SupnameDisplayRuleEnum c : SupnameDisplayRuleEnum.values()) {
            if (c.key.equals(key)) {
                return c.getDesc();
            }
        }
        return "";
    }
}
