This commit is contained in:
alex
2023-08-15 14:53:19 +08:00
parent 386dd57782
commit 6efbf6f066
8 changed files with 72 additions and 50 deletions

View File

@@ -58,7 +58,8 @@ namespace Tnb.WarehouseMgr
IUserManager userManager,
IBillRullService billRullService,
IWmsCarryMoveInStockService wmsCarryMoveInStockService,
IWmsCarryService wareCarryService)
IWmsCarryService wareCarryService,
ITaskMessageNotify taskMessageNotify) : base(taskMessageNotify.Writer)
{
_db = repository.AsSugarClient();
_dictionaryDataService = dictionaryDataService;
@@ -281,9 +282,6 @@ namespace Tnb.WarehouseMgr
}
await _db.Ado.CommitTranAsync();
}
catch (Exception)
@@ -291,6 +289,10 @@ namespace Tnb.WarehouseMgr
await _db.Ado.RollbackTranAsync();
throw;
}
finally
{
await Publish(nameof(IWareHouseService.GenTaskExecute));
}
return Task.FromResult(true);
}
@@ -551,7 +553,11 @@ namespace Tnb.WarehouseMgr
isSuccessful = false;
JNPF.Logging.Log.Error(ex.Message);
await _db.Ado.RollbackTranAsync();
throw ex;
throw;
}
finally
{
await Publish(nameof(IWareHouseService.GenTaskExecute));
}
return isSuccessful;
}