using System.Collections.Generic;
using System.Threading.Tasks;
using GxPress.Auth;
using GxPress.Repository.Interface;
using GxPress.Repository.Interface.WorkFlow;
using GxPress.Repository.Interface.WorkProcess;
using GxPress.Result.App;
using GxPress.Result.App.Flow;
using GxPress.Service.Interface;
using GxPress.Service.Interface.Doc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace GxPress.Api.AdminControllers
{
///
/// 通讯录用户信息
///
[Route("api/admin/flow")]
[ApiController]
[Authorize]
public partial class AdminFlowController : ControllerBase
{
private readonly ILogger _logger;
private readonly ILoginContext _loginContext;
private readonly IProcessGroupRepository _processGroupRepository;
private readonly IProcessRepository _processRepository;
private readonly IProcessService _processService;
private readonly IFlowService _flowService;
private readonly IUserRepository _userRepository;
private readonly IDepartmentRepository _departmentRepository;
private readonly IFlowTodoRepository _flowTodoRepository;
private readonly IFlowRepository _flowRepository;
private readonly IDocService docService;
public AdminFlowController(ILogger logger, ILoginContext loginContext, IProcessService processService, IFlowService flowService, IUserRepository userRepository, IDepartmentRepository departmentRepository, IProcessGroupRepository processGroupRepository, IProcessRepository processRepository, IFlowTodoRepository flowTodoRepository, IFlowRepository flowRepository, IDocService docService)
{
_logger = logger;
_loginContext = loginContext;
_processService = processService;
_flowService = flowService;
_userRepository = userRepository;
_departmentRepository = departmentRepository;
_processGroupRepository = processGroupRepository;
_processRepository = processRepository;
_flowTodoRepository = flowTodoRepository;
_flowRepository = flowRepository;
this.docService = docService;
}
///
/// 获取详情
///
///
///
[HttpGet("{id}")]
[AllowAnonymous]
public async Task Get(int id)
{
return await _flowService.GetFlowResult(id);
}
[HttpGet]
[AllowAnonymous]
public async Task> List()
{
var options = new List