浏览代码

Merge branch 'test' of http://110.188.24.182:10023/Fengwo/hotline into test

tangjiang 5 月之前
父节点
当前提交
02f6db19ce
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 11 5
      src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

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

@@ -277,7 +277,7 @@ namespace Hotline.FlowEngine.Workflows
             StepDefine nextStepDefine;
             if (isNextDynamic
                 || (workflow.IsInCountersign
-                    && currentStep.IsInCountersign() 
+                    && currentStep.IsInCountersign()
                     && !currentStep.IsTopCountersignEndStep(workflow.TopCountersignStepId))
                 || dto.IsStartCountersign)
             {
@@ -298,7 +298,7 @@ namespace Hotline.FlowEngine.Workflows
             }
 
             //需求:按角色选择办理人可以不选,表示该角色下所有人都可以办理,同时依据配置:是否本部门人办理显示待选办理人。角色下只要一人办理即可(即:角色下不发起会签)
-            if (nextStepDefine.HandlerType != EHandlerType.Role 
+            if (nextStepDefine.HandlerType != EHandlerType.Role
                 && nextStepDefine.StepType != EStepType.End
                 && !dto.NextHandlers.Any())
                 throw new UserFriendlyException("未指定节点处理者");
@@ -436,6 +436,11 @@ namespace Hotline.FlowEngine.Workflows
             //检查是否流转到流程终点
             if (nextStepDefine.StepType is EStepType.End)
             {
+                //更新实际办理节点信息
+                workflow.UpdateActualStepWhenHandle(currentStep, _sessionContextProvider.SessionContext.OrgAreaCode,
+                    _sessionContextProvider.SessionContext.OrgAreaName, _sessionContextProvider.SessionContext.OrgLevel);
+                workflow.ActualHandleStepAcceptTime = currentStep.AcceptTime;
+
                 var endTrace = await EndAsync(current, workflow, dto, nextStepDefine, currentStep, expiredTime, cancellationToken);
                 return new List<WorkflowStep>();
             }
@@ -448,7 +453,7 @@ namespace Hotline.FlowEngine.Workflows
                 ECountersignPosition.End => !dto.BackToCountersignEnd && (workflow.IsInCountersign || dto.IsStartCountersign),
                 _ => throw new ArgumentOutOfRangeException()
             };
-            
+
             var currentTrace = workflow.Traces.First(d => d.Id == currentStep.Id);
 
             //创建会签数据
@@ -1497,7 +1502,7 @@ namespace Hotline.FlowEngine.Workflows
             if (currentStep.StepType != EStepType.Summary && currentStep.StepType != EStepType.End)
             {
                 workflow.UpdateActualStepWhenHandle(currentStep, current.OrgAreaCode, current.OrgAreaName, current.OrgLevel);
-                workflow.ActualHandleStepAcceptTime = currentStep.AcceptTime.Value;
+                workflow.ActualHandleStepAcceptTime = currentStep.AcceptTime;
             }
             //
             // workflow.UpdateCurrentStepWhenHandle(currentStep, current.OrgAreaCode, current.OrgAreaName, current.OrgLevel);
@@ -1921,7 +1926,7 @@ namespace Hotline.FlowEngine.Workflows
 
             //需求调整:归档时当前节点显示为归档节点
             workflow.UpdateCurrentStepWhenHandle(endStep, current.OrgAreaCode, current.OrgAreaName, current.OrgLevel);
-            workflow.CurrentStepAcceptTime = endStep.AcceptTime.Value;
+            workflow.CurrentStepAcceptTime = endStep.AcceptTime;
 
             // workflow.UpdateActualStepWhenHandle(endStep, current.OrgAreaCode, current.OrgAreaName, current.OrgLevel);
             // workflow.ActualHandleStepAcceptTime = endStep.AcceptTime.Value;
@@ -2435,6 +2440,7 @@ namespace Hotline.FlowEngine.Workflows
                 var topStartCsStep = GetCsLoopStartStep(workflow, startStep);
                 countersignId = topStartCsStep.CountersignId;
             }
+
             var countersign = await CreateCountersignAsync(current, workflow, startStep,
                 dto.NextHandlers.Select(d => new Kv(d.Key, d.Value)).ToList(), flowAssignType,
                 counterSignType, expiredTime, countersignId, cancellationToken);