From 108a0abec81baa5ee5577375e22f5a0062b98606 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 24 Oct 2023 17:43:37 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=80=81=E7=B3=BB=E7=BB=9F=E5=8D=B8=E5=88=86?= =?UTF-8?q?=E4=B8=80=E4=BD=93=E6=95=B0=E6=8D=AE=E9=80=BB=E8=BE=91=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FactoryCommonServiceImpl.java | 1 + .../factory/receiver/DealWithDataHandler.java | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java index 42554dad7..28ba1b8e6 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java @@ -34,6 +34,7 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { @Override public void syncTrayTypeData(String unitNo, Integer trayId, String oldWarehouseId) { + log.info("###############syncTrayTypeData: 包件打托开始 unitNo={} trayId={} oldWarehouseId={}",unitNo,trayId,oldWarehouseId); //先判断新系统仓库信息是否存在 BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getWarehouseByOldId(Integer.parseInt(oldWarehouseId)); if(Objects.isNull(warehouseEntity)){ diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java index a27e7e498..b6ad1446c 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java @@ -17,7 +17,6 @@ import org.springframework.stereotype.Component; import java.io.IOException; import java.util.Map; -import java.util.Objects; /** @@ -48,7 +47,7 @@ public class DealWithDataHandler { String unitNo = orderStatusDTO.getUnitNo(); String operationTime = orderStatusDTO.getOperationTime(); Integer trayId = orderStatusDTO.getTrayId(); - if ("4".equals(status)) { + if ("4".equals(status) || "2".equals(status)) { //继续判断是否到达目的仓 String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id //查询destinationWarehouse logiBillNo plantId数据 @@ -68,11 +67,16 @@ public class DealWithDataHandler { } else { //真正的处理需要的数据 try { - panFactoryDataService.handleDataToPlatform(unitNo, operationTime); - //同步打托数据 - if(!Objects.isNull(trayId)){ - factoryCommonService.syncTrayTypeData(unitNo,trayId,currentWarehouseId); + if ("4".equals(status)) { + panFactoryDataService.handleDataToPlatform(unitNo, operationTime); + }else if("2".equals(status)){ +// //同步打托数据 +// if(!Objects.isNull(trayId)){ +// factoryCommonService.syncTrayTypeData(unitNo,trayId,currentWarehouseId); +// } } + + } catch (Exception e) { e.printStackTrace(); }