Browse Source

workflow.AddCsActualHandler

xf 1 year ago
parent
commit
52b9ed2ce2

+ 5 - 1
src/Hotline/FlowEngine/Workflows/Workflow.cs

@@ -816,8 +816,12 @@ public partial class Workflow
     public void AddCsActualHandler(string userId, string orgId)
     public void AddCsActualHandler(string userId, string orgId)
     {
     {
         CsActualHandleUserIds ??= new();
         CsActualHandleUserIds ??= new();
-        if (!CsActualHandleUserIds.Exists(d => d == userId))
+        if (CsActualHandleUserIds.All(d => d != userId))
             CsActualHandleUserIds.Add(userId);
             CsActualHandleUserIds.Add(userId);
+
+        CsActualHandleOrgIds ??= new();
+        if (CsActualHandleOrgIds.All(d => d != orgId))
+            CsActualHandleOrgIds.Add(orgId);
     }
     }
 
 
     #endregion
     #endregion

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

@@ -414,6 +414,10 @@ namespace Hotline.FlowEngine.Workflows
             //更新指派信息
             //更新指派信息
             workflow.Assign(flowAssignInfo.FlowAssignType, flowAssignInfo.GetHandlerIds());
             workflow.Assign(flowAssignInfo.FlowAssignType, flowAssignInfo.GetHandlerIds());
 
 
+            //更新会签实际办理对象信息
+            if (currentStep.IsActualHandled)
+                workflow.AddCsActualHandler(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgId);
+
             await _workflowRepository.UpdateAsync(workflow, cancellationToken);
             await _workflowRepository.UpdateAsync(workflow, cancellationToken);
 
 
             #endregion
             #endregion
@@ -1049,7 +1053,7 @@ namespace Hotline.FlowEngine.Workflows
 
 
             //办理参数
             //办理参数
             _mapper.Map(dto, step);
             _mapper.Map(dto, step);
-            
+
             //step办理状态
             //step办理状态
             HandleStep(step, dto.NextStepCode);
             HandleStep(step, dto.NextStepCode);
         }
         }