From c96f1848479950b068c20f84dec0658ccb7b21aa Mon Sep 17 00:00:00 2001 From: "mjmUser\\mjmTech" Date: Thu, 9 Feb 2023 14:57:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=A0=B9=E6=93=9Aniagara=E6=9B=B4=E6=96=B0?= =?UTF-8?q?device=5Fitem=20is=5Fshow=5Fhistory=20SQL=20statment=20?= =?UTF-8?q?=E8=A3=9C=E9=81=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implement/NiagaraDataSynchronizeRepository.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs index b1c5a91..77a3afd 100644 --- a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs +++ b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs @@ -655,8 +655,9 @@ namespace Repository.BackendRepository.Implement StringBuilder sb = new StringBuilder(); //先全部關閉 sb.Append("update device_item set is_show_history=0;"); - sb.Append("update device_item set is_show_history= 1" + - "(select distinct device_system_tag, device_name_tag, device_point_name From import_niagara_item);"); + sb.Append("update device_item set is_show_history = 1 " + + "WHERE(device_system_tag, device_name_tag, points) IN " + + "(select distinct device_system_tag, device_name_tag, device_point_name From import_niagara_item);"); await conn.ExecuteAsync(sb.ToString()); } catch (Exception exception)