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)