From 6fe713d22b9d0c6eb92b06e1f40a976cb572e2dc Mon Sep 17 00:00:00 2001 From: GiteaAdmin Date: Tue, 25 Apr 2023 22:22:20 +0800 Subject: [PATCH] =?UTF-8?q?frontAPI=20=E6=8F=90=E4=BE=9B=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=20device=5Fnode=20=E7=8B=80=E6=85=8B=E9=A1=8F=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/NiagaraDataSynchronizeController.cs | 2 +- FrontendWebApi/ApiControllers/DeviceManageController.cs | 6 +++--- FrontendWebApi/Models/Device.cs | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Backend/Controllers/NiagaraDataSynchronizeController.cs b/Backend/Controllers/NiagaraDataSynchronizeController.cs index 5efc306..c1c1e3f 100644 --- a/Backend/Controllers/NiagaraDataSynchronizeController.cs +++ b/Backend/Controllers/NiagaraDataSynchronizeController.cs @@ -102,7 +102,7 @@ namespace Backend.Controllers } string LightSwitchLevel = await niagaraDataSynchronizeRepository.getLightSwitchLevel(); //獲取照明開關 是否在 device or device_node - await niagaraDataSynchronizeRepository.InsertNiagaraTagList(newDs, building, tag_quantity); // 匯入 MySQL table: import_niagara_tag + await niagaraDataSynchronizeRepository.InsertNiagaraTagList(ds, building, tag_quantity); // 匯入 MySQL table: import_niagara_tag await niagaraDataSynchronizeRepository.DeviceComparison(LightSwitchLevel); await niagaraDataSynchronizeRepository.CheckDiffFullNameAndCover(); await niagaraDataSynchronizeRepository.CheckFullNameEmptyReplaceByDeviceName(); diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs index 60ee4c7..d84690f 100644 --- a/FrontendWebApi/ApiControllers/DeviceManageController.cs +++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs @@ -291,9 +291,9 @@ namespace FrontendWebApi.ApiControllers { List dl = new List(); sqlString = $@"select d.device_guid, d.full_name, d.device_coordinate, d.priority, dk.device_image, d.device_number, CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,d.status, - dk.device_normal_point_id, dk.device_normal_point_guid, dk.device_normal_point_col, dk.device_normal_point_value, dk.device_normal_flashing, dk.device_normal_point_name, - dk.device_close_point_id, dk.device_close_point_guid, dk.device_close_point_col, dk.device_close_point_value, dk.device_close_flashing, dk.device_close_point_name, - dk.device_error_point_id, dk.device_error_point_guid, dk.device_error_point_col, dk.device_error_point_value, dk.device_error_flashing, dk.device_error_point_name, + dk.device_normal_point_id, dk.device_normal_point_guid, dk.device_normal_point_col, dk.device_normal_point_value, dk.device_normal_flashing, dk.device_normal_point_name, dk.device_normal_color, + dk.device_close_point_id, dk.device_close_point_guid, dk.device_close_point_col, dk.device_close_point_value, dk.device_close_flashing, dk.device_close_point_name, dk.device_close_color, + dk.device_error_point_id, dk.device_error_point_guid, dk.device_error_point_col, dk.device_error_point_value, dk.device_error_flashing, dk.device_error_point_name, dk.device_error_color, d.room_dbid, d.device_coordinate_3d, d.forge_dbid from device d left join device_kind dk on d.device_building_tag = dk.device_building_tag and d.device_system_tag = dk.device_system_tag diff --git a/FrontendWebApi/Models/Device.cs b/FrontendWebApi/Models/Device.cs index 88e0b3c..d17498a 100644 --- a/FrontendWebApi/Models/Device.cs +++ b/FrontendWebApi/Models/Device.cs @@ -66,18 +66,21 @@ namespace FrontendWebApi.Models public string device_normal_point_name { get; set; } public string device_normal_point_value { get; set; } public string device_normal_flashing { get; set; } + public string device_normal_color { get; set; } public string device_close_point_id { get; set; } public string device_close_point_guid { get; set; } public string device_close_point_col { get; set; } public string device_close_point_name { get; set; } public string device_close_point_value { get; set; } public string device_close_flashing { get; set; } + public string device_close_color { get; set; } public string device_error_point_id { get; set; } public string device_error_point_guid { get; set; } public string device_error_point_col { get; set; } public string device_error_point_name { get; set; } public string device_error_point_value { get; set; } public string device_error_flashing { get; set; } + public string device_error_color { get; set; } public string room_dbid { get; set; } public string forge_dbid { get; set; } public List Device_nodes { get; set; }