yo
This commit is contained in:
@@ -296,7 +296,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// <param name="dtoDatas"></param>
|
||||
/// <param name="isTransaction"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Result> GenerateTakeBox(List<TakeStock> dtoDatas, bool isTransaction)
|
||||
public async Task<Result> GenerateTakeBox(List<TakeStock> dtoDatas, List<SerialNumbersBoxInventoryDto> serNubBoxDto, bool isTransaction)
|
||||
{
|
||||
//1.判断来源数据是否存在
|
||||
if (dtoDatas == null || dtoDatas.Count == 0)
|
||||
@@ -369,7 +369,7 @@ namespace WMS.Web.Domain.Services
|
||||
generateDtoList.AddRange(generateDtoList_in);
|
||||
generateDtoList.AddRange(generateDtoList_out);
|
||||
//提交处理
|
||||
var result = await this.ExeTakeBox(generateDtoList, isTransaction);
|
||||
var result = await this.ExeTakeBox(generateDtoList, serNubBoxDto, isTransaction);
|
||||
if (!result.IsSuccess)
|
||||
return result;
|
||||
|
||||
@@ -1146,7 +1146,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// <param name="dtoDatas"></param>
|
||||
/// <param name="isTransaction"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<Result> ExeTakeBox(List<BoxInventoryTakeGenerateDto> dtoDatas, bool isTransaction)
|
||||
private async Task<Result> ExeTakeBox(List<BoxInventoryTakeGenerateDto> dtoDatas, List<SerialNumbersBoxInventoryDto> serNubBoxDto, bool isTransaction)
|
||||
{
|
||||
//1.判断来源数据是否存在
|
||||
if (dtoDatas == null || dtoDatas.Count == 0)
|
||||
@@ -1191,19 +1191,19 @@ namespace WMS.Web.Domain.Services
|
||||
}
|
||||
});
|
||||
|
||||
//找到:序列号不属于当前箱;找到后对应的箱子进行箱库存变更序列号
|
||||
foreach (var item in dto.Details)
|
||||
{
|
||||
foreach (var itemSerNmb in item.SerialNumbers)
|
||||
{
|
||||
var current_item_SerNb = serialNumbers.Where(x => x.SerialNumber == itemSerNmb).FirstOrDefault();
|
||||
if (current_item_SerNb != null && current_item_SerNb.BoxId != dto.BoxId)
|
||||
{
|
||||
out_serNubs.Add(current_item_SerNb);
|
||||
}
|
||||
}
|
||||
////找到:序列号不属于当前箱;找到后对应的箱子进行箱库存变更序列号
|
||||
//foreach (var item in dto.Details)
|
||||
//{
|
||||
// foreach (var itemSerNmb in item.SerialNumbers)
|
||||
// {
|
||||
// var current_item_SerNb = serialNumbers.Where(x => x.SerialNumber == itemSerNmb).FirstOrDefault();
|
||||
// if (current_item_SerNb != null && current_item_SerNb.BoxId != dto.BoxId)
|
||||
// {
|
||||
// out_serNubs.Add(current_item_SerNb);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
//3.4明细添加新的物料
|
||||
@@ -1254,18 +1254,18 @@ namespace WMS.Web.Domain.Services
|
||||
}
|
||||
}
|
||||
});
|
||||
//找到:序列号不属于当前箱;找到后对应的箱子进行箱库存变更序列号
|
||||
foreach (var item in dto.Details)
|
||||
{
|
||||
foreach (var itemSerNmb in item.SerialNumbers)
|
||||
{
|
||||
var current_item_SerNb = serialNumbers.Where(x => x.SerialNumber == itemSerNmb).FirstOrDefault();
|
||||
if (current_item_SerNb != null && current_item_SerNb.BoxId != dto.BoxId)
|
||||
{
|
||||
out_serNubs.Add(current_item_SerNb);
|
||||
}
|
||||
}
|
||||
}
|
||||
////找到:序列号不属于当前箱;找到后对应的箱子进行箱库存变更序列号
|
||||
//foreach (var item in dto.Details)
|
||||
//{
|
||||
// foreach (var itemSerNmb in item.SerialNumbers)
|
||||
// {
|
||||
// var current_item_SerNb = serialNumbers.Where(x => x.SerialNumber == itemSerNmb).FirstOrDefault();
|
||||
// if (current_item_SerNb != null && current_item_SerNb.BoxId != dto.BoxId)
|
||||
// {
|
||||
// out_serNubs.Add(current_item_SerNb);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//3.4明细添加新的物料
|
||||
foreach (var detItem in dto.Details)
|
||||
@@ -1306,7 +1306,7 @@ namespace WMS.Web.Domain.Services
|
||||
}
|
||||
|
||||
//盘点单-箱库存的变更:第二步骤,为了不是当前扫的所在箱里的序列号;如果是其它箱需要减箱库存
|
||||
var result = await this.ExeTaskBox(out_serNubs, isTransaction);
|
||||
var result = await this.ExeTaskBox(serNubBoxDto, isTransaction);
|
||||
if (!result.IsSuccess)
|
||||
return result;
|
||||
|
||||
@@ -1349,7 +1349,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// <param name="out_SerialNumbers"></param>
|
||||
/// <param name="isTransaction"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<Result> ExeTaskBox(List<SerialNumbers> out_SerialNumbers, bool isTransaction)
|
||||
private async Task<Result> ExeTaskBox(List<SerialNumbersBoxInventoryDto> out_SerialNumbers, bool isTransaction)
|
||||
{
|
||||
var boxIds = out_SerialNumbers.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
||||
var boxInventorys = await _boxInventoryRepositories.GetList(boxIds);
|
||||
|
||||
Reference in New Issue
Block a user