package com.prolog.rdc.tms.app.constant.enums;

import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

/**
 * 待提货处理方式
 * @author hongbo.pan
 * @date 2022/12/1
 */
@AllArgsConstructor
@Getter
public enum PickUpHandleTypeEnum {

    SHOW("1", "输入提货件数"),
    HIDE("2", "隐藏提货件数"),
    ;

    public static final String ENUM_NAME = "PICKUP_HANDLE_TYPE";
    private static Map<String, PickUpHandleTypeEnum> enumMap = Maps.newHashMap();
    private String code;
    private String desc;

    static {
        for(PickUpHandleTypeEnum as : PickUpHandleTypeEnum.values()) {
            enumMap.put(as.code, as);
        }
    }

    public static PickUpHandleTypeEnum getByCode(String code) {
        return  enumMap.get(code);
    }

}
