增加统计值

This commit is contained in:
18942506660
2024-07-27 11:08:13 +08:00
parent 16d067fa94
commit 010e6d8c05
8 changed files with 91 additions and 3 deletions

View File

@@ -401,6 +401,8 @@ namespace WMS.Web.Repositories
DeliveredQty = s.DeliveredQty,
//非采购:可入库数量=应入库数量-收货数量;
AvailableQty = s.AccruedQty - s.ReceiveQty,
//v1.0.7 待上架数量显示来源单的应入库数量-实入库数量的值
WaitShelfQty = s.AccruedQty-s.RealityQty,
Remark = s.Remark,
ErpDetailId = s.ErpDetailId
}).Where(x => x.AvailableQty > 0).ToListAsync();

View File

@@ -105,7 +105,7 @@ namespace WMS.Web.Repositories
query = query.Where(w => w.Qty == dto.Qty);
int total = await query.CountAsync();
decimal totalQty = await query.SumAsync(s => s.Qty);
var list = await query.Select(s => new InventoryDetailsQueryResponse()
{
Id = s.Id,
@@ -115,6 +115,7 @@ namespace WMS.Web.Repositories
Org = _erpBasicDataExtendService.GetOrgName(orgs, s.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.StockCode + s.OrgCode),
Qty = s.Qty,
TotalQty= totalQty,
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocksJoinOrgCode, companyId, s.SubStockCode + s.StockCode + s.OrgCode),
Unit = _erpBasicDataExtendService.GetMaterialUnitName(materials, s.MaterialNumber),
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();