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<>();