优化接口

This commit is contained in:
tongfei
2023-11-22 09:57:00 +08:00
parent b1c557c876
commit 935963aa18
8 changed files with 60 additions and 5 deletions

View File

@@ -95,10 +95,15 @@ namespace WMS.Web.Domain.Services
var tagBox = targetBoxInventorys.Where(x => x.BoxId == dto.TargetBoxId).FirstOrDefault();
if (tagBox == null)
{
var newTagBox = new BoxInventory();
newTagBox.BoxId = dto.TargetBoxId;
newTagBox.Details =_mapper.Map<List<BoxInventoryDetails>>(dto.Details);
add_entitys.Add(newTagBox);
if (!string.IsNullOrEmpty(dto.StockCode) && dto.SubStockId.HasValue)
{
var newTagBox = new BoxInventory();
newTagBox.StockCode = dto.StockCode;
newTagBox.SubStockId = dto.SubStockId.Value;
newTagBox.BoxId = dto.TargetBoxId;
newTagBox.Details = _mapper.Map<List<BoxInventoryDetails>>(dto.Details);
add_entitys.Add(newTagBox);
}
}
else
{