From 720e0926fa1c94b952c26e111206c5d6e1ed5ba2 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期二, 21 四月 2026 15:59:49 +0800
Subject: [PATCH] Merge branch 'master' of http://47.97.1.152:5880/r/zy-wcs-master

---
 src/main/java/com/zy/core/thread/impl/ZyRgvThread.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java b/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
index 2a24566..76ce1d5 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
@@ -25,7 +25,7 @@
 import com.zy.core.network.ZyRgvConnectDriver;
 import com.zy.core.network.entity.ZyRgvStatusEntity;
 import com.zy.core.thread.RgvThread;
-import com.zy.core.utils.DeviceLogRedisKeyBuilder;
+import com.zy.core.task.DeviceAsyncLogPublisher;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 
@@ -43,10 +43,12 @@
     private ZyRgvConnectDriver zyRgvConnectDriver;
     private RgvProtocol rgvProtocol;
     private int deviceLogCollectTime = 200;
+    private final DeviceAsyncLogPublisher deviceAsyncLogPublisher;
 
     public ZyRgvThread(DeviceConfig deviceConfig, RedisUtil redisUtil) {
         this.deviceConfig = deviceConfig;
         this.redisUtil = redisUtil;
+        this.deviceAsyncLogPublisher = SpringUtils.getBean(DeviceAsyncLogPublisher.class);
     }
 
     @Override
@@ -140,7 +142,7 @@
             deviceDataLog.setType(String.valueOf(SlaveType.Rgv));
             deviceDataLog.setDeviceNo(rgvProtocol.getRgvNo());
             deviceDataLog.setCreateTime(new Date());
-            redisUtil.set(DeviceLogRedisKeyBuilder.build(deviceDataLog), deviceDataLog, 60 * 60 * 24);
+            deviceAsyncLogPublisher.publishLatest(deviceDataLog);
             rgvProtocol.setDeviceDataLog(System.currentTimeMillis());
         }
 

--
Gitblit v1.9.1