阵地筛选

This commit is contained in:
yanghongwei 2025-06-14 17:36:57 +08:00
parent 629075f38b
commit b21479beed
2 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@
/// 每页条数
/// </summary>
public int pageSize { get; set; } = 10;
public long? positionId { get; set; }
}
}

View File

@ -368,6 +368,7 @@ namespace LY.App.Service
{
RefAsync<int> total = 0;
var items = await _db.Queryable<Alarm>().SplitTable()
.WhereIF(input.positionId.HasValue, st => st.positionId == input.positionId.Value)
.WhereIF(input.Frequency.HasValue, st => st.freq == input.Frequency.Value)
.WhereIF(!string.IsNullOrEmpty(input.sn), s => s.serial_number.Contains(input.sn))
.WhereIF(!string.IsNullOrEmpty(input.model), st => st.device_type == input.model)