From e50d8c30b43dd30daa77da27101ce21d8ef2fcef Mon Sep 17 00:00:00 2001
From: whycxzp <glperry@163.com>
Date: 星期一, 17 三月 2025 17:20:10 +0800
Subject: [PATCH] 锂电设备相关代码更新

---
 src/main/java/com/whyc/webSocket/DevLithiumAlmPopupSocket.java |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/whyc/webSocket/DevLineSocket.java b/src/main/java/com/whyc/webSocket/DevLithiumAlmPopupSocket.java
similarity index 72%
copy from src/main/java/com/whyc/webSocket/DevLineSocket.java
copy to src/main/java/com/whyc/webSocket/DevLithiumAlmPopupSocket.java
index 446ae87..5e6414d 100644
--- a/src/main/java/com/whyc/webSocket/DevLineSocket.java
+++ b/src/main/java/com/whyc/webSocket/DevLithiumAlmPopupSocket.java
@@ -3,7 +3,7 @@
 import com.whyc.config.WebSocketConfig;
 import com.whyc.dto.Response;
 import com.whyc.pojo.db_user.UserInf;
-import com.whyc.service.DevInfService;
+import com.whyc.service.DevLithiumAlarmDataService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -13,22 +13,22 @@
 import java.io.IOException;
 
 /**
- * 宸︿晶鍒楄〃
+ * 閿傜數璁惧鍛婅寮圭獥
  */
 @Component
-@ServerEndpoint(value = "/lineSocket",encoders = WebSocketEncoder.class,configurator = WebSocketConfig.class)
-public class DevLineSocket{
+@ServerEndpoint(value = "/devLithiumAlmPopup",encoders = WebSocketEncoder.class,configurator = WebSocketConfig.class)
+public class DevLithiumAlmPopupSocket {
 
     private Session session;
 
     private Thread thread;
-    private static DevInfService dinfService;
+    private static DevLithiumAlarmDataService devLithiumAlarmDataService;
 
     private HttpSession httpSession;
 
     @Autowired
-    public void setDevInfService(DevInfService dinfService) {
-        DevLineSocket.dinfService = dinfService;
+    public void setDevLithiumAlarmDataService(DevLithiumAlarmDataService devLithiumAlarmDataService) {
+        DevLithiumAlmPopupSocket.devLithiumAlarmDataService = devLithiumAlarmDataService;
     }
 
     @OnOpen
@@ -37,12 +37,12 @@
         UserInf user = (UserInf) this.httpSession.getAttribute("user");
         final int userId = user.getUid();
         //final int userId = 101;
-        Thread thread = new Thread() {
+        Thread thread = new Thread("Thread_DevLithiumAlmPopupSocket") {
             @Override
             public void run() {
                 try {
                     while (!currentThread().isInterrupted()) {
-                        Response res = dinfService.getDevType(userId);
+                        Response res = devLithiumAlarmDataService.getPopup(userId);
                         session.getBasicRemote().sendObject(res);
                         sleep(4000);
                     }

--
Gitblit v1.9.1