优化条件
This commit is contained in:
@@ -87,16 +87,21 @@ namespace WMS.Web.Repositories
|
||||
var endNo = Convert.ToInt32(dto.EndBillNo.Substring(8));
|
||||
query = query.Where(w => w.FirstBillNo >= begYMD && w.FirstBillNo <= endYMD && w.LastBillNo >= begNo && w.LastBillNo <= endNo);
|
||||
}
|
||||
else
|
||||
query = query.Where(w => w.BillNo == dto.BeginBillNo || w.BillNo == dto.EndBillNo);
|
||||
}
|
||||
else
|
||||
query = query.Where(w => w.BillNo == dto.BeginBillNo || w.BillNo == dto.EndBillNo);
|
||||
else if (!string.IsNullOrEmpty(dto.BeginBillNo))
|
||||
query = query.Where(w => w.BillNo == dto.BeginBillNo);
|
||||
else if (!string.IsNullOrEmpty(dto.EndBillNo))
|
||||
query = query.Where(w => w.BillNo == dto.EndBillNo);
|
||||
|
||||
|
||||
//订单号查询
|
||||
if (!string.IsNullOrEmpty(dto.OrderBillNos))
|
||||
if (!string.IsNullOrEmpty(dto.OrderBillNos))
|
||||
{
|
||||
var orderBNS = dto.OrderBillNos.Replace(",", ",");
|
||||
var orderBillNoList= orderBNS.Split(",").Where(x => !string.IsNullOrEmpty(x)).ToList();
|
||||
if (orderBillNoList != null && orderBillNoList.Count != 0)
|
||||
var orderBillNoList = orderBNS.Split(",").Where(x => !string.IsNullOrEmpty(x)).ToList();
|
||||
if (orderBillNoList != null && orderBillNoList.Count != 0)
|
||||
{
|
||||
query = query.Where(w => orderBillNoList.Contains(w.OrderBillNo));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user