|
@@ -675,7 +675,8 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
{
|
|
|
var currentStep = GetUnHandleStep(workflow.Steps, _sessionContext.RequiredOrgId, _sessionContext.RequiredUserId);
|
|
|
//var (currentStepBox, currentStep) = GetUnCompleteStep(workflow.Steps, _sessionContext.RequiredOrgId, _sessionContext.RequiredUserId);
|
|
|
-
|
|
|
+
|
|
|
+ await HandleStepAsync(currentStep, workflow, dto, null, cancellationToken);
|
|
|
|
|
|
var endStepDefine = workflow.WorkflowDefinition.FindEndStepDefine();
|
|
|
|
|
@@ -874,7 +875,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
//}
|
|
|
//new
|
|
|
private async Task HandleStepAsync(WorkflowStep step, Workflow workflow, BasicWorkflowDto dto,
|
|
|
- ECounterSignType counterSignType, CancellationToken cancellationToken)
|
|
|
+ ECounterSignType? counterSignType, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (step.Status is EWorkflowStepStatus.Handled)
|
|
|
throw UserFriendlyException.SameMessage("当前节点状态已办理");
|
|
@@ -882,6 +883,9 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
if (step.StepType is EStepType.End)
|
|
|
throw new UserFriendlyException("当前流程已流转到最终步骤");
|
|
|
|
|
|
+ if (dto.IsStartCountersign && !counterSignType.HasValue)
|
|
|
+ throw new UserFriendlyException("缺少会签类型参数");
|
|
|
+
|
|
|
if (step.Status is EWorkflowStepStatus.WaitForAccept)
|
|
|
await AcceptAsync(workflow,
|
|
|
_sessionContext.RequiredUserId, _sessionContext.UserName,
|
|
@@ -891,7 +895,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
|
|
|
//创建会签数据
|
|
|
if (dto.IsStartCountersign)
|
|
|
- await StartCountersignAsync(workflow, step, dto, counterSignType, cancellationToken);
|
|
|
+ await StartCountersignAsync(workflow, step, dto, counterSignType.Value, cancellationToken);
|
|
|
|
|
|
//办理参数
|
|
|
_mapper.Map(dto, step);
|