From 032cb0ae2349bcde3e8648de15dbcf7fba6c16c2 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 7 Nov 2023 10:36:26 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=85=B3=E9=97=AD=E6=AC=A7=E6=B4=BE=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E6=95=B0=E6=8D=AE=202.=E5=90=8C=E6=AD=A5=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=BF=A1=E6=81=AF=E5=8A=A0=E5=85=A5=E6=89=98=E7=9B=98?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factory/receiver/OrderStatusHandler.java | 16 ++++++------ .../impl/SyncOrderInfoServiceImpl.java | 25 +++++++++++++++++++ 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java index 9c91623a2..5b74961d5 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java @@ -96,14 +96,14 @@ public class OrderStatusHandler { } break; - case FactoryConstant.OUPAI: - r = ouPaiFactoryService.handleStatusData(orderStatusDTO); - if (r.getCode() == 400 || r.getCode() == 200) { - log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.OUPAI, orderSelfNum); -// channel.basicAck(deliveryTag,true); - } else { - throw new CustomerException(r.getCode(), r.getMsg()); - } +// case FactoryConstant.OUPAI: +// r = ouPaiFactoryService.handleStatusData(orderStatusDTO); +// if (r.getCode() == 400 || r.getCode() == 200) { +// log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.OUPAI, orderSelfNum); +//// channel.basicAck(deliveryTag,true); +// } else { +// throw new CustomerException(r.getCode(), r.getMsg()); +// } default: 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 8642ad92f..69559e205 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 @@ -6,9 +6,11 @@ import com.logpm.basic.entity.BasicMaterialEntity; import com.logpm.basic.feign.IBasicMaterialClient; import com.logpm.basicdata.entity.BasicdataClientEntity; import com.logpm.basicdata.entity.BasicdataStoreBusinessEntity; +import com.logpm.basicdata.entity.BasicdataTrayEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataClientClient; import com.logpm.basicdata.feign.IBasicdataStoreBusinessClient; +import com.logpm.basicdata.feign.IBasicdataTrayClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelNumberEntity; @@ -65,6 +67,8 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { private final ITrayScanClient trayScanClient; private final IWarehouseTrayTypeClient warehouseTrayTypeClient; private final IInventoryDetailClient inventoryDetailClient; + private final IBasicdataTrayClient basicdataTrayClient; + private final ITrayClient trayClient; @Transactional(rollbackFor = Exception.class) @Override @@ -1349,6 +1353,27 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { continue; } + //判断托盘是否已经存在 + BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode("T" + trayId); + if(Objects.isNull(basicdataTrayEntity)){ + log.info("############syncTrayTypeData: 托盘信息不存在"); + //如果托盘不存在就去同步该托盘 + TrayEntity trayEntity = trayClient.getTrayById(trayId); + basicdataTrayEntity = new BasicdataTrayEntity(); + basicdataTrayEntity.setTenantId("627683"); + basicdataTrayEntity.setCreateUser(1714696768639311873L); + basicdataTrayEntity.setUpdateUser(1714696768639311873L); + basicdataTrayEntity.setCreateDept(1649331096241836033L); + basicdataTrayEntity.setPalletName(trayEntity.getTrayNo()); + basicdataTrayEntity.setPalletCode("T"+trayEntity.getId()); + basicdataTrayEntity.setWarehouseId(newWarehouseId); + basicdataTrayEntity.setTrayStatus(trayEntity.getStatus()+""); + basicdataTrayEntity.setType(1); + basicdataTrayEntity.setOldId(trayId); +// basicdataTrayEntity.setNowWarehouseId(nowNewWarehouseId); + basicdataTrayClient.addTray(basicdataTrayEntity); + } + //方式:1=仓,2=商场,3=客户,4=其他,5=服务号,6=合同号 //方式:60=仓,30=商场,50=客户,100=其他,10=服务号,20=合同号 String newTrayType = "100";