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 bb98e847e..cb7a207a7 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 @@ -153,7 +153,7 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { try { if ("1".equals(status) || "4".equals(status)) { // 始发仓和目的仓入库 - panFactoryDataService.handleDataToPlatform(unitNo, operationTime); + panFactoryDataService.handleDataToPlatform(unitNo, operationTime,Integer.parseInt(currentWarehouseId)); } else { log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>> 错误的状态"); } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java index 196b2057a..f509c2f46 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java @@ -38,7 +38,7 @@ public class OpReceivingDataHandler { String receivingTime = object.getString("receivingTime"); //真正处理需要的数据 try { - panFactoryDataService.handleDataToPlatform(orderPackageCode, receivingTime); + panFactoryDataService.handleDataToPlatform(orderPackageCode, receivingTime,null); } catch (CustomerException e) { log.error("##################opReceivingDataHandler: 处理欧派收货数据到新系统,orderPackageCode:{},receivingTime:{},msg:{}", diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/IPanFactoryDataService.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/IPanFactoryDataService.java index a924c595a..f929a42d6 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/IPanFactoryDataService.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/IPanFactoryDataService.java @@ -18,7 +18,7 @@ public interface IPanFactoryDataService { R hwyHandleStatusData(OrderStatusDTO orderStatusDTO); - void handleDataToPlatform(String unitNo,String operationTime); + void handleDataToPlatform(String unitNo,String operationTime,Integer oldWarehouseId); Long saveData(PanFactoryOrderDTO factoryOrderDTO); } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java index dd9b57ea6..74da067c5 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java @@ -23,7 +23,6 @@ import com.logpm.distribution.feign.IDistributionParcelListClient; import com.logpm.distribution.feign.IDistributionStockArticleClient; import com.logpm.factory.comfac.dto.OrderInfoDTO; import com.logpm.factory.comfac.dto.OrderStatusDTO; -import com.logpm.factory.comfac.service.IOrderStatusLogService; import com.logpm.factory.pan.dto.PanFactoryOrderDTO; import com.logpm.factory.pan.dto.PanPackageInfoDTO; import com.logpm.factory.pan.dto.PanPackageListDTO; @@ -455,11 +454,19 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { @Transactional(rollbackFor = Exception.class) @Override - public void handleDataToPlatform(String unitNo, String operationTime) { + public void handleDataToPlatform(String unitNo, String operationTime,Integer oldWarehouseId) { log.info("############handleDataToPlatform: 处理数据到platform unitNo={}", unitNo); + BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getWarehouseByOldId(oldWarehouseId); + if(Objects.isNull(basicdataWarehouseEntity)){ + log.warn("############handleDataToPlatform: 仓库信息不存在 oldWarehouseId={}",oldWarehouseId); + throw new CustomerException(405, "仓库信息不存在"); + } + + Long warehouseId = basicdataWarehouseEntity.getId(); + //先查询包件是否已存入到新系统数据库 - List distributionParcelListEntity = distributionParcelListClient.findByPacketBarCode(unitNo); + DistributionParcelListEntity distributionParcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(unitNo,warehouseId); if (ObjectUtils.isEmpty(distributionParcelListEntity)) { //未找到包件信息那就去新增 //1.根据包条码去老系统数据库找到对应的包条信息 @@ -501,12 +508,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { // Integer oldId = orderDetailEntity.getNowWarehouseId(); // 查询数据对应的仓库名称 - BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.findByName(destinationWarehouse); - if(Objects.isNull(basicdataWarehouseEntity)){ - log.warn("############handleDataToPlatform: 仓库信息不存在 destinationWarehouse={}",destinationWarehouse); - throw new CustomerException(405, "仓库信息不存在"); - } - Long warehouseId = basicdataWarehouseEntity.getId(); + // OrderCountEntity orderCountEntity = orderCountClient.getEntityByOrderCode(orderSelfNum,oldId); // if(Objects.isNull(orderCountEntity)){