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

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

import java.util.Map;

/**
 * 签收数量不等于配送数量处理方式
 * @author hongbo.pan
 * @date 2022/10/8
 */
@AllArgsConstructor
@Getter
public enum SigninNotequalDeliveryHandleTypeEnum {

    AUTO_CREATE("1", "自动生成一个退回运单并调度当前司机"),
    ;

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

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

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

}
