调整物料和仓位编码

This commit is contained in:
18942506660
2024-03-18 09:34:40 +08:00
parent c0520b5cd3
commit 92d19e6a21
14 changed files with 90 additions and 39 deletions

View File

@@ -134,7 +134,7 @@ namespace WMS.Web.Domain.Services
foreach (var b in boxInventoryDetails)
{
var num = boxInventoryDetails.Where(w => w.MaterialId == b.MaterialId).Sum(s => s.Qty);
var taskDetail = outStockTask.Details.FirstOrDefault(f => f.MaterialNumber == b.MaterialId);
var taskDetail = outStockTask.Details.FirstOrDefault(f => f.MaterialNumber == b.MaterialNumber);
if (taskDetail == null) return Result.ReFailure(ResultCodes.BoxOutStockTaskMaterialError);
//箱子里该物料的总数量大于出库单(应出库数量-已出库数量) 不能出库
if (num > (taskDetail.AccruedQty - taskDetail.RealityQty))
@@ -144,7 +144,7 @@ namespace WMS.Web.Domain.Services
if (box == null) return Result.ReFailure(ResultCodes.BoxNoData);
var dtod = _mapper.Map<SaveOutStockDetailsRequest>(b);
dtod.BoxId = box.BoxId;
dtod.SubStockId = box.SubStockId;
dtod.SubStockCode = box.SubStockCode;
dto.Details.Add(dtod);
}
}