Commit 81ec0e30 authored by honghy's avatar honghy Committed by wux

异常处理多语言

parent 465effc1
......@@ -20,7 +20,7 @@ public class DictDataRespDTO {
*/
private String labelEn;
/**
* 字典文标签
* 字典文标签
*/
private String labelFr;
/**
......
......@@ -25,6 +25,10 @@ public class ChannelDto extends BaseDO {
* 名称-英文
*/
private String nameEn;
/**
* 名称-法文
*/
private String nameFr;
/**
* 内部名称-中文
*/
......@@ -33,6 +37,10 @@ public class ChannelDto extends BaseDO {
* 内部名称-英文
*/
private String internalNameEn;
/**
* 内部名称-法文
*/
private String internalNameFr;
/**
* 类型编码
*/
......@@ -74,6 +82,10 @@ public class ChannelDto extends BaseDO {
* 备注-英文
*/
private String remarksEn;
/**
* 备注-法文
*/
private String remarksFr;
/**
* 状态(0:禁用 1:启用)
*/
......
......@@ -27,6 +27,10 @@ public class QueryChannelInfoEvent {
* 名称-英文
*/
private String nameEn;
/**
* 名称-法文
*/
private String nameFr;
/**
* 内部名称-中文
*/
......@@ -35,6 +39,10 @@ public class QueryChannelInfoEvent {
* 内部名称-英文
*/
private String internalNameEn;
/**
* 内部名称-法文
*/
private String internalNameFr;
/**
* 类型编码
......@@ -76,6 +84,10 @@ public class QueryChannelInfoEvent {
* 备注-英文
*/
private String remarksEn;
/**
* 备注-法文
*/
private String remarksFr;
/**
* 状态(0:禁用 1:启用)
*/
......
......@@ -8,47 +8,47 @@ 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"),
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"),
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"),
GOODS_OVERWEIGHT_EXCEPTION("overweight_exception", "商品重量超限异常", "overweight exception"),
CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION("channel_packaging_overweight_exception", "渠道包装重量超限异常", "channel packaging overweight exception"),
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"),
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"),
IN_WAREHOUSING_DIFF_EXCEPTION("in_warehousing_diff_exception", "入仓特性不符异常", "in warehousing diff exception"),
STOCK_UP_EXCEPTION("stock_up_exception", "备货异常", "stock up exception"),
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"),
CHANNEL_EXCEPTION("channel_exception", "渠道异常", "channel exception","Anomalie du canal."),
//--------------------2.0空运新增-end---------------
LINE_WEIGHT_EXCEPTION("line_weight_exception", "路线重量超限异常", "line weight exception");
LINE_WEIGHT_EXCEPTION("line_weight_exception", "路线重量超限异常", "line weight exception","Anomalie de dépassement de poids de la ligne");
private final String key;
......@@ -57,10 +57,13 @@ public enum OrderExceptionEnum {
private final String enValueDesc;
OrderExceptionEnum(String key, String zhValueDesc, 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) {
......
......@@ -156,8 +156,9 @@ public class OrderAirServiceImpl extends AbstractService<OrderMapper, OrderDO> i
orderWarehousePictureService.createWarehousePictureBatch(exceptionUrls, 4, orderId);
// 异常
String descZh = getDesc(orderManualExceptionBatchReqVO.getDescZh(), orderManualExceptionBatchReqVO.getDescEn(), manualExceptionType, 0);
String descEn = getDesc(orderManualExceptionBatchReqVO.getDescZh(), orderManualExceptionBatchReqVO.getDescEn(), manualExceptionType, 1);
String descZh = getDesc(orderManualExceptionBatchReqVO.getDescZh(), orderManualExceptionBatchReqVO.getDescEn(), orderManualExceptionBatchReqVO.getDescFr(), manualExceptionType, 0);
String descEn = getDesc(orderManualExceptionBatchReqVO.getDescZh(), orderManualExceptionBatchReqVO.getDescEn(), orderManualExceptionBatchReqVO.getDescFr(), manualExceptionType, 1);
String descFr = getDesc(orderManualExceptionBatchReqVO.getDescZh(), orderManualExceptionBatchReqVO.getDescEn(), orderManualExceptionBatchReqVO.getDescFr(), manualExceptionType, 2);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = new OrderExceptionCreateReqVO();
orderExceptionCreateReqVO.setOrderId(orderId);
......@@ -167,7 +168,7 @@ public class OrderAirServiceImpl extends AbstractService<OrderMapper, OrderDO> i
orderExceptionCreateReqVO.setOrderExceptionAttr(CollectionUtil.join(exceptionUrls, ","));
}
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).build());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).descFr(descFr).build());
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
......@@ -265,7 +266,7 @@ public class OrderAirServiceImpl extends AbstractService<OrderMapper, OrderDO> i
}
}
private String getDesc(String descZh, String descEn, String manualExceptionType, Integer lang) {
private String getDesc(String descZh, String descEn, String descFr, String manualExceptionType, Integer lang) {
StringBuffer stringBuffer = new StringBuffer();
for (String value : manualExceptionType.split(",")) {
DictDataRespDTO data = DictFrameworkUtils.getDictDataFromCache("manual_exception_type", value);
......@@ -283,6 +284,9 @@ public class OrderAirServiceImpl extends AbstractService<OrderMapper, OrderDO> i
if (lang == 1 && StringUtils.isNotEmpty(descEn)) {
stringBuffer.append(": ").append(descEn);
}
if (lang == 2 && StringUtils.isNotEmpty(descFr)) {
stringBuffer.append(": ").append(descFr);
}
return stringBuffer.toString();
}
......
......@@ -228,18 +228,21 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
// 只有客户的客户经理为空时
String descZh = "归属客户:%s 客户编号:%s";
String descEn = "Customer: %s Customer No.: %s";
String descFr = "Client: %s Client No.: %s";
// 该客户没有客户经理, 需要生成异常,判断当前客户是发货人还是收货人
if (customerType == 1) {
// 发货人
descZh = String.format(descZh, "发货人", customerDO.getNumber());
descEn = String.format(descEn, "consignor", customerDO.getNumber());
descFr = String.format(descFr, "expéditeur", customerDO.getNumber());
} else {
// 收货人
descZh = String.format(descZh, "收货人", customerDO.getNumber());
descEn = String.format(descEn, "consignee", customerDO.getNumber());
descFr = String.format(descFr, "Destinataire destinataire", customerDO.getNumber());
}
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(order.getOrderId(), order, null, order.getCustomerId(), OrderExceptionEnum.NOT_CUSTOMER_SERVICE_EXCEPTION,
descZh, descEn);
descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
} else {
......@@ -290,21 +293,24 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
List<ProductAttrDO> productAttrDOList = productAttrService.getProductAttrList();
StringJoiner notShippingNameZh = new StringJoiner(",");
StringJoiner notShippingNameEn = new StringJoiner(",");
StringJoiner notShippingNameFr = new StringJoiner(",");
for (String notShippingId : notShippingIds) {
ProductAttrDO productAttrDO = productAttrDOList.stream().filter(p -> p.getId().toString().equals(notShippingId)).findFirst().orElse(null);
if (productAttrDO != null) {
notShippingNameZh.add(productAttrDO.getAttrName());
notShippingNameEn.add(productAttrDO.getAttrNameEn());
notShippingNameFr.add(productAttrDO.getAttrNameFr());
}
}
String descZh = String.format("订单包含【%s】不可出商品特性【%s】", event.getNameZh(), notShippingNameZh);
String descEn = String.format("Order includes 【%s】 Non-export feature 【%s】", event.getNameEn(), notShippingNameEn);
String descFr = String.format("L’ordre comprend 【%s】 fonction de non-exportation 【%s】", event.getNameFr(), notShippingNameFr);
// 当前空运或海空联运订单下单时,没又渠道id,则生成渠道异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.NOT_SHIPPING_CHANNEL_EXCEPTION,
descZh, descEn);
descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
} else {
......@@ -584,7 +590,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
private OrderExceptionCreateReqVO genOrderException(Long orderId, OrderDO orderDO, OrderItemDO orderItemDO, Long customerId,
OrderExceptionEnum orderException, String descZh, String descEn) {
OrderExceptionEnum orderException, String descZh, String descEn, String descFr) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = new OrderExceptionCreateReqVO();
orderExceptionCreateReqVO.setOrderId(orderId);
orderExceptionCreateReqVO.setOrderNumber(orderDO.getOrderNo());
......@@ -594,12 +600,12 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderExceptionCreateReqVO.setProdId(orderItemDO.getProdId());
}
orderExceptionCreateReqVO.setOrderExceptionType(orderException.getKey());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).build());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).descFr(descFr).build());
return orderExceptionCreateReqVO;
}
private OrderExceptionCreateReqVO genOrderException(Long orderId, OrderBackVO vo, OrderItemDO orderItemDO, Long customerId,
OrderExceptionEnum orderException, String descZh, String descEn) {
OrderExceptionEnum orderException, String descZh, String descEn,String descFr) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = new OrderExceptionCreateReqVO();
orderExceptionCreateReqVO.setOrderId(orderId);
orderExceptionCreateReqVO.setOrderNumber(vo.getOrderNo());
......@@ -609,7 +615,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderExceptionCreateReqVO.setProdId(orderItemDO.getProdId());
}
orderExceptionCreateReqVO.setOrderExceptionType(orderException.getKey());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).build());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).descFr(descFr).build());
return orderExceptionCreateReqVO;
}
......@@ -2793,7 +2799,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
null,
OrderExceptionEnum.ORDER_PAY_EXCEPTION,
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(),
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc());
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(),
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getFrValueDesc());
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
}
......@@ -2935,6 +2942,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO.getProdTitleZh()),
String.format("The goods 【%s】 in the order 【%s】 are not quoted",
orderItemDO.getProdTitleEn(),
orderDO.getOrderNo()),
String.format("Les biens【%s】dans l’ordre【%s】ne sont pas cités",
orderItemDO.getProdTitleFr(),
orderDO.getOrderNo()));
// TODO 同一个订单相同品名有相同未报价异常时,不重复产生
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
......@@ -2989,7 +2999,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
String.format("商品【%s】线路单询异常",
orderItemDO.getProdTitleZh()),
String.format("Line inquiry exception for product [%s]",
orderItemDO.getProdTitleEn()));
orderItemDO.getProdTitleEn()),
String.format("Exception d’enquête en ligne pour le produit [%s]",
orderItemDO.getProdTitleFr()));
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
// 标记已产生过单询异常, 并更新到数据库
......@@ -3087,21 +3099,25 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
int channelPriceEmptyType = orderItemDO.getChannelPriceEmptyType();
// 是否超出空运重量上限
boolean isAirWeightLimit = orderItemDO.getIsAirWeightLimit();
String descZh = "订单中商品%s的清关费未设置或已过期6";
String descZh = "订单中商品%s的清关费未设置或已过期";
String descEn = "The customs clearance fee for item %s in the order has not been set or has expired";
String descFr = "Les frais de dédouanement des articles %s de la commande n’ont pas été établis ou ont expiré";
if (productPriceEmptyType == 2) {
descZh = "订单中商品%s的清关费区间未匹配上";
descEn = "The customs clearance fee range for product %s in the order does not match";
descFr = "La gamme des frais de dédouanement des articles %s de la commande ne correspond pas sur";
}
descZh = String.format(descZh, orderItemDO.getProdTitleZh());
descEn = String.format(descEn, orderItemDO.getProdTitleEn());
descFr = String.format(descFr, orderItemDO.getProdTitleFr());
//当前空运或海空联运订单下单时,没又渠道id,则生成渠道异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO =
this.genOrderException(orderDO.getOrderId(),
orderDO,
orderItemDO, null,
OrderExceptionEnum.CUSTOMS_FEE_NOT_QUOTE_EXCEPTION,
descZh, descEn);
descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
......@@ -3131,10 +3147,12 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
String descZh = String.format("订单修改审批通过后运费与清关费的总额变%s", (changeAmount.compareTo(BigDecimal.ZERO) > 0 ? "少了" : "多了"));
String descEn = changeAmount.compareTo(BigDecimal.ZERO) > 0 ? "After the approval of order modification, the total amount of shipping and customs clearance fees has decreased" :
"After the order modification approval, the total amount of shipping and customs clearance fees has increased";
String descFr = changeAmount.compareTo(BigDecimal.ZERO) > 0 ? "Après l’approbation de la modification de la commande, le montant total des frais d’expédition et de dédouanement a diminué" :
"Après l’approbation de modification d’ordre, le montant total des frais d’expédition et de dédouanement a augmenté";
List<OrderExceptionDO> feeExceptionDOList = orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(orderDO.getOrderId(), null, OrderExceptionEnum.FEE_EXCEPTION.getKey());
// if (CollectionUtil.isEmpty(feeExceptionDOList) && Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(), orderDO.getTransportId())) {
if (CollectionUtil.isEmpty(feeExceptionDOList)) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.FEE_EXCEPTION, descZh, descEn);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.FEE_EXCEPTION, descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
// else if (!Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(), orderDO.getTransportId())) {
......
......@@ -480,7 +480,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 当前空运或海空联运订单下单时,没有渠道id,则生成渠道异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO =
this.genOrderException(order.getOrderId(), order, null, null, OrderExceptionEnum.CHANNEL_EXCEPTION,
"未选择线路渠道", "No route channel selected");
"未选择线路渠道", "No route channel selected", "Aucun canal de ligne sélectionné");
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
}
......@@ -1279,7 +1279,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
this.genOrderException(orderDO.getOrderId(),
orderDO, orderItemDO, null,
OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION,
String.format("订单【%s】中的商品【%s】未报价", orderDO.getOrderNo(), orderItemDO.getProdTitleZh()), String.format("The goods 【%s】 in the order 【%s】 are not quoted", orderItemDO.getProdTitleEn(), orderDO.getOrderNo()));
String.format("订单【%s】中的商品【%s】未报价", orderDO.getOrderNo(), orderItemDO.getProdTitleZh()),
String.format("The goods 【%s】 in the order 【%s】 are not quoted", orderItemDO.getProdTitleEn(), orderDO.getOrderNo()),
String.format("Les biens 【%s】 dans l’ordre 【%s】 ne sont pas cités", orderItemDO.getProdTitleFr(), orderDO.getOrderNo()));
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
noQuoteOrAutomaticNoQuote = 1;
......@@ -1303,7 +1305,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 产生单询异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, orderItemDO,
null, OrderExceptionEnum.LINE_LOOP_EXCEPTION, String.format("商品【%s】线路单询异常", orderItemDO.getProdTitleZh()),
String.format("Line inquiry exception for product [%s]", orderItemDO.getProdTitleEn()));
String.format("Line inquiry exception for product [%s]", orderItemDO.getProdTitleEn()),
String.format("Exception d’enquête en ligne pour le produit [%s]", orderItemDO.getProdTitleEn()));
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
// 标记已产生过单询异常, 并更新到数据库
orderItemDO.setIsHandlerOrderInquiryException(Boolean.TRUE);
......@@ -1335,15 +1338,20 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
boolean isAirWeightLimit = orderItemDO.getIsAirWeightLimit();
String descZh = "订单中商品%s的清关费未设置或已过期";
String descEn = "The customs clearance fee for item %s in the order has not been set or has expired";
String descFr = "Les frais de dédouanement pour l’article % S dans l’ordre n’ont pas été fixés ou ont expiré";
if (productPriceEmptyType == 2) {
descZh = "订单中商品%s的清关费区间未匹配上";
descEn = "The customs clearance fee range for product %s in the order does not match";
descFr = "La gamme de frais de dédouanement pour le produit % S dans l’ordre ne correspond pas";
}
descZh = String.format(descZh, orderItemDO.getProdTitleZh());
descEn = String.format(descEn, orderItemDO.getProdTitleEn());
descFr = String.format(descFr, orderItemDO.getProdTitleFr());
// 当前空运或海空联运订单下单时,没又渠道id,则生成渠道异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, orderItemDO, null, OrderExceptionEnum.CUSTOMS_FEE_NOT_QUOTE_EXCEPTION,
descZh, descEn);
descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
noQuoteOrAutomaticNoQuote = 1;
......@@ -1373,9 +1381,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
String descZh = String.format("订单修改审批通过后运费与清关费的总额变%s", (changeAmount.compareTo(BigDecimal.ZERO) > 0 ? "少了" : "多了"));
String descEn = changeAmount.compareTo(BigDecimal.ZERO) > 0 ? "After the approval of order modification, the total amount of shipping and customs clearance fees has decreased" :
"After the order modification approval, the total amount of shipping and customs clearance fees has increased";
String descFr = changeAmount.compareTo(BigDecimal.ZERO) > 0 ? "Après l’approbation de la modification de la commande, le montant total des frais d’expédition et de dédouanement a diminué" :
"Après l’approbation de modification d’ordre, le montant total des frais d’expédition et de dédouanement a augmenté";
List<OrderExceptionDO> feeExceptionDOList = orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(orderDO.getOrderId(), null, OrderExceptionEnum.FEE_EXCEPTION.getKey());
if (CollectionUtil.isEmpty(feeExceptionDOList) && Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(), orderDO.getTransportId())) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.FEE_EXCEPTION, descZh, descEn);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.FEE_EXCEPTION, descZh, descEn,descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
} else if (!Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(), orderDO.getTransportId())) {
if (CollectionUtil.isNotEmpty(feeExceptionDOList)) {
......@@ -1452,7 +1462,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
private OrderExceptionCreateReqVO genOrderException(Long orderId, OrderDO orderDO, OrderItemDO orderItemDO, Long customerId,
OrderExceptionEnum orderException, String descZh, String descEn) {
OrderExceptionEnum orderException, String descZh, String descEn,String descFr) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = new OrderExceptionCreateReqVO();
orderExceptionCreateReqVO.setOrderId(orderId);
orderExceptionCreateReqVO.setOrderNumber(orderDO.getOrderNo());
......@@ -1461,12 +1471,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderExceptionCreateReqVO.setOrderItemId(orderItemDO.getOrderItemId());
}
orderExceptionCreateReqVO.setOrderExceptionType(orderException.getKey());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).build());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).descFr(descFr).build());
return orderExceptionCreateReqVO;
}
private OrderExceptionCreateReqVO genOrderException(Long orderId, OrderBackVO vo, OrderItemDO orderItemDO, Long customerId,
OrderExceptionEnum orderException, String descZh, String descEn) {
OrderExceptionEnum orderException, String descZh, String descEn,String descFr) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = new OrderExceptionCreateReqVO();
orderExceptionCreateReqVO.setOrderId(orderId);
orderExceptionCreateReqVO.setOrderNumber(vo.getOrderNo());
......@@ -1475,7 +1485,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderExceptionCreateReqVO.setOrderItemId(orderItemDO.getOrderItemId());
}
orderExceptionCreateReqVO.setOrderExceptionType(orderException.getKey());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).build());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).descFr(descFr).build());
return orderExceptionCreateReqVO;
}
......@@ -1750,7 +1760,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (Objects.isNull(updateObj.getChannelId()) || 0 == updateObj.getChannelId()) {
// 当前空运或海空联运订单下单时,没有渠道id,则生成渠道异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(updateObj.getOrderId(), updateObj, null, null, OrderExceptionEnum.CHANNEL_EXCEPTION,
"未选择线路渠道", "No route channel selected");
"未选择线路渠道", "No route channel selected","Aucun canal d’itinéraire sélectionné");
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
} else {
......@@ -3889,8 +3899,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 重货异常
String descZh = String.format("该订单是重货订单, 重货方数(总):%s", zhongCbm);
String descEn = String.format("It's heavy order, value(sum):%s", zhongCbm);
String descFr = String.format("Son ordre lourd, valeur (somme):%s", zhongCbm);
if (CollectionUtil.isEmpty(pendHeavyExceptionList) || pendHeavyExceptionList.size() == 0) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_HEAVY_CARGO_EXCEPTION, descZh, descEn);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_HEAVY_CARGO_EXCEPTION, descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
} else {
// 如果有异常则更新说明
......@@ -3918,8 +3930,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 泡货异常
String descZh = String.format("该订单是泡货订单, 泡货重量(总):%sKg", paoKg);
String descEn = String.format("It's bubble order, weight(sum):%s", paoKg);
String descFr = String.format("C’est l’ordre de bulle, poids (somme):%s", paoKg);
if (CollectionUtil.isEmpty(pendBulkyExceptionList) || pendBulkyExceptionList.size() == 0) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_BULKY_CARGO_EXCEPTION, descZh, descEn);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_BULKY_CARGO_EXCEPTION, descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
} else {
// 如果有异常则更新说明
......@@ -5739,8 +5753,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
///重货异常
String descZh = String.format("该订单是重货订单, 重货方数(总):%s", zhongCbm);
String descEn = String.format("It's heavy order, value(sum):%s", zhongCbm);
String descFr = String.format("Son ordre lourd, valeur (somme):%s", zhongCbm);
if (CollectionUtil.isEmpty(pendHeavyExceptionList) || pendHeavyExceptionList.size() == 0) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_HEAVY_CARGO_EXCEPTION, descZh, descEn);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_HEAVY_CARGO_EXCEPTION, descZh, descEn,descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
} else {
// 如果有异常则更新说明
......@@ -5805,10 +5821,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 泡货异常
String descZh = String.format("该订单是泡货订单, 泡货重量(总):%sKg", paoKg);
String descEn = String.format("It's bubble order, weight(sum):%s", paoKg);
String descFr = String.format("C’est l’ordre de bulle, poids (somme):%s", paoKg);
if ((CollectionUtil.isEmpty(pendBulkyExceptionList) || pendBulkyExceptionList.size() == 0)) {
if (orderApprovalDO.getType() == 5 || bulkyExceptionList.size() == 0) {
// 当订单产生过泡货异常,且是泡重优惠申请时,不再产生泡货异常,泡重优惠申请只是修改订单整体收费值的操作
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_BULKY_CARGO_EXCEPTION, descZh, descEn);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_BULKY_CARGO_EXCEPTION, descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
} else {
......@@ -5941,8 +5959,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// TODO 这里会有一个问题,当审批通过时,该客户分配了客户经理并接收了,或者未接收的客户经理被接收了是否还产生异常
String descZh = orderBackVO.getDescZh();
String descEn = orderBackVO.getDescEn();
String descFr = orderBackVO.getDescFr();
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderBackVO.getOrderId(), orderBackVO, null, orderBackVO.getCustomerId(), OrderExceptionEnum.NOT_CUSTOMER_SERVICE_EXCEPTION,
descZh, descEn);
descZh, descEn, descFr);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
// 这里可能因为修改内容不触发计价业务,而提交审批内容的同时,提交了不用审批的修改货值,导致费用清单变更,所以这里需要同步当前数据库的费用清单
......@@ -6000,7 +6020,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (Objects.nonNull(oldOrder.getChannelId()) && oldOrder.getChannelId() > 0L && (Objects.isNull(orderDO.getChannelId()) || 0 == orderDO.getChannelId())) {
// 当前空运或海空联运订单下单时,没有渠道id,则生成渠道异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.CHANNEL_EXCEPTION,
"未选择线路渠道", "No route channel selected");
"未选择线路渠道", "No route channel selected","Aucun canal d’itinéraire sélectionné");
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
if ((Objects.isNull(oldOrder.getChannelId()) &&
......
......@@ -486,10 +486,11 @@ public class OrderWarehouseAdjustServiceImpl extends AbstractService<OrderWareho
// 异常
String descZh = getDesc(arrivedVO, manualExceptionType, 0);
String descEn = getDesc(arrivedVO, manualExceptionType, 1);
String descFr = getDesc(arrivedVO, manualExceptionType, 2);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, null, orderDO,
OrderExceptionEnum.ORDER_OTHER_EXCEPTION,
descZh, descEn, arrivedVO.getExceptionUrls());
descZh, descEn, descFr, arrivedVO.getExceptionUrls());
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
note = "-转异";
......@@ -563,23 +564,23 @@ public class OrderWarehouseAdjustServiceImpl extends AbstractService<OrderWareho
if (StringUtils.isNotEmpty(stringBuffer)) {
stringBuffer.append(",");
}
stringBuffer.append(lang == 0 ? data.getLabel() : data.getLabelEn());
stringBuffer.append(lang == 0 ? data.getLabel() : lang == 1 ? data.getLabelEn():data.getLabelFr());
}
}
if (StringUtils.isNotEmpty(stringBuffer)) {
stringBuffer.append(": ");
}
stringBuffer.append(lang == 0 ? arrivedVO.getDescZh() : arrivedVO.getDescEn());
stringBuffer.append(lang == 0 ? arrivedVO.getDescZh() : lang==1 ? arrivedVO.getDescEn(): arrivedVO.getDescFr());
return stringBuffer.toString();
}
private OrderExceptionCreateReqVO genOrderException(Long orderId, Long orderItemId, OrderDO orderDO, OrderExceptionEnum orderSuperfluousBoxException, String descZh, String descEn, List<String> exceptionUrls) {
private OrderExceptionCreateReqVO genOrderException(Long orderId, Long orderItemId, OrderDO orderDO, OrderExceptionEnum orderSuperfluousBoxException, String descZh, String descEn,String descFr, List<String> exceptionUrls) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = new OrderExceptionCreateReqVO();
orderExceptionCreateReqVO.setOrderId(orderId);
orderExceptionCreateReqVO.setOrderItemId(orderItemId);
orderExceptionCreateReqVO.setOrderNumber(orderDO.getOrderNo());
orderExceptionCreateReqVO.setOrderExceptionType(orderSuperfluousBoxException.getKey());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).build());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).descFr(descFr).build());
if (CollectionUtil.isNotEmpty(exceptionUrls)) {
orderExceptionCreateReqVO.setOrderExceptionAttr(CollectionUtil.join(exceptionUrls, ","));
}
......
......@@ -1164,10 +1164,13 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 异常
String descZh = getOrderOtherExceptionDesc(manualExceptionType,
0, finishReqVO.getDescZh(),
finishReqVO.getDescEn());
finishReqVO.getDescEn(),finishReqVO.getDescFr());
String descEn = getOrderOtherExceptionDesc(manualExceptionType,
1, finishReqVO.getDescZh(),
finishReqVO.getDescEn());
finishReqVO.getDescEn(),finishReqVO.getDescFr());
String descFr = getOrderOtherExceptionDesc(manualExceptionType,
2, finishReqVO.getDescZh(),
finishReqVO.getDescEn(),finishReqVO.getDescFr());
OrderExceptionCreateReqVO orderExceptionCreateReqVO =
genOrderException(orderId,
......@@ -1176,6 +1179,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
OrderExceptionEnum.ORDER_OTHER_EXCEPTION,
descZh,
descEn,
descFr,
finishReqVO.getExceptionUrls());
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
......@@ -1258,7 +1262,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, null, orderDO,
OrderExceptionEnum.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION,
channelPackagingOverWeightAdditionalBo.getExceptionDescZh(),
channelPackagingOverWeightAdditionalBo.getExceptionDescEn(), null, JSON.toJSONString(channelPackagingOverWeightAdditionalBo));
channelPackagingOverWeightAdditionalBo.getExceptionDescEn(), channelPackagingOverWeightAdditionalBo.getExceptionDescFr(), null, JSON.toJSONString(channelPackagingOverWeightAdditionalBo));
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
......@@ -1532,7 +1536,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
log.info("订单【{}】生成预付异常", orderDO.getOrderNo());
OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderId, null, orderDO, OrderExceptionEnum.ORDER_PAY_EXCEPTION,
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), null);
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(),OrderExceptionEnum.ORDER_PAY_EXCEPTION.getFrValueDesc(), null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
if (anyMatchAutoProcessPayException) {
......@@ -1552,7 +1556,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
if (!allMatchAutoProcessPayException) {
// 再生产一条预付异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO2 = this.genOrderException(orderId, null, orderDO, OrderExceptionEnum.ORDER_PAY_EXCEPTION,
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), null);
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getFrValueDesc(), null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO2);
}
}
......@@ -1571,7 +1575,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
) {
// 再生产一条预付异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO2 = this.genOrderException(orderId, null, orderDO, OrderExceptionEnum.ORDER_PAY_EXCEPTION,
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), null);
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getFrValueDesc(), null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO2);
}
// 若不是系统自动处理的预付异常,则说明 缺少1条系统自动处理的预付异常。则判断这条的处理状态,
......@@ -1584,7 +1588,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 本条已处理,则再生产一条,让其自动处理
if (orderExceptionDO.getOrderExceptionStatus() == 2) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO2 = this.genOrderException(orderId, null, orderDO, OrderExceptionEnum.ORDER_PAY_EXCEPTION,
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), null);
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getFrValueDesc(), null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO2);
}
......@@ -1606,7 +1610,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
if (!allMatchAutoProcessPayException) {
// 再生产一条预付异常
OrderExceptionCreateReqVO orderExceptionCreateReqVO2 = this.genOrderException(orderId, null, orderDO, OrderExceptionEnum.ORDER_PAY_EXCEPTION,
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), null);
OrderExceptionEnum.ORDER_PAY_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getEnValueDesc(), OrderExceptionEnum.ORDER_PAY_EXCEPTION.getFrValueDesc(), null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO2);
}
}
......@@ -1705,6 +1709,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
OrderExceptionEnum.ORDER_CONSIGNOR_EXCEPTION,
OrderExceptionEnum.ORDER_CONSIGNOR_EXCEPTION.getZhValueDesc(),
OrderExceptionEnum.ORDER_CONSIGNOR_EXCEPTION.getEnValueDesc(),
OrderExceptionEnum.ORDER_CONSIGNOR_EXCEPTION.getFrValueDesc(),
null);
......@@ -1743,9 +1748,10 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
///重货异常
String descZh = String.format("该订单是重货订单, 重货方数(总):%s", zhongCbm);
String descEn = String.format("It's heavy order, value(sum):%s", zhongCbm);
String descFr = String.format("Son ordre lourd, valeur (somme):%s", zhongCbm);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, null, orderDO,
OrderExceptionEnum.ORDER_HEAVY_CARGO_EXCEPTION, descZh, descEn, null);
OrderExceptionEnum.ORDER_HEAVY_CARGO_EXCEPTION, descZh, descEn, descFr, null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
// 更新订单为重货
orderService.updateOrderType(orderId, 2);
......@@ -1813,9 +1819,10 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 泡货异常
String descZh = String.format("该订单是泡货订单, 泡货重量(总):%sKg", paoKg);
String descEn = String.format("It's heavy order, weight(sum):%s", paoKg);
String descFr = String.format("C’est ordre lourd, poids (somme):%s", paoKg);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, null, orderDO,
OrderExceptionEnum.ORDER_BULKY_CARGO_EXCEPTION, descZh, descEn, null);
OrderExceptionEnum.ORDER_BULKY_CARGO_EXCEPTION, descZh, descEn, descFr, null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
// 更新订单为泡货
orderService.updateOrderType(orderId, 3);
......@@ -1885,6 +1892,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
String unit = "1";
DictDataRespDTO unitData =
DictFrameworkUtils.getDictDataFromCache("packaging_type", unit);
String labelFr = unitData != null ? unitData.getLabelFr() : unit;
String labelEn = unitData != null ? unitData.getLabelEn() : unit;
String label = unitData != null ? unitData.getLabel() : unit;
String autoProcessExceptionRemark = "系统自动处理 处理人admin";
......@@ -1906,6 +1914,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
OrderExceptionEnum.ORDER_SUPERFLUOUS_BOX_EXCEPTION,
String.format("超出%d%s", cartonsNumDiff, label),
String.format("more than %d %s", cartonsNumDiff, labelEn),
String.format("Plus de %d %s", cartonsNumDiff, labelFr),
null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
......@@ -1932,6 +1941,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
OrderExceptionEnum.ORDER_LACK_BOX_EXCEPTION,
String.format("缺少%d%s", cartonsNumDiff, label),
String.format("less than %d %s", cartonsNumDiff, labelEn),
String.format("Moins de %d %s", cartonsNumDiff, labelFr),
null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
......@@ -1969,7 +1979,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, orderItemDO.getOrderItemId(), orderDO,
OrderExceptionEnum.GOODS_ADD_EXCEPTION,
String.format("仓库入仓新增商品【%s】", productDO.getTitleZh()),
String.format("add new product【%s】", productDO.getTitleEn()), null);
String.format("add new product【%s】", productDO.getTitleEn()),
String.format("Ajouter un nouveau produit【%s】", productDO.getTitleFr()),null);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
} else {
// 删除新商品异常
......@@ -2043,24 +2054,30 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
applicationContext.publishEvent(queryChannelInfoEvent);
String channelNameZh = queryChannelInfoEvent.getNameZh();
String channelNameEn = queryChannelInfoEvent.getNameEn();
String channelNameFr = queryChannelInfoEvent.getNameFr();
LogisticsInfoDto startInfoAndDestInfoByLineId = warehouseLineMapper.getStartInfoAndDestInfoByLineId(orderDO.getLineId());
String startTitleZh = startInfoAndDestInfoByLineId.getStartTitleZh();
String startTitleEn = startInfoAndDestInfoByLineId.getStartTitleEn();
String startTitleFr = startInfoAndDestInfoByLineId.getStartTitleFr();
String destTitleZh = startInfoAndDestInfoByLineId.getDestTitleZh();
String destTitleEn = startInfoAndDestInfoByLineId.getDestTitleEn();
String destTitleFr = startInfoAndDestInfoByLineId.getDestTitleFr();
// 生成商品路线超重异常
String goodsLineWeightExceptionDescZh = String.format("商品【%s】在路线【%s】到【%s】【%s】渠道下的空运订单重量上限为【%s】kg,该订单中此商品的入仓重量为【%s】kg, 超过了此商品在此线路此渠道下的空运订单重量上限。",
productDO.getTitleZh(), startTitleZh, destTitleZh, channelNameZh, productPriceLineOverWeightLimit, weightSum);
String goodsLineWeightExceptionDescEn = String.format("The weight [%s]kg of item [%s] in the order channel [%s] line [%s] to [%s] exceeds the order item upper limit [%s] kg. ",
String goodsLineWeightExceptionDescEn = String.format("The weight [%s]kg of item [%s] in the order channel [%s] line [%s] to [%s] exceeds the order item upper limit [%s] kg.",
weightSum, productDO.getTitleEn(), channelNameEn, startTitleEn, destTitleEn, productPriceLineOverWeightLimit);
String goodsLineWeightExceptionDescFr = String.format("Le poids [%s]kg de l’article [%s] dans le canal de commande [%s] ligne [%s] à [%s] dépasse la limite supérieure de l’article de commande [%s]kg.",
weightSum, productDO.getTitleFr(), channelNameFr, startTitleFr, destTitleFr, productPriceLineOverWeightLimit);
goodsLineOverWeightAdditionalBo = new GoodsLineOverWeightAdditionalBo(
productDO.getId(), productDO.getTitleZh(), productDO.getTitleEn(),
orderDO.getLineId(), startTitleZh, startTitleEn, destTitleZh, destTitleEn,
orderDO.getChannelId(), channelNameZh, channelNameEn,
weightSum, productPriceLineOverWeightLimit, goodsLineWeightExceptionDescZh, goodsLineWeightExceptionDescEn);
productDO.getId(), productDO.getTitleZh(), productDO.getTitleEn(), productDO.getTitleFr(),
orderDO.getLineId(), startTitleZh, startTitleEn, startTitleFr, destTitleZh, destTitleEn, destTitleFr,
orderDO.getChannelId(), channelNameZh, channelNameEn, channelNameFr,
weightSum, productPriceLineOverWeightLimit, goodsLineWeightExceptionDescZh, goodsLineWeightExceptionDescEn, goodsLineWeightExceptionDescFr);
}
// 线路渠道包装额定重量
......@@ -2070,9 +2087,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 商品路线超重异常
String goodsLineWeightExceptionDescZh = goodsLineOverWeightAdditionalBo == null ? "" : goodsLineOverWeightAdditionalBo.getGoodsLineWeightExceptionDescZh();
String goodsLineWeightExceptionDescEn = goodsLineOverWeightAdditionalBo == null ? "" : goodsLineOverWeightAdditionalBo.getGoodsLineWeightExceptionDescEn();
String goodsLineWeightExceptionDescFr = goodsLineOverWeightAdditionalBo == null ? "" : goodsLineOverWeightAdditionalBo.getGoodsLineWeightExceptionDescFr();
// 路线渠道超重异常
String channelPackagingOverWeightExceptionDescZh = channelPackagingOverWeightAdditionalBo == null ? "" : channelPackagingOverWeightAdditionalBo.getExceptionDescZh();
String channelPackagingOverWeightExceptionDescEn = channelPackagingOverWeightAdditionalBo == null ? "" : channelPackagingOverWeightAdditionalBo.getExceptionDescEn();
String channelPackagingOverWeightExceptionDescFr = channelPackagingOverWeightAdditionalBo == null ? "" : channelPackagingOverWeightAdditionalBo.getExceptionDescFr();
boolean isCreateProductPriceOverweightException = false;
......@@ -2084,15 +2104,21 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
channelPackagingOverWeightExceptionDescZh = channelPackagingOverWeightExceptionDescZh + "另外," + goodsLineWeightExceptionDescZh;
channelPackagingOverWeightExceptionDescEn = channelPackagingOverWeightExceptionDescEn + "In addition, " + goodsLineWeightExceptionDescEn;
channelPackagingOverWeightExceptionDescFr = channelPackagingOverWeightExceptionDescFr + "En outre, " + goodsLineWeightExceptionDescFr;
channelPackagingOverWeightAdditionalBo.setExceptionDescZh(channelPackagingOverWeightExceptionDescZh);
channelPackagingOverWeightAdditionalBo.setExceptionDescEn(channelPackagingOverWeightExceptionDescEn);
channelPackagingOverWeightAdditionalBo.setExceptionDescFr(channelPackagingOverWeightExceptionDescFr);
}
// 2、渠道包装重量上限 小于等于 空运路线重量上限,则生成空运路线重量上限异常。描述得加上渠道包装异常的描述。
else {
goodsLineWeightExceptionDescZh = goodsLineWeightExceptionDescZh + "另外," + channelPackagingOverWeightExceptionDescZh;
goodsLineWeightExceptionDescEn = goodsLineWeightExceptionDescEn + "In addition, " + channelPackagingOverWeightExceptionDescEn;
goodsLineWeightExceptionDescFr = goodsLineWeightExceptionDescFr + "En outre, " + channelPackagingOverWeightExceptionDescFr;
goodsLineOverWeightAdditionalBo.setGoodsLineWeightExceptionDescZh(goodsLineWeightExceptionDescZh);
goodsLineOverWeightAdditionalBo.setGoodsLineWeightExceptionDescEn(goodsLineWeightExceptionDescEn);
goodsLineOverWeightAdditionalBo.setGoodsLineWeightExceptionDescFr(goodsLineWeightExceptionDescFr);
isCreateProductPriceOverweightException = true;
channelPackagingOverWeightAdditionalBo.setMerged(true);
......@@ -2112,7 +2138,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
boolean isNoSame = isNoSameOrderException(orderId, orderItemId, goodsLineWeightExceptionDescZh, goodsLineWeightExceptionDescEn, OrderExceptionEnum.LINE_WEIGHT_EXCEPTION);
if (isNoSame) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, orderItemId, orderDO,
OrderExceptionEnum.LINE_WEIGHT_EXCEPTION, goodsLineWeightExceptionDescZh, goodsLineWeightExceptionDescEn, null, JSON.toJSONString(goodsLineOverWeightAdditionalBo));
OrderExceptionEnum.LINE_WEIGHT_EXCEPTION, goodsLineWeightExceptionDescZh, goodsLineWeightExceptionDescEn, goodsLineWeightExceptionDescFr, null, JSON.toJSONString(goodsLineOverWeightAdditionalBo));
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
// 自动处理清关费未报价异常
......@@ -2157,27 +2183,33 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
applicationContext.publishEvent(queryChannelInfoEvent);
String channelNameZh = queryChannelInfoEvent.getNameZh();
String channelNameEn = queryChannelInfoEvent.getNameEn();
String channelNameFr = queryChannelInfoEvent.getNameFr();
DictDataRespDTO packagingTypeDict = DictFrameworkUtils.getDictDataFromCache("packaging_type", packaging);
String packagingLabelZh = packagingTypeDict.getLabel();
String packagingLabelEn = packagingTypeDict.getLabelEn();
String packagingLabelFr = packagingTypeDict.getLabelFr();
LogisticsInfoDto startInfoAndDestInfoByLineId = warehouseLineMapper.getStartInfoAndDestInfoByLineId(lineId);
String startTitleZh = startInfoAndDestInfoByLineId.getStartTitleZh();
String startTitleEn = startInfoAndDestInfoByLineId.getStartTitleEn();
String startTitleFr = startInfoAndDestInfoByLineId.getStartTitleFr();
String destTitleZh = startInfoAndDestInfoByLineId.getDestTitleZh();
String destTitleEn = startInfoAndDestInfoByLineId.getDestTitleEn();
String destTitleFr = startInfoAndDestInfoByLineId.getDestTitleFr();
String exceptionDescZh = String.format("当前渠道【%s】包装【%s】的上限为【%s】Kg, 该包装类型的入仓重量【%s】kg大于渠道包装重量上限",
channelNameZh, packagingLabelZh, channelPackagingAirWeightLimit, packagingWeightSum);
String exceptionDescEn = String.format("Channel [%s] packaging [%s] weight limit [%s] kg, the warehouse-in weight [%s] is exceed the limit",
channelNameEn, packagingLabelEn, channelPackagingAirWeightLimit, packagingWeightSum);
String exceptionDescFr = String.format("Canal [%s] emballage [%s] limite de poids [%s] kg, le poids d’entrepôt [%s] est dépasser la limite",
channelNameFr, packagingLabelFr, channelPackagingAirWeightLimit, packagingWeightSum);
ChannelPackagingOverWeightAdditionalBo additionalBo = new ChannelPackagingOverWeightAdditionalBo(lineId,
startTitleZh, startTitleEn, destTitleZh, destTitleEn, channelId, channelNameZh, channelNameEn,
packagingWeightSum, channelPackagingAirWeightLimit, packaging, packagingLabelZh, packagingLabelEn,
orderItemIdList, exceptionDescZh, exceptionDescEn, false);
startTitleZh, startTitleEn, startTitleFr,destTitleZh, destTitleEn, destTitleFr, channelId, channelNameZh, channelNameEn,channelNameFr,
packagingWeightSum, channelPackagingAirWeightLimit, packaging, packagingLabelZh, packagingLabelEn, packagingLabelFr,
orderItemIdList, exceptionDescZh, exceptionDescEn, exceptionDescFr, false);
resultList.add(additionalBo);
}
......@@ -2252,7 +2284,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}
}
private String getOrderOtherExceptionDesc(String manualExceptionType, Integer lang, String descZhInput, String descEnInput) {
private String getOrderOtherExceptionDesc(String manualExceptionType, Integer lang, String descZhInput, String descEnInput, String descFrInput) {
StringBuffer stringBuffer = new StringBuffer();
for (String value : manualExceptionType.split(",")) {
DictDataRespDTO data = DictFrameworkUtils.getDictDataFromCache("manual_exception_type", value);
......@@ -2266,11 +2298,11 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
if (StringUtils.isNotEmpty(stringBuffer)) {
stringBuffer.append(": ");
}
stringBuffer.append(lang == 0 ? (StringUtils.isNotEmpty(descZhInput) ? descZhInput : "") : (StringUtils.isNotEmpty(descEnInput) ? descEnInput : ""));
stringBuffer.append(lang == 0 ? (StringUtils.isNotEmpty(descZhInput) ? descZhInput : "") : lang == 1 ? (StringUtils.isNotEmpty(descEnInput) ? descEnInput : ""): (StringUtils.isNotEmpty(descFrInput) ? descFrInput : ""));
return stringBuffer.toString();
}
private String getStockUpExceptionDesc(String manualExceptionType, Integer lang, String descZhInput, String descEnInput) {
private String getStockUpExceptionDesc(String manualExceptionType, Integer lang, String descZhInput, String descEnInput, String descFrInput) {
StringBuffer stringBuffer = new StringBuffer();
for (String value : manualExceptionType.split(",")) {
DictDataRespDTO data = DictFrameworkUtils.getDictDataFromCache("stock_up_exception_type", value);
......@@ -2278,13 +2310,13 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
if (StringUtils.isNotEmpty(stringBuffer)) {
stringBuffer.append(",");
}
stringBuffer.append(lang == 0 ? data.getLabel() : data.getLabelEn());
stringBuffer.append(lang == 0 ? data.getLabel() : lang == 1 ? data.getLabelEn(): data.getLabelFr());
}
}
if (StringUtils.isNotEmpty(stringBuffer)) {
stringBuffer.append(": ");
}
stringBuffer.append(lang == 0 ? (StringUtils.isNotEmpty(descZhInput) ? descZhInput : "") : (StringUtils.isNotEmpty(descEnInput) ? descEnInput : ""));
stringBuffer.append(lang == 0 ? (StringUtils.isNotEmpty(descZhInput) ? descZhInput : "") : lang == 1 ? (StringUtils.isNotEmpty(descEnInput) ? descEnInput : "") : (StringUtils.isNotEmpty(descFrInput) ? descFrInput : ""));
return stringBuffer.toString();
}
......@@ -5011,7 +5043,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
private OrderExceptionCreateReqVO genOrderException(Long orderId, Long orderItemId, OrderDO
orderDO, OrderExceptionEnum orderSuperfluousBoxException, String descZh, String
descEn, List<String> exceptionUrls, String additionalJson) {
descEn, String descFr, List<String> exceptionUrls, String additionalJson) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = new OrderExceptionCreateReqVO();
orderExceptionCreateReqVO.setOrderId(orderId);
orderExceptionCreateReqVO.setOrderItemId(orderItemId);
......@@ -5020,15 +5052,15 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
if (CollectionUtil.isNotEmpty(exceptionUrls)) {
orderExceptionCreateReqVO.setOrderExceptionAttr(CollectionUtil.join(exceptionUrls, ","));
}
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).build());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).descFr(descFr).build());
orderExceptionCreateReqVO.setAdditionalJson(additionalJson);
return orderExceptionCreateReqVO;
}
private OrderExceptionCreateReqVO genOrderException(Long orderId, Long orderItemId, OrderDO
orderDO, OrderExceptionEnum orderSuperfluousBoxException, String descZh, String
descEn, List<String> exceptionUrls) {
return this.genOrderException(orderId, orderItemId, orderDO, orderSuperfluousBoxException, descZh, descEn, exceptionUrls, null);
descEn, String descFr, List<String> exceptionUrls) {
return this.genOrderException(orderId, orderItemId, orderDO, orderSuperfluousBoxException, descZh, descEn, descFr, exceptionUrls, null);
}
......@@ -5594,7 +5626,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, null, orderDO,
OrderExceptionEnum.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION,
channelPackagingOverWeightAdditionalBo.getExceptionDescZh(),
channelPackagingOverWeightAdditionalBo.getExceptionDescEn(), null, JSON.toJSONString(channelPackagingOverWeightAdditionalBo));
channelPackagingOverWeightAdditionalBo.getExceptionDescEn(),
channelPackagingOverWeightAdditionalBo.getExceptionDescFr(), null, JSON.toJSONString(channelPackagingOverWeightAdditionalBo));
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
......@@ -5640,13 +5673,16 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 15-10>3 且无泡货异常,说明需要生成重量异常
if (sumWeightNew.subtract(sumWeightFinishedWarehouseIn).compareTo(stockOverWeightLimit) > 0 && CollectionUtil.isEmpty(unProcessPaoExceptionList)) {
String manualExceptionType = "7"; // 重量异常
String descZh = getStockUpExceptionDesc(manualExceptionType, 0, finishReqVO.getDescZh(), finishReqVO.getDescZh());
String descEn = getStockUpExceptionDesc(manualExceptionType, 1, finishReqVO.getDescZh(), finishReqVO.getDescEn());
String descZh = getStockUpExceptionDesc(manualExceptionType, 0, finishReqVO.getDescZh(), finishReqVO.getDescZh(), finishReqVO.getDescFr());
String descEn = getStockUpExceptionDesc(manualExceptionType, 1, finishReqVO.getDescZh(), finishReqVO.getDescEn(), finishReqVO.getDescFr());
String descFr = getStockUpExceptionDesc(manualExceptionType, 1, finishReqVO.getDescZh(), finishReqVO.getDescEn(), finishReqVO.getDescFr());
descZh += String.format("系统设置浮动重量[%skg], 备货前重量[%sKg], 备货后重量[%sKg], 备货前后重量差大于浮动重量", stockOverWeightLimit, sumWeightFinishedWarehouseIn, sumWeightNew);
descEn += String.format("stock threshold [%skg], before stock weight [%sKg], after stock weight [%sKg], the weight difference before and after stock is greater than threshold", stockOverWeightLimit, sumWeightFinishedWarehouseIn, sumWeightNew);
descFr += String.format("Seuil de stock [%skg], avant le poids du stock [%skg], après le poids du stock [%skg], la différence de poids avant et après le stock est supérieure au seuil", stockOverWeightLimit, sumWeightFinishedWarehouseIn, sumWeightNew);
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, null, orderDO,
OrderExceptionEnum.STOCK_UP_EXCEPTION, descZh, descEn, finishReqVO.getExceptionUrls());
OrderExceptionEnum.STOCK_UP_EXCEPTION, descZh, descEn, descFr, finishReqVO.getExceptionUrls());
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
// 超过超重标准3kg,修改入仓数据、收费数据,订单重新计费。
......@@ -5668,11 +5704,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderWarehousePictureService.createWarehousePictureBatch(finishReqVO.getExceptionUrls(), 4, orderId);
// 异常
String descZh = getStockUpExceptionDesc(manualExceptionType, 0, finishReqVO.getDescZh(), finishReqVO.getDescZh());
String descEn = getStockUpExceptionDesc(manualExceptionType, 1, finishReqVO.getDescZh(), finishReqVO.getDescEn());
String descZh = getStockUpExceptionDesc(manualExceptionType, 0, finishReqVO.getDescZh(), finishReqVO.getDescZh(), finishReqVO.getDescFr());
String descEn = getStockUpExceptionDesc(manualExceptionType, 1, finishReqVO.getDescZh(), finishReqVO.getDescEn(), finishReqVO.getDescFr());
String descFr = getStockUpExceptionDesc(manualExceptionType, 2, finishReqVO.getDescZh(), finishReqVO.getDescEn(), finishReqVO.getDescFr());
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, null, orderDO,
OrderExceptionEnum.STOCK_UP_EXCEPTION, descZh + "(手动转异)", descEn + "(manual)", finishReqVO.getExceptionUrls());
OrderExceptionEnum.STOCK_UP_EXCEPTION, descZh + "(手动转异)", descEn + "(manual)", descFr + "(manuel)", finishReqVO.getExceptionUrls());
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
......@@ -5714,7 +5751,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
OrderExceptionCreateReqVO orderExceptionCreateReqVO = genOrderException(orderId, null, orderDO,
OrderExceptionEnum.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION,
channelPackagingOverWeightAdditionalBo.getExceptionDescZh(),
channelPackagingOverWeightAdditionalBo.getExceptionDescEn(), null, JSON.toJSONString(channelPackagingOverWeightAdditionalBo));
channelPackagingOverWeightAdditionalBo.getExceptionDescEn(),
channelPackagingOverWeightAdditionalBo.getExceptionDescFr(), null, JSON.toJSONString(channelPackagingOverWeightAdditionalBo));
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
......
package cn.iocoder.yudao.module.order.vo.order;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto;
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
......@@ -16,21 +15,23 @@ import cn.iocoder.yudao.module.order.vo.orderConsignor.OrderConsignorBackVO;
import cn.iocoder.yudao.module.order.vo.orderDeparture.OrderDepartureBackVO;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO;
import cn.iocoder.yudao.module.order.vo.orderObjective.OrderObjectiveBackVO;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import io.swagger.annotations.*;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
......@@ -581,6 +582,8 @@ public class OrderBackVO {
private String descZh = "归属客户:%s 客户编号:%s";
@ApiModelProperty(value = "订单修改审批如果需要产生未分配客户经理异常时的异常说明")
private String descEn = "Customer: %s Customer No.: %s";
@ApiModelProperty(value = "订单修改审批如果需要产生未分配客户经理异常时的异常说明")
private String descFr = "Client: %s Client No.: %s";
@ApiModelProperty(value = "语言")
private Integer lang;
......
......@@ -25,6 +25,9 @@ public class OrderManualExceptionBatchReqVO {
@ApiModelProperty(value = "转异-描述英文")
private String descEn;
@ApiModelProperty(value = "转异-描述法文")
private String descFr;
@ApiModelProperty(value = "转异-影像列表")
private List<String> exceptionUrls;
......
......@@ -21,4 +21,6 @@ public class OrderExceptionDescVO {
@ApiModelProperty(value = "描述英文")
private String descEn;
@ApiModelProperty(value = "描述法文")
private String descFr;
}
......@@ -22,8 +22,11 @@ public class ChannelPackagingOverWeightAdditionalBo {
private String lineStartNameZh;
private String lineStartNameEn;
private String lineStartNameFr;
private String lineDestNameZh;
private String lineDesttNameEn;
private String lineDestNameEn;
private String lineDestNameFr;
/**
......@@ -33,6 +36,7 @@ public class ChannelPackagingOverWeightAdditionalBo {
private String channelNameZh;
private String channelNameEn;
private String channelNameFr;
/**
* 重量新值
......@@ -54,6 +58,7 @@ public class ChannelPackagingOverWeightAdditionalBo {
*/
private String packingTypeNameZh;
private String packingTypeNameEn;
private String packingTypeNameFr;
/**
......@@ -64,6 +69,7 @@ public class ChannelPackagingOverWeightAdditionalBo {
private String exceptionDescZh;
private String exceptionDescEn;
private String exceptionDescFr;
private boolean isMerged = false;
......
......@@ -20,7 +20,7 @@ public class GoodsLineOverWeightAdditionalBo {
private String prodTitleZh;
private String prodTitleEn;
private String prodTitleFr;
/**
* 线路id
......@@ -29,8 +29,10 @@ public class GoodsLineOverWeightAdditionalBo {
private String lineStartNameZh;
private String lineStartNameEn;
private String lineStartNameFr;
private String lineDestNameZh;
private String lineDesttNameEn;
private String lineDestNameEn;
private String lineDestNameFr;
/**
......@@ -40,6 +42,7 @@ public class GoodsLineOverWeightAdditionalBo {
private String channelNameZh;
private String channelNameEn;
private String channelNameFr;
private BigDecimal weightSum;
......@@ -49,5 +52,6 @@ public class GoodsLineOverWeightAdditionalBo {
private String goodsLineWeightExceptionDescZh;
private String goodsLineWeightExceptionDescEn;
private String goodsLineWeightExceptionDescFr;
}
......@@ -46,6 +46,8 @@ public class OrderWarehouseAdjustArrivedVO {
@ApiModelProperty(value = "转异-描述英文")
private String descEn;
@ApiModelProperty(value = "转异-描述法文")
private String descFr;
@ApiModelProperty(value = "异常附件")
private List<String> exceptionUrls;
......
package cn.iocoder.yudao.module.order.vo.orderWarehouseIn;
import cn.iocoder.yudao.module.order.vo.orderLabel.OrderLabelDto;
import cn.iocoder.yudao.module.order.vo.orderLocation.OrderLocationCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderSpecialNeed.OrderSpecialNeedReceivableReqVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;
......@@ -47,6 +43,9 @@ public class OrderItemFinishStockedReqVO {
@ApiModelProperty(value = "转异-描述英文")
private String descEn;
@ApiModelProperty(value = "转异-描述法文")
private String descFr;
@ApiModelProperty(value = "转异-影像列表")
private List<String> exceptionUrls;
......
......@@ -42,6 +42,9 @@ public class OrderWarehouseInFinishReqVO {
@ApiModelProperty(value = "转异-描述英文")
private String descEn;
@ApiModelProperty(value = "转异-描述法文")
private String descFr;
@ApiModelProperty(value = "转异-影像列表")
private List<String> exceptionUrls;
......
package cn.iocoder.yudao.module.shipment.service.boxCabinetUnloadAbnormal;
import java.util.*;
import javax.annotation.Resource;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.enums.OrderExceptionEnum;
......@@ -23,9 +22,11 @@ import cn.iocoder.yudao.module.shipment.vo.boxCabinetUnloadAbnormal.BoxCabinetUn
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import javax.annotation.Resource;
import java.util.Collection;
import java.util.List;
import java.util.StringJoiner;
/**
* 卸柜异常 Service 实现类
......@@ -89,8 +90,10 @@ public class BoxCabinetUnloadAbnormalServiceImpl extends AbstractService<BoxCabi
.add(createReqVO.getProductNum() + unitDto.getLabel()).toString();
String descEn = new StringJoiner(", ").add(orderExceptionType.getEnValueDesc()).add(orderItemDO.getProdTitleEn())
.add(createReqVO.getProductNum() + " " + unitDto.getLabelEn()).toString();
String descFr = new StringJoiner(", ").add(orderExceptionType.getFrValueDesc()).add(orderItemDO.getProdTitleFr())
.add(createReqVO.getProductNum() + " " + unitDto.getLabelFr()).toString();
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).build());
orderExceptionCreateReqVO.setOrderExceptionDescVO(OrderExceptionDescVO.builder().descZh(descZh).descEn(descEn).descFr(descFr).build());
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment