From d0506a93f2043d06623c0a86786c9da5b1108374 Mon Sep 17 00:00:00 2001 From: tongfei <244188119@qq.com> Date: Wed, 6 Dec 2023 14:05:30 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Repositories/InStockTaskRepositories.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WMS.Web.Repositories/InStockTaskRepositories.cs b/src/WMS.Web.Repositories/InStockTaskRepositories.cs index 95d00ced..bd6ab039 100644 --- a/src/WMS.Web.Repositories/InStockTaskRepositories.cs +++ b/src/WMS.Web.Repositories/InStockTaskRepositories.cs @@ -253,7 +253,7 @@ namespace WMS.Web.Repositories var query = _context.InStockTaskDetails .GroupJoin(_context.InStockTask, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders }) .SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order }) - .Where(w => EF.Functions.Like(w.order.SourceBillNo, "%" + dto.SourceBillNo + "%") && (w.order.Status == InstockStatus.Part || w.order.Status == InstockStatus.Wait || w.order.Status== InstockStatus.WaitInStock)); + .Where(w => EF.Functions.Like(w.order.SourceBillNo, "%" + dto.SourceBillNo + "%") && w.order.Type == InstockType.Purchase && (w.order.Status == InstockStatus.Part || w.order.Status == InstockStatus.Wait || w.order.Status== InstockStatus.WaitInStock)); //仓库 if (!string.IsNullOrEmpty(dto.StockCode)) @@ -319,7 +319,7 @@ namespace WMS.Web.Repositories //这里只查状态为:部分入库和等待收货 var task_query = _context.InStockTask - .Where(w => EF.Functions.Like(w.SourceBillNo, "%" + dto.SourceBillNo + "%") && (w.Status == InstockStatus.Part || w.Status == InstockStatus.Wait || w.Status==InstockStatus.WaitInStock)); + .Where(w => EF.Functions.Like(w.SourceBillNo, "%" + dto.SourceBillNo + "%") && w.Type!= InstockType.Purchase && (w.Status == InstockStatus.Part || w.Status == InstockStatus.Wait || w.Status==InstockStatus.WaitInStock)); //找到头列表 var taskList = await task_query