Commit b5225176 authored by lanbaoming's avatar lanbaoming

2024-06-13提交发布

parent 4851ca51
...@@ -2222,6 +2222,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2222,6 +2222,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderDO.getTransportId()) orderDO.getTransportId())
|| Objects.equals(TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue(), || Objects.equals(TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue(),
orderDO.getTransportId())) { orderDO.getTransportId())) {
// 没有待处理的清关费未报价异常,则需要生成 // 没有待处理的清关费未报价异常,则需要生成
//生成清关费异常 lanbm 2024-06-06 添加参数type=6,是处理价格异常 //生成清关费异常 lanbm 2024-06-06 添加参数type=6,是处理价格异常
noQuoteOrAutomaticNoQuote = noQuoteOrAutomaticNoQuote =
...@@ -2246,7 +2247,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2246,7 +2247,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
// 不可出渠道异常 // 不可出渠道异常
this.createNoCanShipmentChannelException(orderDO, this.createNoCanShipmentChannelException(orderDO,
event, item, warehouseInInfoVO, type, orderNoCanShipmentChannelExceptionDOList); event, item, warehouseInInfoVO,
type, orderNoCanShipmentChannelExceptionDOList);
} }
} }
// 当订单未报价、或待确认商品时,都需要将预付状态置null // 当订单未报价、或待确认商品时,都需要将预付状态置null
...@@ -2401,10 +2403,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2401,10 +2403,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
Integer type) { Integer type) {
//查询有无未报价异常 lanbm 2024-06-06 添加注释 //查询有无未报价异常 lanbm 2024-06-06 添加注释
List<OrderExceptionDO> orderNoQuoteExceptionDOList = List<OrderExceptionDO> orderNoQuoteExceptionDOList =
orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKey(orderDO.getOrderId(), orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKey(
orderDO.getOrderId(),
null, null,
orderItemDO.getProdId(), orderItemDO.getProdId(),
OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION.getKey()); OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION.getKey());
/*
String s = "type=" + type.toString() + String s = "type=" + type.toString() +
"getTransportId=" + orderDO.getTransportId().toString() + "getTransportId=" + orderDO.getTransportId().toString() +
"getNeedOrderInquiry=" + orderItemDO.getNeedOrderInquiry(); "getNeedOrderInquiry=" + orderItemDO.getNeedOrderInquiry();
...@@ -2436,10 +2441,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2436,10 +2441,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
zTestMapper.insert(z); zTestMapper.insert(z);
} }
//lanbm 2024-06-06 添加的逻辑点 //lanbm 2024-06-06 添加的逻辑点
*/
if (orderItemDO.getItemStatus() == -1 && !orderItemDO.getIsProd()) { if (orderItemDO.getItemStatus() == -1 && !orderItemDO.getIsProd()) {
if (CollectionUtil.isEmpty(orderNoQuoteExceptionDOList)) { if (CollectionUtil.isEmpty(orderNoQuoteExceptionDOList)) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = OrderExceptionCreateReqVO orderExceptionCreateReqVO =
this.genOrderException(orderDO.getOrderId(), this.genOrderException(orderDO.getOrderId(),
orderDO, orderDO,
...@@ -2457,6 +2463,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2457,6 +2463,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
} }
noQuoteOrAutomaticNoQuote = 1; noQuoteOrAutomaticNoQuote = 1;
} else { } else {
zTest z = new zTest();
z.setTestname("测试点1");
z.setCreatedate(new Date());
zTestMapper.insert(z);
if (CollectionUtil.isNotEmpty(orderNoQuoteExceptionDOList)) { if (CollectionUtil.isNotEmpty(orderNoQuoteExceptionDOList)) {
// TODO 当其他业务补充了品名价格后,如果还有待处理的未报价异常,需要同步处理掉 // TODO 当其他业务补充了品名价格后,如果还有待处理的未报价异常,需要同步处理掉
orderExceptionService.autoProcessException(orderDO.getOrderId(), orderExceptionService.autoProcessException(orderDO.getOrderId(),
...@@ -2469,6 +2480,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2469,6 +2480,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
} }
return noQuoteOrAutomaticNoQuote; return noQuoteOrAutomaticNoQuote;
} }
private void saveLog(OrderDO orderDO, private void saveLog(OrderDO orderDO,
OrderItemDO orderItemDO, OrderItemDO orderItemDO,
WarehouseInInfoVO warehouseInInfoVO, WarehouseInInfoVO warehouseInInfoVO,
...@@ -2541,7 +2553,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2541,7 +2553,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO.getOrderItemId(), orderItemDO.getOrderItemId(),
OrderExceptionEnum.LINE_LOOP_EXCEPTION.getKey()); OrderExceptionEnum.LINE_LOOP_EXCEPTION.getKey());
saveLog(orderDO, orderItemDO, warehouseInInfoVO, type); //saveLog(orderDO, orderItemDO, warehouseInInfoVO, type);
// 避免在前面自动处理未报价异常和清关费未报价异常时的回调,优先创建了单询异常,造成并发的重复创建 // 避免在前面自动处理未报价异常和清关费未报价异常时的回调,优先创建了单询异常,造成并发的重复创建
if (CollectionUtil.isEmpty(orderInquiryExceptionDOList)) { if (CollectionUtil.isEmpty(orderInquiryExceptionDOList)) {
......
...@@ -1603,11 +1603,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -1603,11 +1603,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} }
private int createOrderNoQuoteException(OrderDO orderDO, int noQuoteOrAutomaticNoQuote, OrderItemDO orderItemDO) { private int createOrderNoQuoteException(OrderDO orderDO,
List<OrderExceptionDO> orderNoQuoteExceptionDOList = orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(orderDO.getOrderId(), orderItemDO.getOrderItemId(), OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION.getKey()); int noQuoteOrAutomaticNoQuote,
OrderItemDO orderItemDO) {
List<OrderExceptionDO> orderNoQuoteExceptionDOList =
orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(orderDO.getOrderId(), orderItemDO.getOrderItemId(), OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION.getKey());
if (orderItemDO.getItemStatus() == -1 && !orderItemDO.getIsProd()) { if (orderItemDO.getItemStatus() == -1 && !orderItemDO.getIsProd()) {
if (CollectionUtil.isEmpty(orderNoQuoteExceptionDOList)) { if (CollectionUtil.isEmpty(orderNoQuoteExceptionDOList)) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO = 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())); OrderExceptionCreateReqVO orderExceptionCreateReqVO =
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()));
orderExceptionService.createOrderException(orderExceptionCreateReqVO); orderExceptionService.createOrderException(orderExceptionCreateReqVO);
} }
noQuoteOrAutomaticNoQuote = 1; noQuoteOrAutomaticNoQuote = 1;
...@@ -5897,7 +5904,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -5897,7 +5904,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} }
orderBusinessService.addOrderTimeLog(orderDO.getStatus(), orderDO, 7, now, now); orderBusinessService.addOrderTimeLog(orderDO.getStatus(), orderDO, 7, now, now);
// 空运相关订单处理业务 // 空运相关订单处理业务
if (Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(), orderDO.getTransportId()) if (Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(),
orderDO.getTransportId())
|| Objects.equals(TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue(), orderDO.getTransportId())) { || Objects.equals(TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue(), orderDO.getTransportId())) {
// 空运渠道异常处理,当编辑订单后,订单渠道补充完,则调用处理空运渠道异常 // 空运渠道异常处理,当编辑订单后,订单渠道补充完,则调用处理空运渠道异常
if ((Objects.isNull(oldOrder.getChannelId()) || oldOrder.getChannelId() == 0L) && Objects.nonNull(orderDO.getChannelId()) && orderDO.getChannelId() > 0) { if ((Objects.isNull(oldOrder.getChannelId()) || oldOrder.getChannelId() == 0L) && Objects.nonNull(orderDO.getChannelId()) && orderDO.getChannelId() > 0) {
...@@ -5909,16 +5917,23 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -5909,16 +5917,23 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
"未选择线路渠道", "No route channel selected"); "未选择线路渠道", "No route channel selected");
orderExceptionService.createOrderException(orderExceptionCreateReqVO); orderExceptionService.createOrderException(orderExceptionCreateReqVO);
} }
if ((Objects.isNull(oldOrder.getChannelId()) && Objects.nonNull(orderDO.getChannelId())) if ((Objects.isNull(oldOrder.getChannelId()) &&
|| (Objects.nonNull(oldOrder.getChannelId()) && Objects.nonNull(orderDO.getChannelId()) && oldOrder.getChannelId() != orderDO.getChannelId())) { Objects.nonNull(orderDO.getChannelId()))
|| (Objects.nonNull(oldOrder.getChannelId())
&& Objects.nonNull(orderDO.getChannelId()) &&
oldOrder.getChannelId() != orderDO.getChannelId())) {
// 渠道变更 // 渠道变更
OrderDto orderDto = new OrderDto(); OrderDto orderDto = new OrderDto();
BeanUtils.copyProperties(orderDO, orderDto); BeanUtils.copyProperties(orderDO, orderDto);
applicationContext.publishEvent(new WarehouseInOrderChangeChannelEvent(orderDto)); applicationContext.publishEvent(
new WarehouseInOrderChangeChannelEvent(orderDto));
} }
} }
orderBusinessService.addOrderTimeLog(orderDO.getStatus(), orderDO, 7); orderBusinessService.addOrderTimeLog(orderDO.getStatus(), orderDO, 7);
this.updateStatus(orderDO.getOrderId(), null, null, null, null, null, 0, this.getAuditResult(orderBackVO.getApplyStatus(), ORDER_UPDATE.getValue()), null, null, JSONObject.toJSONString(orderBackVO.getApplyInfoList())); this.updateStatus(orderDO.getOrderId(),
null, null, null,
null, null, 0,
this.getAuditResult(orderBackVO.getApplyStatus(), ORDER_UPDATE.getValue()), null, null, JSONObject.toJSONString(orderBackVO.getApplyInfoList()));
if (orderBackVO.getIsDrawee()) { if (orderBackVO.getIsDrawee()) {
...@@ -5969,7 +5984,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -5969,7 +5984,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} }
// TODO 当运输方式出现变更时需要重置入仓业务 // TODO 当运输方式出现变更时需要重置入仓业务
if (orderBackVO.getIsTransport()) { if (orderBackVO.getIsTransport()) {
applicationContext.publishEvent(new WarehouseInOrderChangeTransportEvent(orderDO.getOrderId())); applicationContext.publishEvent(
new WarehouseInOrderChangeTransportEvent(orderDO.getOrderId()));
} }
} }
......
...@@ -35,11 +35,13 @@ import cn.iocoder.yudao.module.member.api.user.MemberUserApi; ...@@ -35,11 +35,13 @@ import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO; import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO;
import cn.iocoder.yudao.module.order.convert.orderException.OrderExceptionConvert; import cn.iocoder.yudao.module.order.convert.orderException.OrderExceptionConvert;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO; import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.zTest;
import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderException.OrderExceptionDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderException.OrderExceptionDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderExceptionChannelPrice.OrderExceptionChannelPriceDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderExceptionChannelPrice.OrderExceptionChannelPriceDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderExceptionResult.OrderExceptionResultDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderExceptionResult.OrderExceptionResultDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.dal.mysql.order.ZTestMapper2;
import cn.iocoder.yudao.module.order.dal.mysql.orderException.OrderExceptionMapper; import cn.iocoder.yudao.module.order.dal.mysql.orderException.OrderExceptionMapper;
import cn.iocoder.yudao.module.order.enums.OrderAbnormalStateEnum; import cn.iocoder.yudao.module.order.enums.OrderAbnormalStateEnum;
import cn.iocoder.yudao.module.order.enums.OrderExceptionEnum; import cn.iocoder.yudao.module.order.enums.OrderExceptionEnum;
...@@ -167,6 +169,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap ...@@ -167,6 +169,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
private ApplicationContext applicationContext; private ApplicationContext applicationContext;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Long createOrderException(OrderExceptionCreateReqVO createReqVO) { public Long createOrderException(OrderExceptionCreateReqVO createReqVO) {
...@@ -2666,7 +2670,13 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap ...@@ -2666,7 +2670,13 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
} }
@Override @Override
public void autoProcessException(Long orderId, Long orderItemId, OrderExceptionEnum orderExceptionEnum, String remark, String orderExceptionHandlerResult) { public void autoProcessException(Long orderId, Long orderItemId,
autoProcessException(orderId, orderItemId, orderExceptionEnum, remark, orderExceptionHandlerResult, true); OrderExceptionEnum orderExceptionEnum,
String remark,
String orderExceptionHandlerResult) {
autoProcessException(orderId, orderItemId,
orderExceptionEnum, remark,
orderExceptionHandlerResult, true);
} }
} }
...@@ -4768,9 +4768,13 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI ...@@ -4768,9 +4768,13 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 空运订单,渠道包装重量超限异常 // 空运订单,渠道包装重量超限异常
if (orderDO.getTransportId() == 3 || orderDO.getTransportId() == 4) { if (orderDO.getTransportId() == 3 || orderDO.getTransportId() == 4) {
Long orderId = orderDO.getOrderId(); Long orderId = orderDO.getOrderId();
List<OrderWarehouseInDO> orderWarehouseInDOList = orderWarehouseInMapper.selectList(OrderWarehouseInDO::getOrderId, orderId); List<OrderWarehouseInDO> orderWarehouseInDOList =
orderWarehouseInMapper.selectList(OrderWarehouseInDO::getOrderId, orderId);
List<ChannelPackagingOverWeightAdditionalBo> channelPackagingOverWeightAdditionalBoList = genChannelPackagingOverweightAdditionalBoList(orderDO, orderWarehouseInDOList); List<ChannelPackagingOverWeightAdditionalBo>
channelPackagingOverWeightAdditionalBoList =
genChannelPackagingOverweightAdditionalBoList(orderDO,
orderWarehouseInDOList);
if (CollectionUtil.isNotEmpty(channelPackagingOverWeightAdditionalBoList)) { if (CollectionUtil.isNotEmpty(channelPackagingOverWeightAdditionalBoList)) {
channelPackagingOverWeightAdditionalBoList = channelPackagingOverWeightAdditionalBoList.stream().filter(t -> !t.isMerged()).collect(Collectors.toList()); channelPackagingOverWeightAdditionalBoList = channelPackagingOverWeightAdditionalBoList.stream().filter(t -> !t.isMerged()).collect(Collectors.toList());
...@@ -4785,7 +4789,11 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI ...@@ -4785,7 +4789,11 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
} }
} else { } else {
orderExceptionService.autoProcessException(orderId, null, OrderExceptionEnum.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION, "未超过路线渠道包装重量上限,系统已自动处理", OrderExceptionResult.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION_RESULT.CONFIRMED_SEND); orderExceptionService.autoProcessException(orderId,
null,
OrderExceptionEnum.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION,
"未超过路线渠道包装重量上限,系统已自动处理",
OrderExceptionResult.CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION_RESULT.CONFIRMED_SEND);
} }
} }
} }
......
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