修复bug
This commit is contained in:
@@ -8,7 +8,8 @@ namespace WMS.Web.Core.Dto.OutStock
|
||||
/// <summary>
|
||||
/// 出库单保存
|
||||
/// </summary>
|
||||
public class SaveOutStockRequest
|
||||
[Serializable]
|
||||
public class SaveOutStockRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 出库任务单Id
|
||||
@@ -23,6 +24,7 @@ namespace WMS.Web.Core.Dto.OutStock
|
||||
public List<SaveOutStockDetailsRequest> Details { get; set; } = new List<SaveOutStockDetailsRequest>();
|
||||
|
||||
}
|
||||
[Serializable]
|
||||
public class SaveOutStockDetailsRequest
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -125,7 +125,9 @@ namespace WMS.Web.Domain.Services
|
||||
//如果是按箱出库从库存拿取数据
|
||||
if (dto.Method == 1)
|
||||
{
|
||||
var oldDetails = dto.Details.Clone();
|
||||
dto.Details.Clear();
|
||||
|
||||
//获取箱子对应的所有库存
|
||||
//过滤掉不同仓库和不同组织的
|
||||
boxInventoryList = boxInventoryList.Where(w => w.StockCode == outStockTask.StockCode && w.OrgCode == outStockTask.OrgCode).ToList();
|
||||
@@ -146,6 +148,13 @@ namespace WMS.Web.Domain.Services
|
||||
var dtod = _mapper.Map<SaveOutStockDetailsRequest>(b);
|
||||
dtod.BoxId = box.BoxId;
|
||||
dtod.SubStockCode = box.SubStockCode;
|
||||
var oldd = oldDetails.FirstOrDefault(f=>f.BoxId==box.BoxId&&f.MaterialNumber.Equals(dtod.MaterialNumber));
|
||||
if(oldd==null)
|
||||
return Result.ReFailure(ResultCodes.BoxMateriaNoData);
|
||||
dtod.BoxLength = oldd.BoxLength;
|
||||
dtod.BoxWide = oldd.BoxWide;
|
||||
dtod.BoxHigh = oldd.BoxHigh;
|
||||
dtod.BoxWeight = oldd.BoxWeight;
|
||||
dto.Details.Add(dtod);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user