package thyyxxk.webserver.constants.sidicts;

import thyyxxk.webserver.utils.StringUtil;

/**
 * @description: 医保结算等级
 * @author: DingJie
 * @create: 2021/7/2411:26
 */
public enum HiSetlLv {

    FIRST_CLASS("1", "一级"),

    SECOND_CLASS("2", "二级"),

    THIRD_CLASS("3", "三级");

    private final String code;
    private final String name;

    HiSetlLv(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static HiSetlLv get(String code) {
        if (StringUtil.isBlank(code)) {
            return null;
        }
        for (HiSetlLv hiSetlLv : HiSetlLv.values()) {
            if (code.trim().equals(hiSetlLv.getCode())) {
                return hiSetlLv;
            }
        }
        return null;
    }
}
