diff --git a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml index a09bb72c..5f4fc192 100644 --- a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml +++ b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml @@ -815,7 +815,7 @@ 物料Id - + 仓库ID @@ -1325,6 +1325,11 @@ 收货数量 + + + 箱对应物料的数量 + + 入库任务单-详情信息 diff --git a/src/WMS.Web.Core/Dto/InStockTask/InStockTaskDetailsInfoDto.cs b/src/WMS.Web.Core/Dto/InStockTask/InStockTaskDetailsInfoDto.cs index a73ffe66..c5ecccd4 100644 --- a/src/WMS.Web.Core/Dto/InStockTask/InStockTaskDetailsInfoDto.cs +++ b/src/WMS.Web.Core/Dto/InStockTask/InStockTaskDetailsInfoDto.cs @@ -50,5 +50,10 @@ namespace WMS.Web.Core.Dto.InStockTask /// 收货数量 /// public decimal ReceiveQty { get; set; } + + /// + /// 箱对应物料的数量 + /// + public decimal BoxMaterialQty { get; set; } } } diff --git a/src/WMS.Web.Domain/Services/InStockService.cs b/src/WMS.Web.Domain/Services/InStockService.cs index af3796fb..8b7991ce 100644 --- a/src/WMS.Web.Domain/Services/InStockService.cs +++ b/src/WMS.Web.Domain/Services/InStockService.cs @@ -166,11 +166,12 @@ namespace WMS.Web.Domain.Services foreach (var item in tast.Details) { //3.1判断当前物料是否相同 - var isHave = box.Details.Where(x => x.MaterialId == item.MaterialId).Any(); - if (!isHave) + var current_box_det = box.Details.Where(x => x.MaterialId == item.MaterialId).FirstOrDefault(); + if (current_box_det==null) continue; //3.2映射返回明细对象 var task_detail = _mapper.Map(item); + task_detail.BoxMaterialQty = current_box_det.Qty; task_detail.MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, task_detail.MaterialId); task_detail.MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, task_detail.MaterialId); task_detail.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, task_detail.MaterialId);