package cn.iocoder.yudao.module.order.enums;

import lombok.Getter;

@Getter
public enum OrderExceptionEnum {
    ORDER_NO_QUOTE_EXCEPTION("order_no_quote_exception", "未报价异常", "no quote"),
    ORDER_SUPERFLUOUS_BOX_EXCEPTION("order_superfluous_box_exception", "多箱异常", "superfluous box"),
    ORDER_LACK_BOX_EXCEPTION("order_lack_box_exception", "少箱异常", "lack box"),
    ORDER_PAY_EXCEPTION("order_pay_exception", "产品需要预付运费异常", "pay"),
    ORDER_MISS_EXCEPTION("order_miss_exception", "货物丢失异常", "miss goods"),
    ORDER_SUPERFLUOUS_GOODS_EXCEPTION("order_superfluous_goods_exception", "货物增多异常", "superfluous goods"),
    ORDER_DAMAGE_EXCEPTION("order_damage_exception", "货物破损异常", "damage exception"),
    ORDER_IN_WATER_EXCEPTION("order_in_water_exception", "货物浸水异常", "in water"),
    ORDER_ABNORMAL_WEIGHT_EXCEPTION("goods_weight_exception", "货物重量异常", "abnormal weight"),
    ORDER_HEAVY_CARGO_EXCEPTION("order_heavy_cargo_exception", "重货异常", "heavy cargo"),
    ORDER_BULKY_CARGO_EXCEPTION("order_bulky_cargo_exception", "泡货异常", "bulky cargo"),
    ORDER_DOC_EXCEPTION("order_doc_exception", "单证异常", "doc exception"),
    ORDER_CONSIGNOR_EXCEPTION("order_consignor_exception", "发货人异常", "consignor exception "),
    ORDER_COD_EXCEPTION("order_cod_exception", "代收货款异常", "cod"),
    ORDER_OTHER_EXCEPTION("order_other_exception", "其它异常", "other exception"),
    ORDER_PICK_UP_EXCEPTION("order_pick_up_exception", "提货异常", "pick up exception"),

    NOT_CUSTOMER_SERVICE_EXCEPTION("not_customer_service_exception", "未分配客户经理异常", "not customer service exception"),

    FEE_EXCEPTION("fee_exception", "费用异常", "fee exception"),
    GOODS_ADD_EXCEPTION("goods_add_exception", "新增商品异常", "add product exception"),


    //--------------------2.0空运新增-start---------------
    LINE_LOOP_EXCEPTION("line_loop_exception", "线路单询异常", "line loop exception"),

    CUSTOMS_FEE_NOT_QUOTE_EXCEPTION("customs_fee_not_quote_exception", "清关费未报价异常", "customs fee not quote exception"),
    GOODS_OVERWEIGHT_EXCEPTION("overweight_exception", "商品重量超限异常", "overweight exception"),
    CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION("channel_packaging_overweight_exception", "渠道包装重量超限异常", "channel packaging overweight exception"),

    NOT_SHIPPING_CHANNEL_EXCEPTION("not_shipping_channel_exception", "不可出渠道异常", "not shipping channel exception"),

    GOODS_WEIGHT_EXCEPTION("goods_weight_exception", "货物重量异常", "goods weight exception"),
    IN_WAREHOUSING_DIFF_EXCEPTION("in_warehousing_diff_exception", "入仓特性不符异常", "in warehousing diff exception"),
    STOCK_UP_EXCEPTION("stock_up_exception", "备货异常", "stock up exception"),

    CHANNEL_EXCEPTION("channel_exception", "渠道异常", "channel exception"),
    //--------------------2.0空运新增-end---------------

    LINE_WEIGHT_EXCEPTION("line_weight_exception", "路线重量超限异常", "line weight exception");


    private final String key;

    private final String zhValueDesc;

    private final String enValueDesc;

    OrderExceptionEnum(String key, String zhValueDesc, String enValueDesc) {
        this.key = key;
        this.zhValueDesc = zhValueDesc;
        this.enValueDesc = enValueDesc;
    }

    public static OrderExceptionEnum getEnumByKey(String key) {
        for (OrderExceptionEnum item : OrderExceptionEnum.values()) {
            if (item.getKey().equals(key)) {
                return item;
            }
        }
        throw new RuntimeException("未知异常");
    }

}
