This commit is contained in:
tongfei
2024-03-14 10:23:18 +08:00
parent 4b0b298264
commit 4ba861f56f

View File

@@ -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();