From e717ef6274b3c620a90f788ea26e11f523ebbe00 Mon Sep 17 00:00:00 2001 From: iioter <535915157@qq.com> Date: Sat, 1 Jun 2024 08:58:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E3=80=81=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0"=E8=A7=A6=E5=8F=91"=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IoTGateway.ViewModel/BasicData/ExportDevicesSetting.cs | 8 +++++--- IoTGateway.ViewModel/BasicData/ImportExcelVM.cs | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/IoTGateway.ViewModel/BasicData/ExportDevicesSetting.cs b/IoTGateway.ViewModel/BasicData/ExportDevicesSetting.cs index 5c5499b..20ab804 100644 --- a/IoTGateway.ViewModel/BasicData/ExportDevicesSetting.cs +++ b/IoTGateway.ViewModel/BasicData/ExportDevicesSetting.cs @@ -175,7 +175,7 @@ namespace IoTGateway.ViewModel.BasicData #region 生成表头 - string[] colName = { "设备名", "变量名", "方法", "地址", "类型", "大小端", "表达式", "别名","上传", "排序" }; + string[] colName = { "设备名", "变量名", "方法", "地址", "类型", "大小端", "表达式", "别名","上传", "排序", "触发" }; IRow row = sheet.CreateRow(currentRow); row.HeightInPoints = 20; @@ -211,6 +211,8 @@ namespace IoTGateway.ViewModel.BasicData rowData.CreateCell(currentCol).SetCellValue(deviceVariable.IsUpload); currentCol++; rowData.CreateCell(currentCol).SetCellValue(deviceVariable.Index); + currentCol++; + rowData.CreateCell(currentCol).SetCellValue(deviceVariable.IsTrigger); currentRow++; } @@ -282,11 +284,11 @@ namespace IoTGateway.ViewModel.BasicData var allDevices = GetAllDevices(); book = GenerateDevicesSheet(book, allDevices); - //Sheet2-通讯设置 + //Sheet2-变量配置 var allDeviceVariables = GetAllDeviceVariables(); book = GenerateDeviceVariablesSheet(book, allDeviceVariables); - //Sheet3-变量配置 + //Sheet3-通讯设置 var allDeviceConfigs = GetAllDeviceConfigs(); book = GenerateDeviceConfigsSheet(book, allDeviceConfigs); diff --git a/IoTGateway.ViewModel/BasicData/ImportExcelVM.cs b/IoTGateway.ViewModel/BasicData/ImportExcelVM.cs index 6b1c24c..e61a872 100644 --- a/IoTGateway.ViewModel/BasicData/ImportExcelVM.cs +++ b/IoTGateway.ViewModel/BasicData/ImportExcelVM.cs @@ -178,6 +178,7 @@ namespace IoTGateway.ViewModel.BasicData variable.Index = string.IsNullOrWhiteSpace(row.GetCell(9)?.ToString()) ? 999 : uint.Parse(row.GetCell(9).ToString()); + variable.IsTrigger = row.GetCell(10)?.ToString().ToLower() == "false" ? false : true; deviceVariables.Add(variable); }