From fb75abea35c0dbdf0f58ce94f8295d1ee83789c2 Mon Sep 17 00:00:00 2001 From: fyf Date: Sat, 28 May 2022 09:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=8A=E4=B8=8B=E7=BA=BF?= =?UTF-8?q?=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataVAPI/UpAndDown/ProcessServer.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DataVAPI/UpAndDown/ProcessServer.cs b/DataVAPI/UpAndDown/ProcessServer.cs index e875d94..885769b 100644 --- a/DataVAPI/UpAndDown/ProcessServer.cs +++ b/DataVAPI/UpAndDown/ProcessServer.cs @@ -205,10 +205,11 @@ namespace DataVAPI.UpAndDown deviceId = par.DeviceId }; ConsoleHelper.WriteSuccessLine($"加载设备.{par.devtype} {par.remark}"); - devModel.operatingDeviceStatus.data.Insert(0, devStatus); + DevStatus dev= devStatuses?.Find(k => k.deviceName == par.devicename); - + if (dev != null && dev.DeviceZT == "在线") { devStatus.SetStatus(dev.DeviceZT); } + devModel.operatingDeviceStatus.data.Insert(0, devStatus); if (dev != null && dev.DeviceZT == "在线") { OnOrOffline(dev.DeviceZT, devModel.operatingDeviceStatus.data, devStatus);