|
@@ -266,27 +266,27 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
|
/// <summary>
|
|
|
/// 退回(返回前一节点)
|
|
|
/// </summary>
|
|
|
- public async Task PreviousAsync(PreviousWorkflowDto dto, CancellationToken cancellationToken)
|
|
|
+ public async Task<EFlowDirection> PreviousAsync(PreviousWorkflowDto dto, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var workflow = await _workflowDomainService.GetWorkflowAsync(dto.WorkflowId, withSteps: true,
|
|
|
withTraces: true, withCountersigns: true, cancellationToken: cancellationToken);
|
|
|
var user = await _userRepository.Queryable()
|
|
|
.Includes(x => x.Organization)
|
|
|
.FirstAsync(x => x.Id == _sessionContext.RequiredUserId, cancellationToken);
|
|
|
- await _workflowDomainService.PreviousAsync(workflow, dto, user, _sessionContext, cancellationToken);
|
|
|
+ return await _workflowDomainService.PreviousAsync(workflow, dto, user, _sessionContext, cancellationToken);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 工单退回(返回前一节点)
|
|
|
/// </summary>
|
|
|
- public async Task PreviousAsync(PreviousWorkflowDto dto, string userId, CancellationToken cancellationToken)
|
|
|
+ public async Task<EFlowDirection> PreviousAsync(PreviousWorkflowDto dto, string userId, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var workflow = await _workflowDomainService.GetWorkflowAsync(dto.WorkflowId, withSteps: true,
|
|
|
withTraces: true, withCountersigns: true, cancellationToken: cancellationToken);
|
|
|
var user = await _userRepository.Queryable()
|
|
|
.Includes(x => x.Organization)
|
|
|
.FirstAsync(x => x.Id == userId, cancellationToken);
|
|
|
- await _workflowDomainService.PreviousAsync(workflow, dto, user, _sessionContext, cancellationToken);
|
|
|
+ return await _workflowDomainService.PreviousAsync(workflow, dto, user, _sessionContext, cancellationToken);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -597,8 +597,8 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
|
nextDto.ReviewResult = EReviewResult.Failed;
|
|
|
nextDto.NextStepCode = endStepDefine.Code;
|
|
|
nextDto.NextStepName = endStepDefine.Name;
|
|
|
- nextDto.FlowDirection = _sessionContext.OrgIsCenter
|
|
|
- ? EFlowDirection.CenterToFile
|
|
|
+ nextDto.FlowDirection = _sessionContext.OrgIsCenter
|
|
|
+ ? EFlowDirection.CenterToFile
|
|
|
: EFlowDirection.OrgToFile;
|
|
|
|
|
|
await NextAsync(nextDto, _sessionContext, cancellationToken: cancellationToken);
|
|
@@ -651,7 +651,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
|
//根据汇总对象id找到被汇总节点
|
|
|
var summaryTargetStep = workflow.Steps.FirstOrDefault(d =>
|
|
|
d.Status == EWorkflowStepStatus.Handled &&
|
|
|
- d.StepType == EStepType.Normal &&
|
|
|
+ d.StepType == EStepType.Normal &&
|
|
|
d.Code == stepDefine.SummaryTargetCode &&
|
|
|
d.IsOrigin);
|
|
|
if (summaryTargetStep is null)
|