From 327a1f99af41e44ef8de7d9cea94ace04394cdd8 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 23 May 2024 14:48:09 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8E=A8=E9=80=81=E8=AE=A2=E5=8D=95=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comfac/service/impl/FactoryCommonServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 cb7a207a7..5471b98b6 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 @@ -129,6 +129,7 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { @Override public void extracted(String status, String unitNo, String currentWarehouseId, String operationTime, Integer trayId) { log.info("#############extracted: 当前处理的数据为 status={} unitNo={} currentWarehouseId={} operationTime={} trayId={}",status,unitNo,currentWarehouseId,operationTime,trayId); + String redisKey = "extracted:"+unitNo; if ("4".equals(status) || "2".equals(status) || "1".equals(status)) { //继续判断是否到达目的仓 @@ -152,8 +153,12 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { if (OldSystemDataPushConfig.getWarehourseIdList().contains(currentWarehouseId)) { try { if ("1".equals(status) || "4".equals(status)) { - // 始发仓和目的仓入库 - panFactoryDataService.handleDataToPlatform(unitNo, operationTime,Integer.parseInt(currentWarehouseId)); + Boolean exists = bladeRedis.exists(redisKey); + if(Boolean.FALSE.equals(exists)){ + bladeRedis.setEx(redisKey, "1", 60L); + // 始发仓和目的仓入库 + panFactoryDataService.handleDataToPlatform(unitNo, operationTime,Integer.parseInt(currentWarehouseId)); + } } else { log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>> 错误的状态"); }