[後端] 修改device_disaster流程

This commit is contained in:
dev02 2023-12-22 09:45:15 +08:00
parent 881366d53f
commit bdf9579503

View File

@ -1461,11 +1461,13 @@ namespace Repository.BackendRepository.Implement
var check = (await conn.QueryAsync<string>($"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();
}
}