|
@@ -58,8 +58,9 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
|
|
|
private readonly ICallApplication _callApplication;
|
|
|
private readonly IOptionsSnapshot<CallCenterConfiguration> _callcenterOptions;
|
|
|
private readonly ISessionContext _sessionContext;
|
|
|
+ private readonly IRepository<OrderScreenDetail> _orderScreenDetailRepository;
|
|
|
|
|
|
- public WorkflowEndHandler(
|
|
|
+ public WorkflowEndHandler(
|
|
|
IKnowledgeDomainService knowledgeDomainService,
|
|
|
IOrderDomainService orderDomainService,
|
|
|
IOrderApplication orderApplication,
|
|
@@ -87,7 +88,8 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
|
|
|
IEnforcementApplication enforcementApplication,
|
|
|
ICallApplication callApplication,
|
|
|
IOptionsSnapshot<CallCenterConfiguration> callcenterOptions,
|
|
|
- ISessionContext sessionContext)
|
|
|
+ ISessionContext sessionContext,
|
|
|
+ IRepository<OrderScreenDetail> orderScreenDetailRepository)
|
|
|
{
|
|
|
_knowledgeDomainService = knowledgeDomainService;
|
|
|
_orderDomainService = orderDomainService;
|
|
@@ -116,7 +118,8 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
|
|
|
_callApplication = callApplication;
|
|
|
_callcenterOptions = callcenterOptions;
|
|
|
_sessionContext = sessionContext;
|
|
|
- }
|
|
|
+ _orderScreenDetailRepository = orderScreenDetailRepository;
|
|
|
+ }
|
|
|
|
|
|
/// <summary>Handles a notification</summary>
|
|
|
/// <param name="notification">The notification</param>
|
|
@@ -253,7 +256,7 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
|
|
|
{
|
|
|
screen.Status = EScreenStatus.End;
|
|
|
screen.ReplyContent = workflow.ActualOpinion;
|
|
|
- await _orderScreenRepository.UpdateAsync(screen, cancellationToken);
|
|
|
+ //await _orderScreenRepository.UpdateAsync(screen, cancellationToken);
|
|
|
var visitDetail =
|
|
|
await _orderVisitedDetailRepository.GetAsync(screen.VisitDetailId, cancellationToken);
|
|
|
if (visitDetail != null)
|
|
@@ -308,9 +311,13 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
|
|
|
await _orderRepository.OrderScreenRevisionVisit(screen.VisitId, true, cancellationToken);
|
|
|
screen.Status = EScreenStatus.Refuse;
|
|
|
screen.ReplyContent = workflow.ActualOpinion;
|
|
|
- await _orderScreenRepository.UpdateAsync(screen, cancellationToken);
|
|
|
}
|
|
|
- }
|
|
|
+ screen.NewestAuditTime = DateTime.Now;
|
|
|
+ await _orderScreenRepository.UpdateAsync(screen, cancellationToken);
|
|
|
+ OrderScreenDetail detail = new OrderScreenDetail();
|
|
|
+ detail.Audit(_sessionContext.UserId, _sessionContext.UserName, _sessionContext.OrgId, _sessionContext.OrgName, 1);
|
|
|
+ await _orderScreenDetailRepository.AddAsync(detail, cancellationToken);
|
|
|
+ }
|
|
|
break;
|
|
|
case WorkflowModuleConsts.OrderDelay:
|
|
|
var delay = await _orderDelayRepository.GetAsync(workflow.ExternalId, cancellationToken);
|