diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 1bc8508a8..deb195aea 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -802,6 +802,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { //绑定订单和运单的关系 List advanceEntityList = advanceService.findListByIds(advanceIds); List waybillOrderEntities = new ArrayList<>(); + List updateAdvanceEntityList = new ArrayList<>(); Set orderCodeSet = new HashSet<>(); for (TrunklineAdvanceEntity advanceEntity : advanceEntityList) { orderCodeSet.add(advanceEntity.getOrderCode()); @@ -824,13 +825,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService { waybillOrderEntities.add(waybillOrderEntity); // orderCodes.add(advanceEntity.getOrderCode()); - advanceEntity.setWaybillStatus("1"); - advanceEntity.setWaybillNo(waybillNo); + TrunklineAdvanceEntity updateAdvanceEntity = new TrunklineAdvanceEntity(); + updateAdvanceEntity.setId(advanceId); + updateAdvanceEntity.setWaybillStatus("1"); + updateAdvanceEntity.setWaybillNo(waybillNo); + updateAdvanceEntityList.add(updateAdvanceEntity); } trunklineWaybillOrderService.saveBatch(waybillOrderEntities); //修改暂存单的状态为已开单 - advanceService.updateBatchById(advanceEntityList); + advanceService.updateBatchById(updateAdvanceEntityList); //更新暂存单包件的运单信息