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 e7dac41e7..b4d0b160e 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 @@ -40,10 +40,10 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { //先判断是否两个数据已经执行完成 String ruku = bladeRedis.get("arrive-"+unitNo); - String tray = bladeRedis.get("tray-"+unitNo); + trayId = bladeRedis.get("tray-"+unitNo); - if(StringUtil.isBlank(ruku) || StringUtil.isBlank(tray)){ - log.error("###############syncTrayTypeData: 数据不完整,暂不打托 ruku={} tray={}",ruku,tray); + if(StringUtil.isBlank(ruku) || Objects.isNull(trayId)){ + log.error("###############syncTrayTypeData: 数据不完整,暂不打托 ruku={} trayId={}",ruku,trayId); throw new CustomerException(403,"数据不完整,暂不打托"); } @@ -60,6 +60,7 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { //判断托盘是否已经存在 BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode("T" + trayId); if(Objects.isNull(basicdataTrayEntity)){ + log.info("############syncTrayTypeData: 托盘信息不存在"); //如果托盘不存在就去同步该托盘 TrayEntity trayEntity = trayClient.getTrayById(trayId); basicdataTrayEntity = new BasicdataTrayEntity(); 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 68cd0f347..d66ef5c73 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 @@ -73,14 +73,14 @@ public class DealWithDataHandler { if ("4".equals(status)) { panFactoryDataService.handleDataToPlatform(unitNo, operationTime); }else if("2".equals(status)){ - bladeRedis.setEx("tray-"+unitNo,unitNo,30L); + bladeRedis.setEx("tray-"+unitNo,trayId,30L); } //同步打托数据 factoryCommonService.syncTrayTypeData(unitNo,trayId,currentWarehouseId); } catch (Exception e) { - e.printStackTrace(); + log.error("#############处理异常",e); } } }