1、解决SnowflakeIdHeler.NextId()空引用问题
2、将Agv心跳检测服务移至自定义定时服务,统一维护管理
This commit is contained in:
@@ -80,12 +80,10 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpPost, Timed(Name = nameof(KittingOutByAdd))]
|
||||
public async Task KittingOutByAdd(CancellationToken? ct = default)
|
||||
{
|
||||
//if (UserManager.AsscessToken.IsNullOrWhiteSpace()) return;
|
||||
//var curUser = await GetUserIdentity();
|
||||
if (ct?.IsCancellationRequested ?? false)
|
||||
{
|
||||
ct?.ThrowIfCancellationRequested();
|
||||
}
|
||||
//if (ct?.IsCancellationRequested ?? false)
|
||||
//{
|
||||
// ct?.ThrowIfCancellationRequested();
|
||||
//}
|
||||
var curDb = _db.CopyNew();
|
||||
try
|
||||
{
|
||||
@@ -171,15 +169,18 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
Log.Error("齐套出库,新增时出现错误", ex);
|
||||
await curDb.Ado.RollbackTranAsync();
|
||||
TimedTaskErrorInfo ei = new()
|
||||
if(_userManager?.ToKen.IsNullOrEmpty() ?? false)
|
||||
{
|
||||
RequestURL = App.HttpContext?.Request?.Path,
|
||||
RequestMethod = App.HttpContext?.Request?.Method,
|
||||
userIdentity = await GetUserIdentity(_userManager.ToKen),
|
||||
};
|
||||
var timedTaskEx = ex.ToTimedTaskException(ei);
|
||||
//cts?.Cancel();
|
||||
throw timedTaskEx;
|
||||
TimedTaskErrorInfo ei = new()
|
||||
{
|
||||
RequestURL = App.HttpContext?.Request?.Path,
|
||||
RequestMethod = App.HttpContext?.Request?.Method,
|
||||
userIdentity = await GetUserIdentity(_userManager.ToKen),
|
||||
};
|
||||
var timedTaskEx = ex.ToTimedTaskException(ei);
|
||||
//cts?.Cancel();
|
||||
throw timedTaskEx;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -278,19 +279,23 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
Log.Error("齐套出库,待配送时出现错误", ex);
|
||||
await curDb.Ado.RollbackTranAsync();
|
||||
TimedTaskErrorInfo ei = new()
|
||||
if(_userManager?.ToKen.IsNullOrEmpty() ?? false)
|
||||
{
|
||||
RequestURL = App.HttpContext?.Request?.Path,
|
||||
RequestMethod = App.HttpContext?.Request?.Method,
|
||||
userIdentity = await GetUserIdentity(_userManager.ToKen),
|
||||
};
|
||||
var timedTaskEx = ex.ToTimedTaskException(ei);
|
||||
//cts?.Cancel();
|
||||
throw timedTaskEx;
|
||||
TimedTaskErrorInfo ei = new()
|
||||
{
|
||||
RequestURL = App.HttpContext?.Request?.Path,
|
||||
RequestMethod = App.HttpContext?.Request?.Method,
|
||||
userIdentity = await GetUserIdentity(_userManager.ToKen),
|
||||
};
|
||||
var timedTaskEx = ex.ToTimedTaskException(ei);
|
||||
//cts?.Cancel();
|
||||
throw timedTaskEx;
|
||||
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
await Publish(nameof(IWareHouseService.GenTaskExecute));
|
||||
//await Publish(nameof(IWareHouseService.GenTaskExecute));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user