diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java index 2b59748b3..4f1c72e4f 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java @@ -1443,7 +1443,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { String waybillNo = entity.getWaybillNo(); if(StringUtil.isNotBlank(waybillNo)){ WayBillEntity wb = wayBillClient.getByWaybillNo(waybillNo); - if(Objects.isNull(wb)){ + if(!Objects.isNull(wb)){ Integer oWid = wb.getWarehouseId(); if(oldWarehouseId.equals(oWid)){ advanceEntity = entity; @@ -1454,7 +1454,19 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { } } + if(Objects.isNull(advanceEntity)){ + log.warn("#################saveOrderInfo: 暂存单信息不存在 orderCode={}",orderCode); + throw new CustomerException(403,"暂存单信息不存在"); + } + Integer advanceId = advanceEntity.getId(); + + if(Objects.isNull(wayBillEntity)){ + log.warn("#################saveOrderInfo: 暂存单暂未有运单信息 orderCode={}",orderCode); + throw new CustomerException(403,"暂存单暂未有运单信息"); + } + + //判断新系统是否有这条订单数据 DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode,newWarehouseId);