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

public enum SettlementRangeRuleTypeEnum {
    部分订单不参与结算(1, "部分订单不参与结算"),
    部分按原供应商名称导出(2, "部分按原供应商名称导出"),
    ;
    private Integer key;
    private String  desc;

    SettlementRangeRuleTypeEnum(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 (SettlementRangeRuleTypeEnum c : SettlementRangeRuleTypeEnum.values()) {
            if (c.key.equals(key)) {
                return c.getDesc();
            }
        }
        return "";
    }
}
