From 4ba861f56f89fa03cfd6c027ca9415589fc97dc4 Mon Sep 17 00:00:00 2001 From: tongfei <244188119@qq.com> Date: Thu, 14 Mar 2024 10:23:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Repositories/InStockRepositories.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WMS.Web.Repositories/InStockRepositories.cs b/src/WMS.Web.Repositories/InStockRepositories.cs index 4f156306..378f6369 100644 --- a/src/WMS.Web.Repositories/InStockRepositories.cs +++ b/src/WMS.Web.Repositories/InStockRepositories.cs @@ -304,6 +304,8 @@ namespace WMS.Web.Repositories var query = _context.InStockTotalDetails .GroupJoin(_context.Instock, detail => detail.InStockId, order => order.Id, (detail, orders) => new { detail, orders }) .SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order }) + .GroupJoin(_context.InStockTaskDetails, t =>t.detail.TaskId, ts => ts.Fid, (p, ts) => new { p.detail,p.order, ts }) + .SelectMany(x => x.ts.DefaultIfEmpty(), (p, instockDet) => new { p.detail, p.order, instockDet }) .Where(adv => 1 == 1); if (!string.IsNullOrEmpty(dto.SourceBillNo)) @@ -373,7 +375,7 @@ namespace WMS.Web.Repositories Qty = s.detail.Qty, Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId), CreateTime = s.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), - SuccessSync = s.order.Type != InstockType.Purchase ? "--" : (s.order.SuccessSync == SyncStatus.Success ? "成功" : (s.order.SuccessSync == SyncStatus.SyncIng ? "同步中" : "失败")), + SuccessSync = s.instockDet.AccruedQty==0?"--":(s.order.Type != InstockType.Purchase ? "--" : (s.order.SuccessSync == SyncStatus.Success ? "成功" : (s.order.SuccessSync == SyncStatus.SyncIng ? "同步中" : "失败"))), Remark = s.order.Remark }).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();