From 4aad0850ed9a5405f77cd157122e8b24836e0bf2 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Mon, 17 Jul 2023 15:08:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E8=BF=94=E5=9B=9E=E7=BB=99?= =?UTF-8?q?=E6=A2=A6=E5=A4=A9=E7=9A=84=E6=95=B0=E6=8D=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=88=B0=E8=BE=BE=E7=9B=AE=E7=9A=84=E4=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/MtFactoryDataServiceImpl.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java index a546f3e9f..79cd84be0 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java @@ -30,7 +30,6 @@ import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springblade.common.exception.CustomerException; -import org.springblade.common.utils.CommonUtil; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.StringUtil; @@ -290,6 +289,23 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { return Resp.fail(400,"当前数据的状态不推送"); } + if ("4".equals(status)){ + //继续判断是否到达目的仓 + String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id + //查询destinationWarehouse logiBillNo plantId数据 + Map supplyData = advanceDetailClient.getSupplyData(orderStatusDTO.getUnitNo()); + String destinationWarehouseId = supplyData.get("destinationWarehouseId");//目的仓id + if(StringUtil.isBlank(currentWarehouseId)||StringUtil.isBlank(destinationWarehouseId)){ + log.warn("##############dealWithDataHandler: 仓库数据有问题currentWarehouseId={} destinationWarehouseId={}",currentWarehouseId,destinationWarehouseId); + throw new CustomerException(400,"仓库数据有误"); + }else{ + if(!currentWarehouseId.equals(destinationWarehouseId)){ + log.info("##############dealWithDataHandler: 不用处理的状态 currentWarehouseId={} destinationWarehouseId={}",currentWarehouseId,destinationWarehouseId); + throw new CustomerException(400,"仓库数据有误"); + } + } + } + //通过包件码查询是否是要推送的订单 String unitNo = orderStatusDTO.getUnitNo();//包件码 QueryWrapper packageInfoQueryWrapper = new QueryWrapper<>();