|
@@ -1132,17 +1132,28 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
|
|
|
|
if (currentStep.IsInCountersign())
|
|
|
{
|
|
|
- if (dto.BackToCountersignEnd)
|
|
|
+ if (currentStep.IsCountersignEndStep)
|
|
|
{
|
|
|
- var prevStep = workflow.Steps.FirstOrDefault(d => d.Id == currentStep.PrevStepId);
|
|
|
- if (prevStep is null)
|
|
|
- throw new UserFriendlyException($"未查询到当前节点的上级节点");
|
|
|
- return FlowAssignInfo.Create(prevStep.FlowAssignType.Value, prevStep.Handlers, isStartCountersign);
|
|
|
+ //汇总节点(非顶级)
|
|
|
+ var csStartStep = workflow.Steps.FirstOrDefault(d => d.Id == currentStep.CountersignStartStepId);
|
|
|
+ if (csStartStep is null)
|
|
|
+ throw new UserFriendlyException("未查询到会签开始节点");
|
|
|
+ return FlowAssignInfo.Create(csStartStep.FlowAssignType.Value, csStartStep.Handlers, isStartCountersign);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- //按会签策略判断,目前所有策略为org
|
|
|
- return FlowAssignInfo.Create(EFlowAssignType.Org, handlers, isStartCountersign);
|
|
|
+ if (dto.BackToCountersignEnd)
|
|
|
+ {
|
|
|
+ var prevStep = workflow.Steps.FirstOrDefault(d => d.Id == currentStep.PrevStepId);
|
|
|
+ if (prevStep is null)
|
|
|
+ throw new UserFriendlyException($"未查询到当前节点的上级节点");
|
|
|
+ return FlowAssignInfo.Create(prevStep.FlowAssignType.Value, prevStep.Handlers, isStartCountersign);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //按会签策略判断,目前所有策略为org
|
|
|
+ return FlowAssignInfo.Create(EFlowAssignType.Org, handlers, isStartCountersign);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|