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/DevLithiumInfSocket.java |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/whyc/webSocket/DevInfSocket.java b/src/main/java/com/whyc/webSocket/DevLithiumInfSocket.java
similarity index 85%
rename from src/main/java/com/whyc/webSocket/DevInfSocket.java
rename to src/main/java/com/whyc/webSocket/DevLithiumInfSocket.java
index 0b37f68..0e22d2f 100644
--- a/src/main/java/com/whyc/webSocket/DevInfSocket.java
+++ b/src/main/java/com/whyc/webSocket/DevLithiumInfSocket.java
@@ -4,7 +4,7 @@
 import com.whyc.dto.DevInfDto;
 import com.whyc.dto.Response;
 import com.whyc.pojo.db_user.UserInf;
-import com.whyc.service.DevInfService;
+import com.whyc.service.DevLithiumInfService;
 import com.whyc.util.ActionUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -17,16 +17,16 @@
 
 
 /**
- * 璁惧瀹炴椂杩炴帴淇℃伅
+ * 閿傜數璁惧瀹炴椂杩炴帴淇℃伅
  */
 @Component
-@ServerEndpoint(value = "/dinfSocket",encoders = WebSocketEncoder.class,configurator = WebSocketConfig.class)
-public class DevInfSocket {
+@ServerEndpoint(value = "/devLithiumInf",encoders = WebSocketEncoder.class,configurator = WebSocketConfig.class)
+public class DevLithiumInfSocket {
     private Session session;
 
     private Thread thread;
 
-    private static DevInfService dinfService;
+    private static DevLithiumInfService service;
 
     private HttpSession httpSession;
 
@@ -37,8 +37,8 @@
     private volatile Map<Long,Boolean> threadFlagMap = new HashMap<>();
 
     @Autowired
-    public void setDevInfService(DevInfService dinfService) {
-        DevInfSocket.dinfService = dinfService;
+    public void setService(DevLithiumInfService service) {
+        DevLithiumInfSocket.service = service;
     }
 
     @OnOpen
@@ -52,14 +52,14 @@
         UserInf user = (UserInf) this.httpSession.getAttribute("user");
         final int userId = user.getUid();
         //final int userId = 101;
-        thread = new Thread("Thread_DinfSocket") {
+        thread = new Thread("Thread_DevLithiumInfSocket") {
             @Override
             public void run() {
                 while (runFlag && !isInterrupted()) {
                     Thread thread = currentThread();
                     threadFlagMap.put(thread.getId(), true);
                     try {
-                        Response res=dinfService.getAllInf(userId, devInfDto);
+                        Response res=service.getAllInf(userId, devInfDto);
                         if (session.isOpen()) {
                             //鎺ㄩ�佷俊鎭�
                             synchronized (session) {

--
Gitblit v1.9.1