From e49cd511af91bb7d75e0765756a95e726565be72 Mon Sep 17 00:00:00 2001 From: Kimdiego2098 <2248356998@qq.com> Date: Wed, 22 Nov 2023 16:09:41 +0800 Subject: [PATCH] =?UTF-8?q?excel=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E8=A1=A8=E6=97=B6=EF=BC=8C=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Device/DeviceService.cs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/framework/gateway/ThingsGateway.Gateway.Application/Services/Device/DeviceService.cs b/framework/gateway/ThingsGateway.Gateway.Application/Services/Device/DeviceService.cs index 24a4c66b0..c8a5b2c5c 100644 --- a/framework/gateway/ThingsGateway.Gateway.Application/Services/Device/DeviceService.cs +++ b/framework/gateway/ThingsGateway.Gateway.Application/Services/Device/DeviceService.cs @@ -235,8 +235,8 @@ public abstract class DeviceService : DbRepository where T : Device, new() } deviceDicts.TryGetValue(devData.RedundantDeviceId, out var redundantDevice); - //设备实体没有包含插件名称,手动插入 - devExport.Add(ExportHelpers.PluginName, devData.PluginName); + ////设备实体没有包含插件名称,手动插入 + //devExport.Add(ExportHelpers.PluginName, devData.PluginName); //设备实体没有包含冗余设备名称,手动插入 devExport.Add(ExportHelpers.RedundantDeviceName, redundantDevice?.Name); @@ -376,18 +376,18 @@ public abstract class DeviceService : DbRepository where T : Device, new() { var device = ((ExpandoObject)item).ConvertToEntity(true); #region 特殊转化名称 - //转化插件名称 - var hasPlugin = item.TryGetValue(ExportHelpers.PluginName, out var pluginObj); + ////转化插件名称 + //var hasPlugin = item.TryGetValue(ExportHelpers.PluginName, out var pluginObj); - if (pluginObj == null || !driverPluginFullNameDict.TryGetValue(pluginObj.ToString(), out var plugin)) - { - //找不到对应的插件 - importPreviewOutput.HasError = true; - importPreviewOutput.Results.Add((row++, false, $"{ExportHelpers.PluginName}不存在")); - return; - } + //if (pluginObj == null || !driverPluginFullNameDict.TryGetValue(pluginObj.ToString(), out var plugin)) + //{ + // //找不到对应的插件 + // importPreviewOutput.HasError = true; + // importPreviewOutput.Results.Add((row++, false, $"{ExportHelpers.PluginName}不存在")); + // return; + //} //转化冗余设备名称 - var hasRedundant = item.TryGetValue(ExportHelpers.PluginName, out var redundantObj); + var hasRedundant = item.TryGetValue(ExportHelpers.RedundantDeviceName, out var redundantObj); #endregion //设备ID、冗余设备ID都需要手动补录