From 3e8a1fef4c0dfea22950bd6f815f10077c66445d Mon Sep 17 00:00:00 2001 From: dev02 Date: Thu, 10 Aug 2023 10:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=96=8B=E5=9B=9E=E5=90=8C=E6=AD=A5=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NiagaraDataSynchronizeController.cs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Backend/Controllers/NiagaraDataSynchronizeController.cs b/Backend/Controllers/NiagaraDataSynchronizeController.cs index 1966ed4..42c316b 100644 --- a/Backend/Controllers/NiagaraDataSynchronizeController.cs +++ b/Backend/Controllers/NiagaraDataSynchronizeController.cs @@ -113,15 +113,15 @@ namespace Backend.Controllers building = data.GroupBy(x => x.tag_name.Split("_")[1]).Select(x => x.Key).ToList(); } - //string LightSwitchLevel = await niagaraDataSynchronizeRepository.getLightSwitchLevel(); //獲取照明開關 是否在 device or device_node - //await niagaraDataSynchronizeRepository.InsertNiagaraTagList(ds, building, tag_quantity); // 匯入 MySQL table: import_niagara_tag - //await niagaraDataSynchronizeRepository.DeviceComparison(LightSwitchLevel); - //await niagaraDataSynchronizeRepository.CheckDiffFullNameAndCover(); - //await niagaraDataSynchronizeRepository.CheckFullNameEmptyReplaceByDeviceName(); - //await niagaraDataSynchronizeRepository.InsertBuildingMenu(); - //await niagaraDataSynchronizeRepository.InsertSubSystemFloor(); - //await niagaraDataSynchronizeRepository.InsertFloor(); - //await this.DeviceDisasterAsync(); + string LightSwitchLevel = await niagaraDataSynchronizeRepository.getLightSwitchLevel(); //獲取照明開關 是否在 device or device_node + await niagaraDataSynchronizeRepository.InsertNiagaraTagList(ds, building, tag_quantity); // 匯入 MySQL table: import_niagara_tag + await niagaraDataSynchronizeRepository.DeviceComparison(LightSwitchLevel); + await niagaraDataSynchronizeRepository.CheckDiffFullNameAndCover(); + await niagaraDataSynchronizeRepository.CheckFullNameEmptyReplaceByDeviceName(); + await niagaraDataSynchronizeRepository.InsertBuildingMenu(); + await niagaraDataSynchronizeRepository.InsertSubSystemFloor(); + await niagaraDataSynchronizeRepository.InsertFloor(); + await this.DeviceDisasterAsync(); result = true; apiResult.Code = "0000"; @@ -201,11 +201,11 @@ namespace Backend.Controllers //var building = ss.Split("_")[0]; var building = ds.GroupBy(x => x.device_building_tag).Select(x => x.Key).ToList(); - //await niagaraDataSynchronizeRepository.InsertItemFromNiagara(ds, building); // insert 暫存table import_niagara_item - //await niagaraDataSynchronizeRepository.DeviceItemComparison(); //insert device_item - //await niagaraDataSynchronizeRepository.CheckItemDiffFullNameAndCover(); // update device_item.fullname - //await niagaraDataSynchronizeRepository.ItemCheckFullNameEmptyReplaceByDeviceName(); // 檢查device_item內FullName為空的值,以points取代 - //await niagaraDataSynchronizeRepository.CheckItemIsShowHistory(); + await niagaraDataSynchronizeRepository.InsertItemFromNiagara(ds, building); // insert 暫存table import_niagara_item + await niagaraDataSynchronizeRepository.DeviceItemComparison(); //insert device_item + await niagaraDataSynchronizeRepository.CheckItemDiffFullNameAndCover(); // update device_item.fullname + await niagaraDataSynchronizeRepository.ItemCheckFullNameEmptyReplaceByDeviceName(); // 檢查device_item內FullName為空的值,以points取代 + await niagaraDataSynchronizeRepository.CheckItemIsShowHistory(); #region 歷史資料處理 ds.Clear();