|
@@ -327,12 +327,12 @@ namespace Hotline.FlowEngine.Workflows
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (currentStep.IsInCountersign())
|
|
|
|
|
|
+ //操作为回到会签汇总时,更新开始会签节点的会签办理状态
|
|
|
|
+ if (currentStep.IsInCountersign() && dto.BackToCountersignEnd)
|
|
{
|
|
{
|
|
- //操作为回到会签汇总时,更新开始会签节点的会签办理状态
|
|
|
|
- if (dto.BackToCountersignEnd)
|
|
|
|
|
|
+ if (currentStep.IsCountersignEndStep)
|
|
{
|
|
{
|
|
- if (currentStep.IsCountersignEndStep)
|
|
|
|
|
|
+ if (!currentStep.IsTopCountersignEndStep(workflow.TopCountersignStepId))
|
|
{
|
|
{
|
|
//汇总节点(非顶级)
|
|
//汇总节点(非顶级)
|
|
var csStartStep =
|
|
var csStartStep =
|
|
@@ -341,25 +341,28 @@ namespace Hotline.FlowEngine.Workflows
|
|
throw new UserFriendlyException("未查询到会签开始节点");
|
|
throw new UserFriendlyException("未查询到会签开始节点");
|
|
PrevStepCsHandled(workflow, csStartStep, ref updateSteps);
|
|
PrevStepCsHandled(workflow, csStartStep, ref updateSteps);
|
|
}
|
|
}
|
|
- else
|
|
|
|
- {
|
|
|
|
- PrevStepCsHandled(workflow, currentStep, ref updateSteps);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- //会签中正常办理节点,更新会签members办理状态
|
|
|
|
- var countersign = workflow.Countersigns.FirstOrDefault(d => d.Id == currentStep.CountersignId);
|
|
|
|
- if (countersign is null)
|
|
|
|
- throw new UserFriendlyException(
|
|
|
|
- $"会签数据异常, workflowId: {currentStep.WorkflowId}, countersignId: {currentStep.CountersignId}",
|
|
|
|
- "会签数据异常");
|
|
|
|
- countersign.MemberHandled(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgId);
|
|
|
|
- //update cs
|
|
|
|
- await _workflowCountersignRepository.UpdateAsync(countersign, cancellationToken);
|
|
|
|
|
|
+ PrevStepCsHandled(workflow, currentStep, ref updateSteps);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //会签办理节点办理时更新会签members字段
|
|
|
|
+ if (currentStep.CountersignPosition is ECountersignPosition.Inner)
|
|
|
|
+ {
|
|
|
|
+ //会签中正常办理节点,更新会签members办理状态
|
|
|
|
+ var countersign =
|
|
|
|
+ workflow.Countersigns.FirstOrDefault(d => !d.IsCompleted() && d.Id == currentStep.CountersignId);
|
|
|
|
+ if (countersign is null)
|
|
|
|
+ throw new UserFriendlyException(
|
|
|
|
+ $"会签数据异常, workflowId: {currentStep.WorkflowId}, countersignId: {currentStep.CountersignId}",
|
|
|
|
+ "会签数据异常");
|
|
|
|
+ countersign.MemberHandled(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgId);
|
|
|
|
+ //update cs
|
|
|
|
+ await _workflowCountersignRepository.UpdateAsync(countersign, cancellationToken);
|
|
|
|
+ }
|
|
|
|
+
|
|
await _workflowStepRepository.UpdateRangeAsync(updateSteps, cancellationToken);
|
|
await _workflowStepRepository.UpdateRangeAsync(updateSteps, cancellationToken);
|
|
|
|
|
|
await NextTraceAsync(workflow, dto, currentStep, cancellationToken);
|
|
await NextTraceAsync(workflow, dto, currentStep, cancellationToken);
|
|
@@ -1083,7 +1086,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
|
|
|
if (workflow.IsInCountersign)
|
|
if (workflow.IsInCountersign)
|
|
{
|
|
{
|
|
- return dto.BackToCountersignEnd;
|
|
|
|
|
|
+ return !step.IsCountersignEndStep && dto.BackToCountersignEnd;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|