From 34573685094fa6846beceb8988f4b4ab3b1d687d Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 23 Jul 2024 09:59:28 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=90=8C=E6=AD=A5=E6=95=B0?= =?UTF-8?q?=E6=8D=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SyncOrderInfoServiceImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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);