改了为0

This commit is contained in:
2025-07-18 10:47:46 +08:00
parent 2c7dbd8a0e
commit eef9fc6b9d
2 changed files with 5 additions and 2 deletions

View File

@@ -405,18 +405,21 @@ namespace WMS.Web.Repositories
.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 })
.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))
{
var splitStrs = dto.StockCode.Split("_$");
query = query.Where(w => w.order.StockCode == splitStrs[0] && w.order.OrgCode == splitStrs[1]);
}
GetPagedListBoxByBoxResponse response = new GetPagedListBoxByBoxResponse();
response.BoxBillNo = dto.BoxBillNo;
response.TotalCount = await query.CountAsync();
response.TotalQty = await query.SumAsync(s => s.detail.Qty);
response.Details = await query.Select(s => new GetPagedListBoxByBoxDetailsResponse()
{
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialNumber),