package com.qryord.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: biandan
 * @description: 是否标志
 * @author: bao
 * @create: 2022-02-14
 */
@AllArgsConstructor
@Getter
public enum EQueryType {
    ITEM("ITEM", "小箱号"),
    BOX("BOX", "大箱号"),
    NUMBER("NUMBER", "数字码");

    private String val;
    private String desc;

    /** 解析 */
    public static EQueryType parseByVal(String val) {
        for(EQueryType type :EQueryType.values()) {
            if(type.getVal().equalsIgnoreCase(val)) {
                return type;
            }
        }
        return EQueryType.ITEM;
    }
}
