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

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

import java.util.Map;

/**
 * 导入标记枚举
 * @author hongbo.pan
 * @date 2022/3/17
 */
@AllArgsConstructor
@Getter
public enum ImportLabelEnum {

    CARGO_OWNER_NAME("cargoOwnerName", ImportLabelTypeEnum.CARGO_OWNER.getType(), "货主"),
    ORDER_TYPE("orderType", ImportLabelTypeEnum.ORDER_TYPE.getType(), "订单类型"),
    ORDER_BUSINESS_TYPE("orderBusinessType", ImportLabelTypeEnum.ORDER_BUSINESS_TYPE.getType(),"订单业务类型"),
    DELIVERY_METHOD_TYPE("deliveryMethodType", ImportLabelTypeEnum.DELIVERY_METHOD_TYPE.getType(),"配送方式"),
    TRANSPORT_TYPE("transportType", ImportLabelTypeEnum.TRANSPORT_TYPE.getType(),"运输模式"),
    TEMPERATURE_REQUIREMENT("temperatureRequirement", ImportLabelTypeEnum.TEMPERATURE_REQUIREMENT.getType(),"温度要求"),
    DEPARTMENT_NAME("departmentName", ImportLabelTypeEnum.DEPARTMENT.getType(),"所属部门"),
    SHIPPER_TYPE("shipperType", ImportLabelTypeEnum.SHIPPER_TYPE.getType(),"发货方类型"),
//    SHIPPER_UNIT_CODE("shipperUnitCode", ImportLabelTypeEnum.SHIPPER_UNIT.getType(),"发货方单位编码"),
    SHIPPER_CODE("shipperCode", ImportLabelTypeEnum.SHIPPER.getType(),"发货方编码"),
    SHIPPER_PICK_UP_SIGN("shipperPickUpSign", ImportLabelTypeEnum.WHETHER.getType(),"提货签到"),
    SHIPPER_AUTO_PICK_UP_SIGN("shipperAutoPickUpSign", ImportLabelTypeEnum.WHETHER.getType(),"提货自动签到"),
    SHIPPER_SIGN_TIME("shipperSignTime", ImportLabelTypeEnum.PICK_UP_SIGN_TIME.getType(),"提货可签到时间点"),
    SHIPPER_SIGN_TIME_UNIT("shipperSignTimeUnit", ImportLabelTypeEnum.SIGN_TIME_UNIT.getType(),"提货可签到时间单位"),
    SHIPPER_PICK_UP_PICTURE("shipperPickUpPicture", ImportLabelTypeEnum.WHETHER.getType(),"提货图片"),
    CONSIGNEE_TYPE("consigneeType", ImportLabelTypeEnum.CONSIGNEE_TYPE.getType(),"收货方类型"),
//    CONSIGNEE_UNIT_CODE("consigneeUnitCode", ImportLabelTypeEnum.CONSIGNEE_UNIT.getType(),"收货方单位编码"),
//    CONSIGNEE_CODE("consigneeCode", ImportLabelTypeEnum.CONSIGNEE.getType(),"收货方编码"),
    CONSIGNEE_DELIVERY_SIGN("consigneeDeliverySign", ImportLabelTypeEnum.WHETHER.getType(),"送达签到"),
    CONSIGNEE_AUTO_DELIVERY_SIGN("consigneeAutoDeliverySign", ImportLabelTypeEnum.WHETHER.getType(),"送达自动签到"),
    CONSIGNEE_SIGN_TIME("consigneeSignTime", ImportLabelTypeEnum.DELIVERY_SIGN_TIME.getType(),"送达可签到时间点"),
    CONSIGNEE_SIGN_TIME_UNIT("consigneeSignTimeUnit", ImportLabelTypeEnum.SIGN_TIME_UNIT.getType(),"送达可签到时间单位"),
    CONSIGNEE_DELIVERY_PICTURE("consigneeDeliveryPicture", ImportLabelTypeEnum.WHETHER.getType(),"送货图片"),
    CONSIGNEE_RETURN_ORDER_PICTURE("consigneeReturnOrderPicture", ImportLabelTypeEnum.WHETHER.getType(),"回单图片"),
    RETURN_ORDER_FLAG("returnOrderFlag", ImportLabelTypeEnum.WHETHER.getType(),"正本回单"),
//    ITEM_CODE("itemCode", ImportLabelTypeEnum.ITEM.getType(),"商品编码"),
    PACK_TYPE("packType", ImportLabelTypeEnum.PACK_TYPE.getType(),"包装类型"),
    CARGO_THERMOSPHERE("cargoThermosphere", ImportLabelTypeEnum.CARGO_THERMOSPHERE.getType(),"货物温层"),
    ORDER_DATE("orderDate", ImportLabelTypeEnum.DATE.getType(),"订单下单日期"),
    ESTIMATED_PICK_UP_START_TIME("estimatedPickupStartTime", ImportLabelTypeEnum.DATETIME.getType(),"预计提货开始时间"),
    ESTIMATED_PICK_UP_END_TIME("estimatedPickupEndTime", ImportLabelTypeEnum.DATETIME.getType(),"预计提货结束时间"),
    ESTIMATED_DELIVERY_START_TIME("estimatedDeliveryStartTime", ImportLabelTypeEnum.DATETIME.getType(),"预计送达开始时间"),
    ESTIMATED_DELIVERY_END_TIME("estimatedDeliveryEndTime", ImportLabelTypeEnum.DATETIME.getType(),"预计送达结束时间"),
    ;

    private static Map<String, ImportLabelEnum> enumMap = Maps.newHashMap();
    private String label;
    private String labelType;
    private String desc;

    static {
        for(ImportLabelEnum as : ImportLabelEnum.values()) {
            enumMap.put(as.label, as);
        }
    }

    public static ImportLabelEnum getByLabel(String label) {
        return  enumMap.get(label);
    }

}
