优化
This commit is contained in:
@@ -304,6 +304,8 @@ namespace WMS.Web.Repositories
|
|||||||
var query = _context.InStockTotalDetails
|
var query = _context.InStockTotalDetails
|
||||||
.GroupJoin(_context.Instock, detail => detail.InStockId, order => order.Id, (detail, orders) => new { detail, orders })
|
.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 })
|
.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);
|
.Where(adv => 1 == 1);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
||||||
@@ -373,7 +375,7 @@ namespace WMS.Web.Repositories
|
|||||||
Qty = s.detail.Qty,
|
Qty = s.detail.Qty,
|
||||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId),
|
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId),
|
||||||
CreateTime = s.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
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
|
Remark = s.order.Remark
|
||||||
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user