|
@@ -337,49 +337,51 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
}
|
|
|
|
|
|
//操作为回到会签汇总时,更新开始会签节点的会签办理状态
|
|
|
- //if (currentStep.IsInCountersign() && dto.BackToCountersignEnd)
|
|
|
- //{
|
|
|
- // var targetStep = currentStep;
|
|
|
- // if (currentStep.IsCountersignEndStep)
|
|
|
- // {
|
|
|
- // var csStartStep = workflow.Steps.FirstOrDefault(d => d.Id == currentStep.CountersignStartStepId);
|
|
|
- // if (csStartStep is null)
|
|
|
- // throw new UserFriendlyException("未查询到会签开始节点");
|
|
|
- // targetStep = csStartStep;
|
|
|
- // }
|
|
|
-
|
|
|
- // PrevStepCsHandled(workflow, targetStep, ref updateSteps);
|
|
|
- //}
|
|
|
-
|
|
|
- if (currentStep.IsInCountersign())
|
|
|
+ if (currentStep.IsInCountersign() && dto.BackToCountersignEnd)
|
|
|
{
|
|
|
if (currentStep.IsCountersignEndStep)
|
|
|
{
|
|
|
+ //汇总节点(非顶级)
|
|
|
var csStartStep = workflow.Steps.FirstOrDefault(d => d.Id == currentStep.CountersignStartStepId);
|
|
|
if (csStartStep is null)
|
|
|
throw new UserFriendlyException("未查询到会签开始节点");
|
|
|
-
|
|
|
- if (currentStep.IsTopCountersignEndStep(workflow.TopCountersignStepId))
|
|
|
- {
|
|
|
- var csStep = csStartStep.CountersignSteps.FirstOrDefault(d => d.StepId == currentStep.Id);
|
|
|
- if (csStep is null)
|
|
|
- throw new UserFriendlyException("未查询到当前待办节点");
|
|
|
- csStep.Completed = true;
|
|
|
- updateSteps.Add(csStartStep);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- //汇总节点(非顶级)
|
|
|
- PrevStepCsHandled(workflow, csStartStep, ref updateSteps);
|
|
|
- }
|
|
|
+ PrevStepCsHandled(workflow, csStartStep, ref updateSteps);
|
|
|
}
|
|
|
- else if (dto.BackToCountersignEnd)
|
|
|
+ else
|
|
|
{
|
|
|
- //普通节点里面流向汇总节点的
|
|
|
PrevStepCsHandled(workflow, currentStep, ref updateSteps);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //if (currentStep.IsInCountersign())
|
|
|
+ //{
|
|
|
+ // if (currentStep.IsCountersignEndStep)
|
|
|
+ // {
|
|
|
+ // var csStartStep = workflow.Steps.FirstOrDefault(d => d.Id == currentStep.CountersignStartStepId);
|
|
|
+ // if (csStartStep is null)
|
|
|
+ // throw new UserFriendlyException("未查询到会签开始节点");
|
|
|
+
|
|
|
+ // if (currentStep.IsTopCountersignEndStep(workflow.TopCountersignStepId))
|
|
|
+ // {
|
|
|
+ // var csStep = csStartStep.CountersignSteps.FirstOrDefault(d => d.StepId == currentStep.Id);
|
|
|
+ // if (csStep is null)
|
|
|
+ // throw new UserFriendlyException("未查询到当前待办节点");
|
|
|
+ // csStep.Completed = true;
|
|
|
+ // updateSteps.Add(csStartStep);
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // //汇总节点(非顶级)
|
|
|
+ // PrevStepCsHandled(workflow, csStartStep, ref updateSteps);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else if (dto.BackToCountersignEnd)
|
|
|
+ // {
|
|
|
+ // //普通节点里面流向汇总节点的
|
|
|
+ // PrevStepCsHandled(workflow, currentStep, ref updateSteps);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+
|
|
|
|
|
|
await _workflowStepRepository.UpdateRangeAsync(updateSteps, cancellationToken);
|
|
|
|