diff --git a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs index 23d36b6..0c2f2c8 100644 --- a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs +++ b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs @@ -1461,11 +1461,13 @@ namespace Repository.BackendRepository.Implement var check = (await conn.QueryAsync($"select device_guid from device_disaster where device_guid = '{device_guid}' and device_system_value = '{d.disasterValue}'")).FirstOrDefault(); if (string.IsNullOrEmpty(check)) { - sb.Append($@" - insert into device_disaster + sb.Append($@"insert into device_disaster (device_guid, device_system_value, device_building_tag, device_system_tag, device_name_tag, device_floor_tag, device_serial_tag, device_number) values ('{device_guid}', '{d.disasterValue}', '{device_number.Split('_')[0]}', '{device_system_tag}', '{device_name_tag}', '{device_number.Split('_')[2]}', '{device_number.Split('_')[4]}', '{device_number}'); "); + + await conn.ExecuteAsync(sb.ToString()); + sb.Clear(); } }