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);