优化
This commit is contained in:
@@ -88,7 +88,7 @@ namespace WMS.Web.Domain.Services
|
||||
entity.Method = (InventoryInOutMethod)dto.Method;
|
||||
entity.OrgCode = dto.OrgCode;
|
||||
entity.StockCode = dto.StockCode;
|
||||
entity.SubStockId = dto.SubStockId;
|
||||
entity.SubStockCode = dto.SubStockCode;
|
||||
entity.Type = type;
|
||||
entity.Details = _mapper.Map<List<BackRecordDetails>>(dto.Details);
|
||||
entity.Create(loginInfo.UserInfo.StaffId);
|
||||
@@ -102,57 +102,6 @@ namespace WMS.Web.Domain.Services
|
||||
if (!serialNumber_result.IsSuccess)
|
||||
return serialNumber_result;
|
||||
|
||||
//#region 需要改箱操作
|
||||
////获取目标箱和原箱信息
|
||||
//var current_box_about = dto.Details.GroupBy(x => new { x.BoxId }).Select(x => new { x.Key.BoxId }).ToList();
|
||||
//var current_sernub_box = dto.Details.GroupBy(x => x.SerialNumberBoxId).Select(x => x.Key).ToList();
|
||||
|
||||
////要改箱的数据集合
|
||||
//var ganenrateChangeBoxs = new List<SaveChangeBoxRecordRequest>();
|
||||
|
||||
////遍历组装:改箱dto的头部集合
|
||||
//foreach (var boxAbout in current_box_about)
|
||||
//{
|
||||
// foreach (var serBoxId in current_sernub_box)
|
||||
// {
|
||||
// if (boxAbout.BoxId != serBoxId)
|
||||
// {
|
||||
// var changeBox = new SaveChangeBoxRecordRequest();
|
||||
// changeBox.SrcBoxId = serBoxId;
|
||||
// changeBox.DestBoxId = boxAbout.BoxId;
|
||||
// changeBox.SubStockId = entity.SubStockId;
|
||||
// ganenrateChangeBoxs.Add(changeBox);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
////遍历组装明细:改箱dto的明细集合
|
||||
//foreach (var detItem in dto.Details)
|
||||
//{
|
||||
// ganenrateChangeBoxs.ForEach(x =>
|
||||
// {
|
||||
// if (x.SrcBoxId == detItem.SerialNumberBoxId && x.DestBoxId == detItem.BoxId)
|
||||
// {
|
||||
// var changeBoxRD = new SaveChangeBoxRecordDetailsRequest();
|
||||
// changeBoxRD.MaterialId = detItem.MaterialId;
|
||||
// changeBoxRD.Qty = detItem.Qty;
|
||||
// changeBoxRD.SerialNumbers = detItem.SerialNumbers;
|
||||
// x.Details.Add(changeBoxRD);
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
|
||||
////改箱保存操作:这里不需要在改箱的操作-进行库存的变更(因为会有问题),下面会去更新库存的
|
||||
//var changeBoxSave_Result = await _changeMoveBoxService.ChangeBoxSave(ganenrateChangeBoxs, loginInfo, isTransaction,false);
|
||||
//if (!changeBoxSave_Result.IsSuccess)
|
||||
// return changeBoxSave_Result;
|
||||
//#endregion
|
||||
|
||||
////改箱保存操作--弃用
|
||||
//var changeBoxSave_Result = await _changeMoveBoxService.ChangeBox_BackRecord(entity, loginInfo, isTransaction);
|
||||
//if (!changeBoxSave_Result.IsSuccess)
|
||||
// return changeBoxSave_Result;
|
||||
|
||||
//保存成功后:变更库存
|
||||
var boxInventoryResult = await _boxInventoryService.GenerateBackBox(entity, isTransaction);
|
||||
if (!boxInventoryResult.IsSuccess)
|
||||
|
||||
Reference in New Issue
Block a user