细节调整

This commit is contained in:
yanghongwei 2025-09-20 17:17:51 +08:00
parent 21a381cb9e
commit ad16758252
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,7 @@ namespace LY.App.Service
{
// 排除掉不在范围内的报警信息
var O4entity = entity.Where(s => s.device_type == "O4" || s.serial_number == "O4" || s.device_type == "UAV" || !string.IsNullOrEmpty(s.device_type));
entity = entity.Where(s => checkDistance(s.drone_lat, s.drone_lon, deviceinfo.Lat, deviceinfo.Lon) == true).ToList();
if (O4entity.Any())
{
foreach (var item in O4entity)
@ -62,6 +63,7 @@ namespace LY.App.Service
}
}
}
entity = entity.Distinct().ToList();
if (entity.Any())
{
foreach (var item in entity)