From 495c7b02937e77eabdc9e87d400e9d3f84282d0d Mon Sep 17 00:00:00 2001 From: keke Date: Mon, 28 Aug 2023 11:15:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[BE]=20=E8=B3=87=E6=96=99=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=A2=9D=E4=BB=B6=E8=AE=8A=E6=88=90?= =?UTF-8?q?=E7=AF=A9=E9=81=B8=20EL=20ES?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implement/NiagaraDataSynchronizeRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs index f135096..ef63654 100644 --- a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs +++ b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs @@ -143,12 +143,12 @@ namespace Repository.BackendRepository.Implement { sb.Append($@" -- tag 第二碼為小類(除了安全系統之外) update import_niagara_tag set device_name_tag = device_system_tag - where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and device_system_tag <> 'B'); + where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and (device_name_tag <> 'EL' or device_name_tag <> 'ES')); update import_niagara_tag a join dic_system b on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code set device_system_tag = b.s1_code -- tag 第二碼為小類(除了安全系統之外) - where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and device_system_tag <> 'B'); -- 安全系統 第二段大類 第四段小類"); + where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and (device_name_tag <> 'EL' or device_name_tag <> 'ES')); -- 安全系統 第二段大類 第四段小類"); await conn.ExecuteAsync(sb.ToString()); } } From b93423d7148adccddc7db75c004b99c4c405cfc5 Mon Sep 17 00:00:00 2001 From: keke Date: Tue, 29 Aug 2023 16:27:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[BE]=20=E6=9B=B4=E6=96=B0=E8=B3=87=E6=96=99?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=20=E5=B7=A8=E8=9B=8B=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E8=99=95=E7=90=86=20SQL=20=E8=AA=9E=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implement/NiagaraDataSynchronizeRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs index ef63654..24942c8 100644 --- a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs +++ b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs @@ -143,12 +143,12 @@ namespace Repository.BackendRepository.Implement { sb.Append($@" -- tag 第二碼為小類(除了安全系統之外) update import_niagara_tag set device_name_tag = device_system_tag - where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and (device_name_tag <> 'EL' or device_name_tag <> 'ES')); + where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and device_system_tag <> 'B' and (device_name_tag <> 'EL' or device_name_tag <> 'ES')); update import_niagara_tag a join dic_system b on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code set device_system_tag = b.s1_code -- tag 第二碼為小類(除了安全系統之外) - where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and (device_name_tag <> 'EL' or device_name_tag <> 'ES')); -- 安全系統 第二段大類 第四段小類"); + where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and device_system_tag <> 'B' and (device_name_tag <> 'EL' or device_name_tag <> 'ES')); -- 安全系統 第二段大類 第四段小類"); await conn.ExecuteAsync(sb.ToString()); } }