接口优化

This commit is contained in:
tongfei
2023-11-21 16:20:35 +08:00
parent 1d2cba49d2
commit 60348a09ea
3 changed files with 14 additions and 3 deletions

View File

@@ -815,7 +815,7 @@
物料Id
</summary>
</member>
<member name="P:WMS.Web.Core.Dto.Erp.OutStock.ErpDeliveryNoticeOutStockResultDto.StockId">
<member name="P:WMS.Web.Core.Dto.Erp.OutStock.ErpDeliveryNoticeOutStockResultDto.StockCode">
<summary>
仓库ID
</summary>
@@ -1325,6 +1325,11 @@
收货数量
</summary>
</member>
<member name="P:WMS.Web.Core.Dto.InStockTask.InStockTaskDetailsInfoDto.BoxMaterialQty">
<summary>
箱对应物料的数量
</summary>
</member>
<member name="T:WMS.Web.Core.Dto.InStockTask.InStockTaskInfoDto">
<summary>
入库任务单-详情信息

View File

@@ -50,5 +50,10 @@ namespace WMS.Web.Core.Dto.InStockTask
/// 收货数量
/// </summary>
public decimal ReceiveQty { get; set; }
/// <summary>
/// 箱对应物料的数量
/// </summary>
public decimal BoxMaterialQty { get; set; }
}
}

View File

@@ -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<InStockTaskDetailsInfoDto>(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);