田爽 преди 6 месеца
родител
ревизия
dd40265f5f

+ 3 - 3
src/Hotline.Api/Controllers/OrderController.cs

@@ -5233,7 +5233,7 @@ public class OrderController : BaseController
             SpecialReason = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.SpecialReason),
             InstaShotSpecialReason = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.InstaShotSpecialReason),
             Step = step,
-			IsTerminate = _orderTerminateRepository.Queryable().Where(d=>d.OrderId == order.Id && d.Status == ETerminateStatus.End).AnyAsync(HttpContext.RequestAborted),
+			IsTerminate = _orderTerminateRepository.Queryable().Where(d=>d.OrderId == order.Id && d.Status == ETerminateStatus.End).AnyAsync(),
 			BaseTypeId = baseTypeId
         };
         return rsp;
@@ -5260,7 +5260,7 @@ public class OrderController : BaseController
             SpecialTimeType = EnumExts.GetDescriptions<ETimeType>(),
             SpecialReason = isInstaShot ? _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.InstaShotSpecialReason) : _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.SpecialReason),
             ReTransactErrorType = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.ReTransactErrorType),
-            IsTerminate = _orderTerminateRepository.Queryable().Where(d => d.OrderId == order.Id && d.Status == ETerminateStatus.End).AnyAsync(HttpContext.RequestAborted),
+            IsTerminate = _orderTerminateRepository.Queryable().Where(d => d.OrderId == order.Id && d.Status == ETerminateStatus.End).AnyAsync(),
 			Step = step,
             Orgs = orgs,
         };
@@ -5708,7 +5708,7 @@ public class OrderController : BaseController
 
     #endregion
 
-    #region 工单观察
+    #region 工单观察、关注
 
     /// <summary>
     /// 新增工单观察

+ 11 - 11
src/Hotline.Application/Handlers/FlowEngine/WorkflowEndHandler.cs

@@ -45,7 +45,7 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
     private readonly ISystemSettingCacheManager _systemSettingCacheManager;
     private readonly Publisher _publisher;
     private readonly ICalcExpireTime _expireTime;
-    private readonly IOrderTerminateRepository _orderTerminateRepository;
+    private readonly IRepository<OrderTerminate> _orderTerminateRepository;
 
 	public WorkflowEndHandler(
         IMapper mapper,
@@ -64,7 +64,7 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
         Publisher publisher,
         ILogger<WorkflowEndHandler> logger,
         ICalcExpireTime expireTime,
-        IOrderTerminateRepository orderTerminateRepository)
+        IRepository<OrderTerminate> orderTerminateRepository)
     {
         _mapper = mapper;
         _knowledgeDomainService = knowledgeDomainService;
@@ -332,15 +332,15 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
                     }
                     break;
                 case WorkflowModuleConsts.OrderTerminate:
-	                var orderTerminate = await _orderTerminateRepository.Queryable()
-		                .Where(x => x.Id == workflow.ExternalId).FirstAsync(cancellationToken);
-	                if (orderTerminate != null)
-	                {
-		                orderTerminate.Status = isReviewPass ? ETerminateStatus.End: ETerminateStatus.Refuse;
-		                await _orderTerminateRepository.UpdateAsync(orderTerminate, cancellationToken);
-	                }
-	                break;
-			}
+                    var orderTerminate = await _orderTerminateRepository.Queryable()
+                        .Where(x => x.Id == workflow.ExternalId).FirstAsync(cancellationToken);
+                    if (orderTerminate != null)
+                    {
+                        orderTerminate.Status = isReviewPass ? ETerminateStatus.End : ETerminateStatus.Refuse;
+                        await _orderTerminateRepository.UpdateAsync(orderTerminate, cancellationToken);
+                    }
+                    break;
+            }
 
         }
         catch (Exception e)

+ 2 - 2
src/Hotline.Application/Handlers/FlowEngine/WorkflowPreviousHandler.cs

@@ -35,7 +35,7 @@ namespace Hotline.Application.Handlers.FlowEngine
         private readonly IMediator _mediator;
         private readonly ISessionContext _sessionContext;
         private readonly IRepository<OrderScreenDetail> _orderScreenDetailRepository;
-        private readonly IOrderTerminateRepository _orderTerminateRepository;
+        private readonly IRepository<OrderTerminate> _orderTerminateRepository;
 
 		public WorkflowPreviousHandler(
             IOrderDomainService orderDomainService,
@@ -51,7 +51,7 @@ namespace Hotline.Application.Handlers.FlowEngine
             IMediator mediator,
             ISessionContext sessionContext,
             IRepository<OrderScreenDetail> orderScreenDetailRepository,
-            IOrderTerminateRepository orderTerminateRepository
+            IRepository<OrderTerminate> orderTerminateRepository
 			)
         {
             _orderDomainService = orderDomainService;

+ 2 - 2
src/Hotline.Application/Handlers/FlowEngine/WorkflowStartHandler.cs

@@ -42,7 +42,7 @@ namespace Hotline.Application.Handlers.FlowEngine
         private readonly IOptionsSnapshot<AppConfiguration> _appOptions;
         private readonly IMediator _mediator;
         private readonly ISystemSettingCacheManager _systemSettingCacheManager;
-        private readonly IOrderTerminateRepository _orderTerminateRepository;
+        private readonly IRepository<OrderTerminate> _orderTerminateRepository;
 
 		public WorkflowStartHandler(
             IOrderDomainService orderDomainService,
@@ -58,7 +58,7 @@ namespace Hotline.Application.Handlers.FlowEngine
             IOptionsSnapshot<AppConfiguration> appOptions,
             IMediator mediator,
             ISystemSettingCacheManager systemSettingCacheManager,
-            IOrderTerminateRepository orderTerminateRepository
+            IRepository<OrderTerminate> orderTerminateRepository
 		)
         {
             _orderDomainService = orderDomainService;