田爽 9 місяців тому
батько
коміт
99b9bf0f41

+ 1 - 2
src/Hotline.Api/Controllers/OrderController.cs

@@ -3277,8 +3277,7 @@ public class OrderController : BaseController
                 canUpdateOrderSender);
             //发送短信即将超期
             _capPublisher.PublishDelay(expiredTimeConfig.NearlyExpiredTime - DateTime.Now, EventNames.HotlineOrderNearlyExpiredTimeSms, new PublishNearlyExpiredTimeSmsDto() { OrderId = order.Id });
-            //写入质检
-            await _qualityApplication.AddQualityAsync(EQualitySource.Send, order.Id, HttpContext.RequestAborted);
+           
         }
         else if (dto.FlowDirection is EFlowDirection.CenterToCenter)
         {

+ 5 - 2
src/Hotline.Application/Handlers/FlowEngine/WorkflowNextHandler.cs

@@ -15,10 +15,12 @@ using Hotline.Share.Dtos.Settings;
 using Hotline.Share.Enums.FlowEngine;
 using Hotline.Share.Enums.Order;
 using Hotline.Share.Enums.Push;
+using Hotline.Share.Enums.Quality;
 using Hotline.Share.Mq;
 using Hotline.Users;
 using MapsterMapper;
 using MediatR;
+using Microsoft.AspNetCore.Http;
 using Microsoft.Extensions.Logging;
 using XF.Domain.Authentications;
 using XF.Domain.Entities;
@@ -226,9 +228,10 @@ public class WorkflowNextHandler : INotificationHandler<NextStepNotify>
                         ExpiredTimeChanged = notification.ExpiredTimeChanged,
                         HandlerOrgLevel = notification.HandlerOrgId.CalcOrgLevel()
                     }, cancellationToken: cancellationToken);
+                    if (data.FlowDirection is EFlowDirection.CenterToOrg)
+	                    await _qualityApplication.AddQualityAsync(EQualitySource.Send, order.Id, cancellationToken);
 
-
-                    break;
+					break;
                 case WorkflowModuleConsts.KnowledgeAdd:
                 case WorkflowModuleConsts.KnowledgeUpdate:
                 case WorkflowModuleConsts.KnowledgeDelete: