From cf230004501396be7950884fa6464f0fe1584486 Mon Sep 17 00:00:00 2001 From: keke Date: Wed, 9 Aug 2023 17:13:03 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E5=8F=B0]=20Niagara=20=E8=B3=87?= =?UTF-8?q?=E6=96=99=E5=90=8C=E6=AD=A5=E5=8A=9F=E8=83=BD=E6=88=90=E5=8A=9F?= =?UTF-8?q?=20=E6=8A=8A=E8=B3=87=E6=96=99=E8=A1=A8=E7=9A=84=E7=B7=A8?= =?UTF-8?q?=E7=A2=BC=E5=85=A8=E9=83=A8=E6=94=B9=E6=88=90=20utf8mb4=5Funico?= =?UTF-8?q?de=5Fci=20=E5=B0=87=20ibms=5Fdome=5Fdome.import=5Fniagara=5Ftag?= =?UTF-8?q?.niagara=5Ftags=20=E8=B7=9F=20ibms=5Fdome=5Fdome.device.device?= =?UTF-8?q?=5Fnumber=20=E6=94=B9=E6=88=90=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/NiagaraDataSynchronizeController.cs | 2 +- Backend/Views/NiagaraDataSynchronize/Index.cshtml | 5 ++++- .../Implement/NiagaraDataSynchronizeRepository.cs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) 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());