From d5f506ef2f7a9e8feb73e62f57086b5458ffbcbd Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期三, 18 九月 2024 13:26:31 +0800
Subject: [PATCH] 自刷新功能
---
Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs b/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs
index fdff08a..7a2c8ff 100644
--- a/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs
+++ b/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs
@@ -16,7 +16,6 @@
[MapHub("/hubs/PlcDevice")]
public class PlcDeviceHub : Hub<IPlcDeviceHub>
{
- private static readonly IHubContext<PlcDeviceHub, IPlcDeviceHub> _plcDeviceHubContext = App.GetService<IHubContext<PlcDeviceHub, IPlcDeviceHub>>();
private static readonly SysCacheService _sysCacheService = App.GetRequiredService<SysCacheService>();
private static bool boRunningState = false;
private static CancellationTokenSource cts;//鍙栨秷绾跨▼鏍囪瘑
@@ -219,7 +218,7 @@
modDevice.PickStorey != initialState.PickStorey)))
{
// 閫氱煡鐢ㄦ埛鍙樻洿
- _plcDeviceHubContext.Clients.All.PublicPlcDevice(modDevice);
+ HubUtil.PublicPlcDevice(modDevice);
}
}
initialStates[modDevice.Id] = modDevice.Adapt<WcsDeviceOutput>();
--
Gitblit v1.8.0