diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Exceptions/TimedTaskException.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Exceptions/TimedTaskException.cs index f42b28ae..5b73e217 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Exceptions/TimedTaskException.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Exceptions/TimedTaskException.cs @@ -39,14 +39,14 @@ namespace Tnb.WarehouseMgr.Entities.Exceptions public static class TimedTaskExceptionExtensions { - public static TimedTaskException ToTimedTaskException(this Exception exception, ErrorInfo exceptionInfo) + public static TimedTaskException ToTimedTaskException(this Exception exception, TimedTaskErrorInfo exceptionInfo) { TimedTaskException ex = new(exception.Message, exceptionInfo.RequestURL, exceptionInfo.RequestMethod, exceptionInfo.userIdentity, exception); return ex; } } - public class ErrorInfo + public class TimedTaskErrorInfo { public string RequestURL { get; set; } public string RequestMethod { get; set; } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index dbef621c..d2093b7f 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -380,7 +380,7 @@ namespace Tnb.WarehouseMgr Log.Error("生成预任务执行时出现错误", ex); var opts = curUser.FindFirst(ClaimConst.CONNECTIONCONFIG)?.Value; - ErrorInfo ei = new() + TimedTaskErrorInfo ei = new() { RequestURL = App.HttpContext?.Request?.Path, RequestMethod = App.HttpContext?.Request?.Method, diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsSetSortingService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsSetSortingService.cs index 47739623..3057bba8 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsSetSortingService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsSetSortingService.cs @@ -17,6 +17,7 @@ using Mapster; using Microsoft.AspNetCore.Mvc; using NPOI.SS.Formula; using SqlSugar; +using TencentCloud.Common; using Tnb.BasicData.Entities; using Tnb.Common.Utils; using Tnb.WarehouseMgr.Entities; @@ -223,7 +224,12 @@ namespace Tnb.WarehouseMgr { JNPF.Logging.Log.Error("齐套分拣执行时出现错误", ex); await curDb.Ado.RollbackTranAsync(); + ErrorInfo ei = new() + { + + }; cts?.Cancel(); + throw; } }