using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenAuth.App.Config
{
    /// <summary>
    /// 获取等待任务
    /// </summary>
    /// <param name="processId">流程进程ID</param>
    /// <param name="unitId">流程单元ID</param>
    /// <returns></returns>
    public delegate Task<List<WorkFlow.WFTask>> GetAwaitTaskListMethod(string processId, string unitId);
    /// <summary>
    /// 获取设置人员
    /// </summary>
    /// <param name="auditorList">人员配置信息</param>
    /// <param name="createUser">流程发起人</param>
    /// <param name="processId">流程进程实例ID</param>
    /// <param name="startNode">开始节点</param>
    /// <returns></returns>
    public delegate Task<List<WFUserInfo>> GetUserListMethod(List<WFAuditor> auditorList, WFUserInfo createUser, string processId, WFUnit startNode);
    /// <summary>
    /// 获取系统管理员
    /// </summary>
    /// <returns></returns>
    public delegate Task<List<WFUserInfo>> GetSystemUserListMethod();

    /// <summary>
    /// 获取单元上一次的审核人
    /// </summary>
    /// <param name="processId">流程进程ID</param>
    /// <param name="unitId">流程单元ID</param>
    /// <returns></returns>
    public delegate Task<List<WFUserInfo>> GetRreTaskUserListMethod(string processId, string unitId);

    /// <summary>
    /// 判断会签是否通过
    /// </summary>
    /// <param name="processId">流程进程ID</param>
    /// <param name="unitId">流程单元ID</param>
    /// <returns></returns>
    public delegate Task<bool> IsCountersignAgreeMethod(string processId, string unitId);

    /// <summary>
    /// 获取上一个流入节点（不是驳回流入的）
    /// </summary>
    /// <param name="processId">流程进程ID</param>
    /// <param name="unitId">流程单元ID</param>
    /// <returns></returns>
    public delegate Task<string> GetPrevUnitIdMethod(string processId, string unitId);
}
