出库增加箱对应的仓位

This commit is contained in:
18942506660
2023-11-22 11:50:39 +08:00
parent 61da0c1c82
commit c919b1a94b
2 changed files with 6 additions and 1 deletions

View File

@@ -41,6 +41,11 @@ namespace WMS.Web.Core.Dto.OutStock
[Required(ErrorMessage = "箱不能为空")]
public int BoxId { get; set; }
/// <summary>
/// 仓位不能为空
/// </summary>
[Required(ErrorMessage = "箱不能为空")]
public int SubStockId { get; set; }
/// <summary>
/// 序列号集
/// </summary>
public List<string> SerialNumbers { get; set; } = new List<string>();

View File

@@ -115,7 +115,7 @@ namespace WMS.Web.Domain.Services
BoxId = boxId,
InventoryInOutMethod = dto.Method,
StockCode = outStockTask.StockCode,
SubStockId = 0,// outStockTask.Details.First().SubStockId,
SubStockId = dto.Details.FirstOrDefault(f => f.BoxId == boxId)?.SubStockId ?? 0,// outStockTask.Details.First().SubStockId,
Details = inventoryDetail
};
inventoryList.Add(inventory);