開回同步其他功能

This commit is contained in:
dev02 2023-08-10 10:32:53 +08:00
parent c63558de71
commit 3e8a1fef4c

View File

@ -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();