1
This commit is contained in:
parent
73ea4cff4b
commit
fc23379f6c
@ -7,6 +7,12 @@ namespace MDM.Model.Plant.Dto
|
||||
/// </summary>
|
||||
public class PlantFactorySiteQueryDto : PagerInfo
|
||||
{
|
||||
public string SiteCode { get; set; }
|
||||
|
||||
public string SiteName { get; set; }
|
||||
|
||||
public string SiteType { get; set; }
|
||||
public int? Status { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -25,7 +25,12 @@ namespace MDM.Services.Plant
|
||||
/// <returns></returns>
|
||||
public PagedInfo<PlantFactorySiteDto> GetList(PlantFactorySiteQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<PlantFactorySite>();
|
||||
var predicate = Expressionable.Create<PlantFactorySite>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.SiteCode), it => it.SiteCode.Contains(parm.SiteCode))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.SiteName), it => it.SiteCode.Contains(parm.SiteName))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.SiteType), it => it.SiteType == parm.SiteType)
|
||||
.AndIF(parm.Status != null, it => it.Status == parm.Status)
|
||||
;
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user