From 5bd56f3ebf96aa9a71e4a452cd2402df59d17384 Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期四, 04 九月 2025 09:28:27 +0800
Subject: [PATCH] 1.全部页面增加线下数据查询 2.增加一键删除线下玻璃按钮
---
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/mechanicalMonitor/controller/MechanicalMonitorController.java | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/mechanicalMonitor/controller/MechanicalMonitorController.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/mechanicalMonitor/controller/MechanicalMonitorController.java
index eab9b9e..c3198e8 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/mechanicalMonitor/controller/MechanicalMonitorController.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/mechanicalMonitor/controller/MechanicalMonitorController.java
@@ -1,22 +1,22 @@
package com.mes.mechanicalMonitor.controller;
+import cn.hutool.json.JSONObject;
import com.mes.mechanicalMonitor.entity.MechanicalMonitor;
import com.mes.mechanicalMonitor.service.MechanicalMonitorService;
-import com.mes.tools.WebSocketServer;
import com.mes.utils.Result;
+import com.mes.websocket.WebSocketServer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-import cn.hutool.json.JSONObject;
-import java.util.ArrayList;
-import java.util.List;
+
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
@Api(tags = "璁惧鐘舵�佺洃鎺�")
@RestController
-@RequestMapping("/deviceInteraction/mechanicalMonitor")
+@RequestMapping("/mechanicalMonitor")
public class MechanicalMonitorController {
@Autowired
@@ -42,10 +42,10 @@
@ResponseBody
public Result updateMechanicalStatus(@RequestBody JSONObject status) {
try {
- ArrayList<WebSocketServer> servers = WebSocketServer.sessionMap.get("mechanicalMonitor");
+ List<WebSocketServer> servers = WebSocketServer.SESSIONMAP.get("mechanicalMonitor");
if (servers != null) {
for (WebSocketServer server : servers) {
- server.sendMessage(status.toString());
+ server.sendToWeb("",status.toString());
}
}
return Result.build(200, "鐘舵�佹洿鏂版垚鍔�", null);
--
Gitblit v1.8.0