[後端] 修改device_disaster流程
This commit is contained in:
parent
881366d53f
commit
bdf9579503
@ -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();
|
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))
|
if (string.IsNullOrEmpty(check))
|
||||||
{
|
{
|
||||||
sb.Append($@"
|
sb.Append($@"insert into device_disaster
|
||||||
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)
|
(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]}',
|
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}'); ");
|
'{device_number.Split('_')[4]}', '{device_number}'); ");
|
||||||
|
|
||||||
|
await conn.ExecuteAsync(sb.ToString());
|
||||||
|
sb.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user