package thyyxxk.webserver.constants.sidicts;

import thyyxxk.webserver.utils.StringUtil;

/**
 * @description: 待遇检查类型
 * @author: DingJie
 * @create: 2021/8/316:08
 */
public enum TrtChkType {

    FUND_CHECK("01", "基金项检查"),

    OTHER_CHECKS("99", "其他检查");

    private final String code;
    private final String name;

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

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

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