箱库存获取-修复
This commit is contained in:
@@ -1276,10 +1276,45 @@ namespace WMS.Web.Domain.Services
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
|
||||
//private async Task<Result> ExeTaskBox(List<string> serNubs,bool isTransaction)
|
||||
//{
|
||||
|
||||
//}
|
||||
private async Task<Result> ExeTaskBox(List<BoxTaskGenerateDto> sourceBox,List<string> serNubs, bool isTransaction)
|
||||
{
|
||||
//1.先通过序列号找到-序列号信息集合
|
||||
var serialNumbers = await _serialNumbersRepositories.GetEntityList(serNubs);
|
||||
//2.找到序列号对应的boxId
|
||||
var destBoxIds = serialNumbers.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
||||
//3.找到box对应的箱库存
|
||||
var boxInventorys = await _boxInventoryRepositories.GetList(destBoxIds);
|
||||
|
||||
var delete_ids = new List<int>();
|
||||
var update_entitys = new List<BoxInventory>();
|
||||
|
||||
////遍历
|
||||
//foreach (var destBoxId in destBoxIds)
|
||||
//{
|
||||
// var sourBox= sourceBox.Where(x => x.BoxId == destBoxId).FirstOrDefault();
|
||||
// var destBoxInvent= boxInventorys.Where(x => x.BoxId == destBoxId).FirstOrDefault();
|
||||
// if (sourBox==null && destBoxInvent!=null)
|
||||
// {
|
||||
// if(destBoxInvent)
|
||||
// var updateEntity = boxInvent;
|
||||
// updateEntity.Details = boxInvent.Details;
|
||||
// //3.3序列号重新给值:已有的物料
|
||||
// updateEntity.Details.ForEach(x =>
|
||||
// {
|
||||
// foreach (var detItem in dto.Details)
|
||||
// {
|
||||
// if (x.MaterialId == detItem.MaterialId)
|
||||
// {
|
||||
// x.Qty = x.Qty + detItem.Qty;
|
||||
// x.SerialNumbers = detItem.SerialNumbers;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 入库单-箱库存变更
|
||||
|
||||
Reference in New Issue
Block a user