xf před 2 roky
rodič
revize
91a53d5fbf

+ 1 - 1
src/Hotline.Application/Handlers/FlowEngine/NextStepHandler.cs

@@ -41,7 +41,7 @@ public class NextStepHandler : INotificationHandler<NextStepNotify>
         {
             case WorkflowModuleConsts.OrderManage:
                 await _orderDomainService.ManageFlowNextAsync(
-                    notification.FlowAssignMode, notification.IsCountersignEnd, notification.IsCountersignStart,
+                    notification.FlowAssignMode, notification.IsCountersignStart, notification.IsCountersignEnd,
                     workflow.ExternalId, workflow.CurrentStepTime, workflow.CurrentStepName, workflow.ExpiredTime,
                     cancellationToken);
                 break;

+ 1 - 1
src/Hotline.Application/Handlers/FlowEngine/StartWorkflowHandler.cs

@@ -33,7 +33,7 @@ namespace Hotline.Application.Handlers.FlowEngine
             {
                 case WorkflowModuleConsts.OrderManage:
                     await _orderDomainService.ManageFlowNextAsync(notification.FlowAssignMode,
-                        false, notification.IsCountersignStart,
+                        notification.IsCountersignStart, false,
                         workflow.ExternalId, workflow.CurrentStepTime, workflow.CurrentStepName, workflow.ExpiredTime, cancellationToken);
                     break;
             }

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

@@ -402,7 +402,7 @@ namespace Hotline.FlowEngine.Workflows
 
             #endregion
 
-            _mediator.Publish(new NextStepNotify(workflow, dto, isStartCountersign, isCountersignOver, flowAssignMode));
+            await _mediator.Publish(new NextStepNotify(workflow, dto, isStartCountersign, isCountersignOver, flowAssignMode), cancellationToken);
         }
 
         /// <summary>

+ 1 - 1
src/Hotline/Orders/IOrderDomainService.cs

@@ -26,7 +26,7 @@ namespace Hotline.Orders
         /// <summary>
         /// 工单办理流程流转(每个节点办理都会触发)
         /// </summary>
-        Task ManageFlowNextAsync(FlowAssignMode assignMode, bool isCountersignEnd, bool isCountersignStart,
+        Task ManageFlowNextAsync(FlowAssignMode assignMode, bool isCountersignStart, bool isCountersignEnd,
             string? orderId, DateTime? currentStepTime, string? CurrentStepName, DateTime expiredTime, CancellationToken cancellationToken);
 
         /// <summary>

+ 7 - 5
src/Hotline/Orders/Order.cs

@@ -283,9 +283,9 @@ namespace Hotline.Orders
         /// </summary>
         public void ManageFlow(
             bool isCountersignStart,
-            bool isCountersignEnd, 
-            DateTime? currentStepTime, 
-            string? currentStepName, 
+            bool isCountersignEnd,
+            DateTime? currentStepTime,
+            string? currentStepName,
             DateTime expiredTime)
         {
             //1.如果order未处于会签中,则判断是否发起会签(isstartCountersign) 2.如果处于会签中,则判断会签是否结束(isCountersignEnd)
@@ -297,11 +297,13 @@ namespace Hotline.Orders
             {
                 Status = EOrderStatus.Countersigning;
             }
-
+            else
+            {
+                Status = EOrderStatus.WaitForSign;
+            }
             CurrentStepTime = currentStepTime;
             CurrentStepName = currentStepName;
             ExpiredTime = expiredTime;
-            Status = EOrderStatus.WaitForSign;
         }
 
         /// <summary>

+ 3 - 2
src/Hotline/Orders/OrderDomainService.cs

@@ -69,7 +69,7 @@ public class OrderDomainService : IOrderDomainService, IScopeDependency
     /// 工单办理(每个节点都会触发)
     /// </summary>
     public async Task ManageFlowNextAsync(FlowAssignMode assignMode,
-        bool isCountersignEnd, bool isCountersignStart,
+        bool isCountersignStart, bool isCountersignEnd,
         string? orderId, DateTime? currentStepTime, string? CurrentStepName, DateTime expiredTime,
         CancellationToken cancellationToken)
     {
@@ -84,8 +84,9 @@ public class OrderDomainService : IOrderDomainService, IScopeDependency
 
         //更新流转信息
         order.ManageFlow(isCountersignStart, isCountersignEnd, currentStepTime, CurrentStepName, expiredTime);
-
+        _logger.LogInformation($"更新流转信息 over, order.AssignUserIds: {string.Join(',', order.AssignUserIds)}");
         await _orderRepository.UpdateAsync(order, cancellationToken);
+        _logger.LogInformation($"update db over, order.AssignUserIds: {string.Join(',', order.AssignUserIds)}");
 
         //todo push msg to next step handler
     }