fix 支持供应商搜索
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user