|
@@ -6,6 +6,7 @@ using Hotline.FlowEngine.WorkflowModules;
|
|
|
using Hotline.FlowEngine.Workflows;
|
|
|
using Hotline.KnowledgeBase;
|
|
|
using Hotline.Orders;
|
|
|
+using Hotline.Quality;
|
|
|
using Hotline.Repository.SqlSugar.CallCenter;
|
|
|
using Hotline.Repository.SqlSugar.Orders;
|
|
|
using Hotline.Settings;
|
|
@@ -15,10 +16,12 @@ using Hotline.Share.Dtos.Order;
|
|
|
using Hotline.Share.Dtos.Settings;
|
|
|
using Hotline.Share.Enums.FlowEngine;
|
|
|
using Hotline.Share.Enums.Order;
|
|
|
+using Hotline.Share.Enums.Quality;
|
|
|
using Hotline.Share.Enums.Settings;
|
|
|
using Hotline.Share.Mq;
|
|
|
using MapsterMapper;
|
|
|
using MediatR;
|
|
|
+using Microsoft.AspNetCore.Http;
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
using Newtonsoft.Json;
|
|
|
using XF.Domain.Entities;
|
|
@@ -38,8 +41,9 @@ public class NextStepHandler : INotificationHandler<NextStepNotify>
|
|
|
private readonly IMapper _mapper;
|
|
|
private readonly ILogger<NextStepHandler> _logger;
|
|
|
private readonly IRepository<OrderScreen> _orderScreenRepository;
|
|
|
+ private readonly IQualityRepository _qualityRepository;
|
|
|
|
|
|
- public NextStepHandler(
|
|
|
+ public NextStepHandler(
|
|
|
IOrderDomainService orderDomainService,
|
|
|
IKnowledgeDomainService knowledgeDomainService,
|
|
|
IOrderRepository orderRepository,
|
|
@@ -48,7 +52,8 @@ public class NextStepHandler : INotificationHandler<NextStepNotify>
|
|
|
ICapPublisher capPublisher,
|
|
|
IMapper mapper,
|
|
|
ILogger<NextStepHandler> logger,
|
|
|
- IRepository<OrderScreen> orderScreenRepository)
|
|
|
+ IRepository<OrderScreen> orderScreenRepository,
|
|
|
+ IQualityRepository qualityRepository)
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_knowledgeDomainService = knowledgeDomainService;
|
|
@@ -59,7 +64,8 @@ public class NextStepHandler : INotificationHandler<NextStepNotify>
|
|
|
_mapper = mapper;
|
|
|
_logger = logger;
|
|
|
_orderScreenRepository = orderScreenRepository;
|
|
|
- }
|
|
|
+ _qualityRepository = qualityRepository;
|
|
|
+ }
|
|
|
|
|
|
/// <summary>Handles a notification</summary>
|
|
|
/// <param name="notification">The notification</param>
|
|
@@ -100,7 +106,9 @@ public class NextStepHandler : INotificationHandler<NextStepNotify>
|
|
|
else if (data.FlowDirection is EFlowDirection.CenterToOrg)
|
|
|
{
|
|
|
order.CenterToOrg(expiredTime.EndTime);
|
|
|
- }
|
|
|
+ //写入质检
|
|
|
+ await _qualityRepository.AddQualityAsync(EQualitySource.Send, order.Id, cancellationToken);
|
|
|
+ }
|
|
|
|
|
|
await _workflowDomainService.UpdateExpiredTimeAsync(workflow, expiredTime.EndTime,
|
|
|
expiredTime.RuleStr, data.External.TimeLimit, data.External.TimeLimitUnit, cancellationToken);
|