移箱调整
This commit is contained in:
@@ -147,14 +147,10 @@ namespace WMS.Web.Domain.Services
|
||||
entity.Create(IsUp == true ? MoveBoxType.Up : MoveBoxType.Down, d.BoxId, subStock?.ErpOrgCode, subStock?.StockCode, d.SubStockId, loginInfo.UserInfo.StaffId);
|
||||
entityList.Add(entity);
|
||||
}
|
||||
var inventoryList = _mapper.Map<List<BoxInventoryMoveGenerateDto>>(dto);
|
||||
inventoryList.ForEach(f => f.InventoryInOutType = IsUp == true ? 1 : 2);
|
||||
|
||||
IDbContextTransaction _transaction = _basbicsRepositories.GetTransaction();
|
||||
bool isSuccess = true;
|
||||
Result res_Rollback = Result.ReSuccess();
|
||||
var res_Inventory = await _boxInventoryService.GenerateMoveBox(inventoryList, false);
|
||||
if (!res_Inventory.IsSuccess) res_Rollback = res_Inventory;
|
||||
|
||||
if (res_Rollback.IsSuccess)
|
||||
{
|
||||
@@ -166,6 +162,11 @@ namespace WMS.Web.Domain.Services
|
||||
var res_change = await _serialNumberService.MoveBox(entityList, loginInfo, false);
|
||||
if (!res_change.IsSuccess) res_Rollback = res_change;
|
||||
}
|
||||
if(res_Rollback.IsSuccess)
|
||||
{
|
||||
var res_Inventory = await _boxInventoryService.GenerateMoveBox(entityList, false);
|
||||
if (!res_Inventory.IsSuccess) res_Rollback = res_Inventory;
|
||||
}
|
||||
//提交事务
|
||||
isSuccess = _basbicsRepositories.CommitTransaction(res_Rollback.IsSuccess ? false : true, _transaction);
|
||||
if (!res_Rollback.IsSuccess) return res_Rollback;
|
||||
|
||||
Reference in New Issue
Block a user