箱库存查询-带物料
This commit is contained in:
@@ -122,7 +122,11 @@ namespace WMS.Web.Repositories
|
||||
/// <returns></returns>
|
||||
public async Task<BoxInventoryResponse> GetInfoBy(string boxBillNo)
|
||||
{
|
||||
|
||||
//1.获取物料集合和组织集合
|
||||
var materials_result = await _erpService.BillQueryForMaterial();
|
||||
if (!materials_result.IsSuccess)
|
||||
return null;
|
||||
var materials = materials_result.Data.ToList();
|
||||
|
||||
var entity=await _context.BoxInventory.Include(x=>x.Details)
|
||||
.GroupJoin(_context.Box, t => t.BoxId, box => box.Id, (boxinvent, ts) => new { boxinvent, ts })
|
||||
@@ -137,7 +141,12 @@ namespace WMS.Web.Repositories
|
||||
response.Details = _mapper.Map<List<BoxInventoryDetailsResponse>>(entity.Details);
|
||||
response.TotalQty = response.Details.Sum(x=>x.Qty);
|
||||
}
|
||||
|
||||
response.Details.ForEach(x =>
|
||||
{
|
||||
x.MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, x.MaterialId);
|
||||
x.MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, x.MaterialId);
|
||||
x.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, x.MaterialId);
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user