tangjiang 5 ay önce
ebeveyn
işleme
6e42f8f395

+ 14 - 2
src/Hotline.Application/Subscribers/DatasharingSubscriber.cs

@@ -315,8 +315,7 @@ namespace Hotline.Application.Subscribers
                         nextHandler = new List<FlowStepHandler> { handler };
                     }
                 }
-                var isPaiDan = await _workflowDomainService.RecallToCenterFirstToSendAsync(order.WorkflowId, dto.Opinion,
-                    order.Status >= EOrderStatus.Filed, order.ExpiredTime, nextHandler, cancellationToken);
+                var (isPaiDan, workflow) = await _workflowDomainService.RecallToCenterFirstToSendAsync(order.WorkflowId, dto.Opinion, order.Status >= EOrderStatus.Filed, order.ExpiredTime, nextHandler, cancellationToken);
                 order.FiledTime = null;
                 if (isPaiDan)
                 {
@@ -327,6 +326,19 @@ namespace Hotline.Application.Subscribers
                     order.Status = EOrderStatus.WaitForAccept;
                 }
 
+                order.CurrentStepName = workflow.CurrentStepName;
+                order.CurrentStepCode=workflow.CurrentStepCode;
+                order.CurrentStepId = workflow.CurrentStepId;
+                order.CurrentStepCreateTime = workflow.CurrentStepCreateTime;
+                order.CurrentHandleTime = workflow.CurrentHandleTime;
+                order.CurrentHandlerId = workflow.CurrentHandlerId;
+                order.CurrentHandlerName = workflow.CurrentHandlerName;
+                order.CurrentHandleOrgName = workflow.CurrentHandleOrgName;
+                order.CurrentHandleOrgId = workflow.CurrentHandleOrgId;
+                order.CurrentHandleOrgLevel = workflow.CurrentHandleOrgLevel;
+                order.CurrentHandleOrgAreaCode = workflow.CurrentHandleOrgAreaCode;
+                order.CurrentHandleOrgAreaName = workflow.CurrentHandleOrgAreaName;
+
                 await _orderRepository.UpdateAsync(order, cancellationToken);
             }
         }

+ 1 - 1
src/Hotline/FlowEngine/Workflows/IWorkflowDomainService.cs

@@ -96,7 +96,7 @@ namespace Hotline.FlowEngine.Workflows
         /// 特提至中心(优先派单组其次坐席)
         /// </summary>
         /// <returns></returns>
-        Task<bool> RecallToCenterFirstToSendAsync(string workflowId, string opinion, bool isOrderFiled, DateTime? expiredTime, List<FlowStepHandler> handlers,
+        Task<(bool, Workflow workflow)> RecallToCenterFirstToSendAsync(string workflowId, string opinion, bool isOrderFiled, DateTime? expiredTime, List<FlowStepHandler> handlers,
 			CancellationToken cancellationToken);
 
         ///// <summary>

+ 4 - 4
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -602,12 +602,12 @@ namespace Hotline.FlowEngine.Workflows
             var unhandlePreviousTrace = workflow.Traces.FirstOrDefault(d =>
                 d.Status is not EWorkflowStepStatus.Handled
             );
-            
+
             var unCompletedCountersign = workflow.Countersigns
                 .FirstOrDefault(d => !d.IsCompleted() && d.StarterOrgId == orgId);
             if (unCompletedCountersign is null)
                 return (workflow, null, canHandle, canPrevious, unhandlePreviousTrace);
-            
+
             //var existCountersignEndStep = workflow.Steps.Exists(d =>
             //    d.IsCountersignEndStep && d.CountersignStartStepId == unCompletedCountersign.StartStepId);
             //return (workflow, existCountersignEndStep ? null : unCompletedCountersign.Id, canPrevious);
@@ -1680,7 +1680,7 @@ namespace Hotline.FlowEngine.Workflows
         /// 特提至中心(优先派单组其次坐席)
         /// </summary>
         /// <returns>true 派单组  false 话务部</returns>
-        public async Task<bool> RecallToCenterFirstToSendAsync(string workflowId, string opinion, bool isOrderFiled,
+        public async Task<(bool, Workflow workflow)> RecallToCenterFirstToSendAsync(string workflowId, string opinion, bool isOrderFiled,
             DateTime? expiredTime, List<FlowStepHandler>? handlers, CancellationToken cancellationToken)
         {
             bool isPaiDan = true;
@@ -1763,7 +1763,7 @@ namespace Hotline.FlowEngine.Workflows
                 isPaiDan = false;
             }
 
-            return isPaiDan;
+            return (new(isPaiDan, workflow));
         }
 
         //private async Task RecallToTargetStepAsync(Workflow workflow, WorkflowStep targetStep, string opinion, ISessionContext current,