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

import lombok.Getter;

/*
 订单异常枚举类型

 */
@Getter
public enum OrderExceptionEnum {
    ORDER_NO_QUOTE_EXCEPTION("order_no_quote_exception", "未报价异常", "no quote","Non cité"),
    ORDER_SUPERFLUOUS_BOX_EXCEPTION("order_superfluous_box_exception", "多箱异常", "superfluous box","Plusieurs cartons (calcul des frais d'expédition)"),
    ORDER_LACK_BOX_EXCEPTION("order_lack_box_exception", "少箱异常", "lack box","manque de boîtes"),
    ORDER_PAY_EXCEPTION("order_pay_exception", "产品需要预付运费异常", "pay","Le produit nécessite un prépaiement des frais de transport"),
    ORDER_MISS_EXCEPTION("order_miss_exception", "货物丢失异常", "miss goods","Perte de marchandises"),
    ORDER_SUPERFLUOUS_GOODS_EXCEPTION("order_superfluous_goods_exception", "货物增多异常", "superfluous goods","Augmentation de la marchandise"),
    ORDER_DAMAGE_EXCEPTION("order_damage_exception", "货物破损异常", "damage exception","Marchandises endommagées"),
    ORDER_IN_WATER_EXCEPTION("order_in_water_exception", "货物浸水异常", "in water","Marchandises endommagées par l'eau"),
    ORDER_ABNORMAL_WEIGHT_EXCEPTION("goods_weight_exception", "货物重量异常", "abnormal weight","Poids des marchandises anormal"),
    ORDER_HEAVY_CARGO_EXCEPTION("order_heavy_cargo_exception", "重货异常", "heavy cargo","order.heavy.cargo.exception"),
    ORDER_BULKY_CARGO_EXCEPTION("order_bulky_cargo_exception", "泡货异常", "bulky cargo","Anomalie de marchandises du poids volumique"),
    ORDER_DOC_EXCEPTION("order_doc_exception", "单证异常", "doc exception","Anomalie des documents"),
    ORDER_CONSIGNOR_EXCEPTION("order_consignor_exception", "发货人异常", "consignor exception","Expéditeur anormal"),
    ORDER_COD_EXCEPTION("order_cod_exception", "代收货款异常", "cod","Anomalie dans l'encaissement des paiements"),
    ORDER_OTHER_EXCEPTION("order_other_exception", "其它异常", "other exception","Autre anomalie"),
    ORDER_PICK_UP_EXCEPTION("order_pick_up_exception", "提货异常", "pick up exception","Anomalie de retrait"),

    NOT_CUSTOMER_SERVICE_EXCEPTION("not_customer_service_exception", "未分配客户经理异常", "not customer service exception","Responsable client non attribué"),

    FEE_EXCEPTION("fee_exception", "费用异常", "fee exception","Anomalie des frais"),
    GOODS_ADD_EXCEPTION("goods_add_exception", "新增商品异常", "add product exception","Exception sur les nouveaux produits"),


    //--------------------2.0空运新增-start---------------
    LINE_LOOP_EXCEPTION("line_loop_exception", "线路单询异常", "line loop exception","Anomalie dans la demande de ligne"),

    CUSTOMS_FEE_NOT_QUOTE_EXCEPTION("customs_fee_not_quote_exception", "清关费未报价异常", "customs fee not quote exception","Anomalie des frais de dédouanement non tarifés"),
    GOODS_OVERWEIGHT_EXCEPTION("overweight_exception", "商品重量超限异常", "overweight exception","Poids du produit dépassé"),
    CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION("channel_packaging_overweight_exception", "渠道包装重量超限异常", "channel packaging overweight exception","Le poids de l'emballage du canal dépasse l'exception limite"),

    //不可出渠道异常， 处理异常添加注释
    NOT_SHIPPING_CHANNEL_EXCEPTION("not_shipping_channel_exception", "不可出渠道异常", "not shipping channel exception","Anomalie dans le canal d'expédition"),

    GOODS_WEIGHT_EXCEPTION("goods_weight_exception", "货物重量异常", "goods weight exception","Poids des marchandises anormal"),
    IN_WAREHOUSING_DIFF_EXCEPTION("in_warehousing_diff_exception", "入仓特性不符异常", "in warehousing diff exception","Anomalie des caractéristiques de réception"),
    STOCK_UP_EXCEPTION("stock_up_exception", "备货异常", "stock up exception","Anomalie de préparation de commande"),

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

    LINE_WEIGHT_EXCEPTION("line_weight_exception", "路线重量超限异常", "line weight exception","Anomalie de dépassement de poids de la ligne");


    private final String key;

    private final String zhValueDesc;

    private final String enValueDesc;

    private final String frValueDesc;

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

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

}
