diff --git a/Backend/Controllers/NiagaraDataSynchronizeController.cs b/Backend/Controllers/NiagaraDataSynchronizeController.cs index 4153bc4..ed2451c 100644 --- a/Backend/Controllers/NiagaraDataSynchronizeController.cs +++ b/Backend/Controllers/NiagaraDataSynchronizeController.cs @@ -164,7 +164,7 @@ namespace Backend.Controllers var urlSlots = backendRepository.GetAllAsync("select obixSlot from building where deleted = 0").Result; //foreach(var us in urlSlots) //{ - var data = svc.obixHisQuery(obixApiConfig.ApiBase + "obix/config/Program/ObixQuery/query/", obixApiConfig.ApiBase + "obix/histories", "", + var data = svc.obixHisQuery_v2(obixApiConfig.ApiBase + "obix/config/Program/ObixQuery/query/", obixApiConfig.ApiBase + "obix/histories", "", obixApiConfig.UserName, obixApiConfig.Password); ds.AddRange(data); // } diff --git a/Backend/Views/NiagaraDataSynchronize/Index.cshtml b/Backend/Views/NiagaraDataSynchronize/Index.cshtml index 70fa8d6..48f6bdc 100644 --- a/Backend/Views/NiagaraDataSynchronize/Index.cshtml +++ b/Backend/Views/NiagaraDataSynchronize/Index.cshtml @@ -130,7 +130,10 @@ { v.value = v.value.replace("$3", ""); v.tag_name = v.tag_name.replace("$3", ""); - v.point_name = v.point_name.replace("$3", ""); + if (v.point_name != null) + { + v.point_name = v.point_name.replace("$3", ""); + } } }) //console.log(ds) diff --git a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs index 18cdf7b..4ee1e47 100644 --- a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs +++ b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs @@ -132,7 +132,7 @@ namespace Repository.BackendRepository.Implement where (device_system_tag <> 'S' and device_system_tag <> 'CWB'); update import_niagara_tag a join dic_system b - on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code + on a.device_name_tag COLLATE utf8mb4_unicode_ci = b.s2_code COLLATE utf8mb4_unicode_ci set device_system_tag = b.s1_code -- tag 第二碼為小類(除了安全系統之外) where (device_system_tag <> 'S' and device_system_tag <> 'CWB'); -- 安全系統 第二段大類 第四段小類"); await conn.ExecuteAsync(sb.ToString());