fix 支持供应商搜索

This commit is contained in:
2025-06-09 10:13:03 +08:00
parent bf64366089
commit e69dca6180
2 changed files with 3 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ public class DevicePageRequest : PageDto
[EnumDataType(typeof(DeviceTypeEnumType))] [EnumDataType(typeof(DeviceTypeEnumType))]
public DeviceTypeEnumType Type { get; set; } public DeviceTypeEnumType Type { get; set; }
public string Supplier { get; set; }
/// <summary> /// <summary>
/// 启用状态 /// 启用状态
/// </summary> /// </summary>

View File

@@ -41,6 +41,7 @@ public class DeviceService : IDeviceService
.Where((d, dt) => d.Type == request.Type) .Where((d, dt) => d.Type == request.Type)
.WhereIF(request.Enable.HasValue, (d, dt) => d.Enable == request.Enable) .WhereIF(request.Enable.HasValue, (d, dt) => d.Enable == request.Enable)
.WhereIF(request.Search.IsPresent(), d => d.UniqueNo == request.Search || d.DeployPlace.Contains(request.Search)) .WhereIF(request.Search.IsPresent(), d => d.UniqueNo == request.Search || d.DeployPlace.Contains(request.Search))
.WhereIF(request.Supplier.IsPresent(), d => d.Supplier.Contains(request.Search))
.Select((d, dt, dr, bp) => new DevicePageResponse .Select((d, dt, dr, bp) => new DevicePageResponse
{ {
FuncsStr = d.Funcs.ToString(), FuncsStr = d.Funcs.ToString(),