|
@@ -260,19 +260,22 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
{
|
|
{
|
|
var workflow = await _workflowDomainService.GetWorkflowAsync(dto.WorkflowId, withSteps: true,
|
|
var workflow = await _workflowDomainService.GetWorkflowAsync(dto.WorkflowId, withSteps: true,
|
|
withCountersigns: true, cancellationToken: cancellationToken);
|
|
withCountersigns: true, cancellationToken: cancellationToken);
|
|
- User user = await _userRepository.Queryable().Includes(x => x.Organization)
|
|
|
|
- .Where(x => x.Id == _sessionContext.RequiredUserId).FirstAsync();
|
|
|
|
|
|
+ var user = await _userRepository.Queryable()
|
|
|
|
+ .Includes(x => x.Organization)
|
|
|
|
+ .FirstAsync(x => x.Id == _sessionContext.RequiredUserId, cancellationToken);
|
|
await _workflowDomainService.PreviousAsync(workflow, dto, user, cancellationToken);
|
|
await _workflowDomainService.PreviousAsync(workflow, dto, user, cancellationToken);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 工单退回(返回前一节点)
|
|
/// 工单退回(返回前一节点)
|
|
/// </summary>
|
|
/// </summary>
|
|
- public async Task OrderPreviousAsync(PreviousWorkflowDto dto, string userId, CancellationToken cancellationToken)
|
|
|
|
|
|
+ public async Task PreviousAsync(PreviousWorkflowDto dto, string userId, CancellationToken cancellationToken)
|
|
{
|
|
{
|
|
var workflow = await _workflowDomainService.GetWorkflowAsync(dto.WorkflowId, withSteps: true,
|
|
var workflow = await _workflowDomainService.GetWorkflowAsync(dto.WorkflowId, withSteps: true,
|
|
withCountersigns: true, cancellationToken: cancellationToken);
|
|
withCountersigns: true, cancellationToken: cancellationToken);
|
|
- User user = await _userRepository.Queryable().Includes(x => x.Organization).Where(x => x.Id == userId).FirstAsync();
|
|
|
|
|
|
+ var user = await _userRepository.Queryable()
|
|
|
|
+ .Includes(x => x.Organization)
|
|
|
|
+ .FirstAsync(x => x.Id == userId, cancellationToken);
|
|
await _workflowDomainService.PreviousAsync(workflow, dto, user, cancellationToken);
|
|
await _workflowDomainService.PreviousAsync(workflow, dto, user, cancellationToken);
|
|
}
|
|
}
|
|
|
|
|