Commit 4c1bf40a authored by yanghao's avatar yanghao

chore: 非备货退仓时 将订单的上一次打包数据更新为null。

parent c8f8b356
......@@ -4468,6 +4468,15 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
if (isPackagingRollback) {
// 更新前一次打包数据
orderDO = this.updateOrderSumPrevPacked(orderId);
} else {
//退仓时 将订单的上一次打包数据更新为null
orderMapper.update(null, new LambdaUpdateWrapper<OrderDO>()
.set(OrderDO::getFirstStockedTime, null)
.set(OrderDO::getSumVolumePrevPacked, null)
.set(OrderDO::getSumWeightPrevPacked, null)
.set(OrderDO::getSumCartonsNumPrevPacked, null)
.set(OrderDO::getSumQuantityAllPrevPacked, null)
.eq(OrderDO::getOrderId, orderId));
}
// 添加仓库操作纪录
......@@ -4515,18 +4524,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderLabelService.saveOrUpdateLabel(SaveOrUpdateOrderLabelDto.builder().orderId(orderId).orderLabelDtoList(labelDtoList).isAddLog(false).build());
}
//退仓时 将订单的上一次打包数据更新为null
orderMapper.update(null, new LambdaUpdateWrapper<OrderDO>()
.set(OrderDO::getFirstStockedTime, null)
.set(OrderDO::getSumVolumePrevPacked, null)
.set(OrderDO::getSumWeightPrevPacked, null)
.set(OrderDO::getSumCartonsNumPrevPacked, null)
.set(OrderDO::getSumQuantityAllPrevPacked, null)
.eq(OrderDO::getOrderId, orderId));
// 更新订单为普货
// 重置订单为普货,为计价做准备。后续完成入仓或完成备货时会处理。
orderService.updateOrderType(orderId, 1);
// 更新订单入仓信息
OrderWarehouseInVO orderWarehouseInVO = new OrderWarehouseInVO();
orderWarehouseInVO.setOrderId(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