From cb2306e8e0abf46afeb009d3070b4e1df5862a2d Mon Sep 17 00:00:00 2001 From: fyf Date: Thu, 19 May 2022 10:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataVAPI/UpAndDown/ProcessServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DataVAPI/UpAndDown/ProcessServer.cs b/DataVAPI/UpAndDown/ProcessServer.cs index ae25a0c..f622797 100644 --- a/DataVAPI/UpAndDown/ProcessServer.cs +++ b/DataVAPI/UpAndDown/ProcessServer.cs @@ -179,7 +179,7 @@ namespace DataVAPI.UpAndDown JsonMsg> jsonMsg = deviceController.Query("", "", DateTime.MinValue, DateTime.MinValue); if (jsonMsg?.obj?.data.Count > 0) { - if (devStatuses.Count != devModel.operatingDeviceStatus.data.Count) + //if ((devStatuses.Count != devModel.operatingDeviceStatus.data.Count) || devStatuses.Count<=0) { devModel.operatingDeviceStatus.data.Clear(); jsonMsg?.obj?.data?.ForEach(par => @@ -267,7 +267,7 @@ namespace DataVAPI.UpAndDown //devModel?.infoMessage?.data?.Add(new DeviceBase { DeviceMC = receiveModel.deviceContext.deviceName, DeviceMS = $"设备{receiveModel.status.value}了!", DeviceSJ = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") }); DevStatus dev = devModel?.operatingDeviceStatus.data?.Find(par => par.deviceName == receiveModel.deviceContext.deviceName); - if (dev != null) { LoadingShopInformation(); } + if (dev == null) { LoadingShopInformation(); } dev = devModel?.operatingDeviceStatus.data?.Find(par => par.deviceName == receiveModel.deviceContext.deviceName); if (dev != null) {