Commit 0c9ccddb authored by yanghao's avatar yanghao Committed by 332784038@qq.com

chore: 订单修改后入仓相关异常的处理

parent f62d10d3
......@@ -1712,6 +1712,9 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
if (CollectionUtil.isEmpty(listOrderException)) {
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
} else {
orderExceptionService.autoProcessException(orderId, null, OrderExceptionEnum.ORDER_CONSIGNOR_EXCEPTION,
"系统自动处理为已处理", OrderExceptionResult.ORDER_CONSIGNOR_EXCEPTION_RESULT.CONFIRM_CHECK);
}
}
}
......@@ -5878,6 +5881,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
ErrorCodeConstants.ORDER_NOT_EXISTS);
}
// 重置重泡货优惠
resetSpecialVWeightAndWeightUnit(orderId, orderDO,
false, // finishReqVO.getIsSumWeightNoChange(),
false //finishReqVO.getIsSumVolumeNoChange()
);
List<OrderWarehouseInDO> orderWarehouseInDOList =
orderWarehouseInMapper.selectList(OrderWarehouseInDO::getOrderId,
orderDO.getOrderId());
......@@ -5904,6 +5913,21 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 处理发货人异常
processConsignorException(false, orderId, orderDO);
// 查询订单异常数量
List<OrderExceptionDO> orderUnProcessExceptionList =
orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(orderId, null, null);
// 重置异常状态
int exceptionNum = orderUnProcessExceptionList.size();
if (exceptionNum == 0) {
orderService.updateStatus(orderId, orderDO.getOrderNo(), null, 0, null, null, null, null, false);
} else if (exceptionNum == 1) {
// 由多个异常变成1个异常时,需要更新
OrderExceptionDO orderExceptionDO = orderUnProcessExceptionList.get(0);
orderService.updateStatus(orderId, orderDO.getOrderNo(),
null, OrderAbnormalStateEnum.keyOf(orderExceptionDO.getOrderExceptionType()).getValue(), null, null, null, null, false);
}
}
private OrderDO updateOrderSumPrevPacked(Long orderId) {
......
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