Browse Source

Merge branch 'master' of http://110.188.24.182:10023/Fengwo/hotline

田爽 1 year ago
parent
commit
2a02070123

+ 3 - 3
src/Hotline/FlowEngine/Workflows/Workflow.cs

@@ -502,11 +502,11 @@ public partial class Workflow
     /// 更新当前办理人(待办人或部门),正常流转场景
     /// </summary>
     public void UpdateHandlers(string handlerId, string handlerOrg, EFlowAssignType assignType,
-        List<HandlerGroupItem> handlerObjects)
+        List<HandlerGroupItem> handlerObjects, bool isCreateNewStep)
     {
         RemoveCurrentHandleGroup(handlerId, handlerOrg);
-
-        SetHandlers(assignType, handlerObjects);
+        if (isCreateNewStep)
+            SetHandlers(assignType, handlerObjects);
     }
 
     private void SetHandlers(EFlowAssignType assignType, List<HandlerGroupItem> handlerObjects)

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

@@ -166,7 +166,7 @@ namespace Hotline.FlowEngine.Workflows
                 _sessionContext.OrgName);
 
             workflow.UpdateHandlers(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgId,
-                flowAssignInfo.FlowAssignType, flowAssignInfo.HandlerObjects);
+                flowAssignInfo.FlowAssignType, flowAssignInfo.HandlerObjects, true);
 
             //更新指派信息
             workflow.Assign(flowAssignInfo.FlowAssignType, flowAssignInfo.GetHandlerIds());
@@ -423,9 +423,9 @@ namespace Hotline.FlowEngine.Workflows
                 await _workflowStepRepository.UpdateAsync(currentStep, cancellationToken);
             }
 
-            //更新办理人
+            //更新办理人(nextSteps无元素表示当前节点为会签办理节点且当前会签没有全部办理完成)
             workflow.UpdateHandlers(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgId,
-                flowAssignInfo.FlowAssignType, flowAssignInfo.HandlerObjects);
+                    flowAssignInfo.FlowAssignType, flowAssignInfo.HandlerObjects, nextSteps.Any());
 
             //todo 计算办理工作时长