排除掉不为空的device_type

This commit is contained in:
yanghongwei 2025-04-23 11:18:53 +08:00
parent 2a4fc03bf6
commit f72fae2154
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,8 @@ namespace LY.App.Service
var entity = input.data.Adapt<List<Alarm>>();
if (entity.Any())
{
var O4entity = entity.Where(s => s.device_type == "O4" || s.serial_number == "O4"||s.device_type== "UAV");
// 排除掉不这几个类型的设备
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())
{