优化
This commit is contained in:
@@ -104,5 +104,26 @@ namespace WMS.Web.Domain.Services
|
||||
}
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取即时库存明细汇总
|
||||
/// </summary>
|
||||
/// <param name="mids"></param>
|
||||
/// <param name="stockCodes"></param>
|
||||
/// <param name="orgCodes"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<InventoryDetailsSummaryResponse>> GetInventoryDetailsSummary(List<int> mids, List<string> stockCodes, List<string> orgCodes)
|
||||
{
|
||||
var inventoryDetails = await _inventoryDetailsRepositories.GetListBy(mids, stockCodes, orgCodes);
|
||||
var resultList = inventoryDetails.GroupBy(x => new { MaterialId = x.MaterialId, StockCode = x.StockCode, OrgCode = x.OrgCode })
|
||||
.Select(x => new InventoryDetailsSummaryResponse()
|
||||
{
|
||||
MaterialId=x.Key.MaterialId,
|
||||
StockCode=x.Key.StockCode,
|
||||
OrgCode=x.Key.OrgCode,
|
||||
Qty=x.Sum(t=>t.Qty)
|
||||
}).ToList();
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user