箱库存-

This commit is contained in:
tongfei
2023-11-27 10:35:48 +08:00
parent d178c0a184
commit 6b64af76f2
3 changed files with 19 additions and 59 deletions

View File

@@ -1246,6 +1246,21 @@ namespace WMS.Web.Domain.Services
var addEntity = _mapper.Map<BoxInventory>(dto);
addEntity.Details = _mapper.Map<List<BoxInventoryDetails>>(dto.Details);
add_entitys.Add(addEntity);
//3.3.遍历dto明细组装即时库存数据
foreach (var dtoItem in dto.Details)
{
//4.1组装即时库存dto
var inventoryDet = new InventoryDetailsGenerateDto();
inventoryDet.MaterialId = dtoItem.MaterialId;
inventoryDet.OrgCode = dto.OrgCode;
inventoryDet.StockCode = dto.StockCode;
inventoryDet.SubStockId = dto.SubStockId ?? 0;
inventoryDet.Qty = dtoItem.Qty;
inventoryDet.InventoryInOutType = (int)InventoryInOutType.In;
//4.2即时库存:修改箱库存的集合
InventoryDetailsGenerateDto.Add(inventoryDet);
}
}
else
{