任务单来源单调整为明细
This commit is contained in:
@@ -263,7 +263,7 @@ namespace WMS.Web.Repositories
|
||||
if (dto.Ids.Count() > 0)
|
||||
query = query.Where(w => dto.Ids.Contains(w.detail.Id));
|
||||
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
||||
query = query.Where(w => EF.Functions.Like(w.order.SourceBillNo, "%" + dto.SourceBillNo + "%"));
|
||||
query = query.Where(w => w.detail.SourceBillNos.Where(sw => EF.Functions.Like(sw, "%" + dto.SourceBillNo + "%")).Contains(w.order.BillNo));
|
||||
if (dto.Type != null)
|
||||
query = query.Where(w => w.order.Type == (OutStockType)dto.Type);
|
||||
if (dto.Status != null)
|
||||
@@ -290,7 +290,7 @@ namespace WMS.Web.Repositories
|
||||
OutStockBeginTime = s.detail.OutStockBeginTime.DateToStringSeconds(),
|
||||
OutStockEndTime = s.detail.OutStockEndTime.DateToStringSeconds(),
|
||||
Stock = _singleDataService.GetSingleData(SingleAction.Stocks, _loginRepositories.CompanyId, s.detail.StockCode),
|
||||
SourceBillNo = s.order.SourceBillNo,
|
||||
SourceBillNo = string.Join(",", s.detail.SourceBillNos.Select(x => x)),
|
||||
SaleBillNo = s.detail.SaleBillNo,
|
||||
DeliveryOrg = _erpBasicDataExtendService.GetOrgName(orgs, s.order.DeliveryOrgId),
|
||||
ReceiptCustomer = s.order.Type == OutStockType.Sal
|
||||
@@ -319,7 +319,7 @@ namespace WMS.Web.Repositories
|
||||
|
||||
var list = await _context.OutStockTask.Include(x => x.Details)
|
||||
.Where(f => (EF.Functions.Like(f.BillNo, "%" + billNo + "%") ||
|
||||
EF.Functions.Like(f.SourceBillNo, "%" + billNo + "%")) &&
|
||||
f.Details.SelectMany(s=>s.SourceBillNos).Where(sw => EF.Functions.Like(sw, "%" + billNo + "%")).Contains(f.BillNo)) &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.ToListAsync();
|
||||
@@ -419,7 +419,7 @@ namespace WMS.Web.Repositories
|
||||
{
|
||||
return await _context.OutStockTask.Include(x => x.Details)
|
||||
.Where(f => (EF.Functions.Like(f.BillNo, "%" + billNo + "%") ||
|
||||
EF.Functions.Like(f.SourceBillNo, "%" + billNo + "%")) &&
|
||||
f.Details.SelectMany(s => s.SourceBillNos).Where(sw => EF.Functions.Like(sw, "%" + billNo + "%")).Contains(f.BillNo)) &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.Select(s => s.BillNo)
|
||||
|
||||
Reference in New Issue
Block a user