改了为0
This commit is contained in:
@@ -405,18 +405,21 @@ namespace WMS.Web.Repositories
|
|||||||
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||||
.GroupJoin(_context.Box, p => p.order.BoxId, t => t.Id, (p, ts) => new { p.detail, p.order, ts })
|
.GroupJoin(_context.Box, p => p.order.BoxId, t => t.Id, (p, ts) => new { p.detail, p.order, ts })
|
||||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
||||||
.Where(adv => 1 == 1 && adv.box.BoxBillNo.Equals(dto.BoxBillNo));
|
.Where(adv => 1 == 1 && adv.detail.Qty>0 && adv.box.BoxBillNo.Equals(dto.BoxBillNo));
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(dto.StockCode))
|
if (!string.IsNullOrEmpty(dto.StockCode))
|
||||||
{
|
{
|
||||||
var splitStrs = dto.StockCode.Split("_$");
|
var splitStrs = dto.StockCode.Split("_$");
|
||||||
query = query.Where(w => w.order.StockCode == splitStrs[0] && w.order.OrgCode == splitStrs[1]);
|
query = query.Where(w => w.order.StockCode == splitStrs[0] && w.order.OrgCode == splitStrs[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetPagedListBoxByBoxResponse response = new GetPagedListBoxByBoxResponse();
|
GetPagedListBoxByBoxResponse response = new GetPagedListBoxByBoxResponse();
|
||||||
response.BoxBillNo = dto.BoxBillNo;
|
response.BoxBillNo = dto.BoxBillNo;
|
||||||
|
|
||||||
response.TotalCount = await query.CountAsync();
|
response.TotalCount = await query.CountAsync();
|
||||||
response.TotalQty = await query.SumAsync(s => s.detail.Qty);
|
response.TotalQty = await query.SumAsync(s => s.detail.Qty);
|
||||||
|
|
||||||
|
|
||||||
response.Details = await query.Select(s => new GetPagedListBoxByBoxDetailsResponse()
|
response.Details = await query.Select(s => new GetPagedListBoxByBoxDetailsResponse()
|
||||||
{
|
{
|
||||||
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialNumber),
|
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialNumber),
|
||||||
|
|||||||
Reference in New Issue
Block a user