using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Microsoft.AspNetCore.Mvc;
using YGNT.QuestionLibrary.Questions.Dto;
using YGNT.QuestionLibrary.Tasks.Dto.PaperProduce;
using YGNT.QuestionLibrary.Tasks.Dto.QuestionResolve;

namespace YGNT.QuestionLibrary.Tasks
{
    /// <summary>
    /// 试题解析任务管理
    /// </summary>
    public interface IQuestionResolveTaskAppService : IApplicationService
    {
        /// <summary>
        /// 查询用户试题解析任务列表
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        Task<PagedResultDto<UserQuestionResoleTaskDto>> GetListAsync(SearchPaperProduceTaskInputDto search);

        /// <summary>
        /// 获取任务所解析完成的试题
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<ResoleTaskQuestionDto>> GetTaskQuestionsAsync(long id);

        /// <summary>
        /// 获取试题详情(结构)
        /// </summary>
        /// <param name="resoleTaskQuestionId"></param>
        /// <returns></returns>
        Task<QuestionInfoDto> GetInfoAsync(long resoleTaskQuestionId);

        /// <summary>
        /// 下载任务所解析的文件
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<object> GetTaskFileAsync(long id);

        /// <summary>
        /// 重试
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task ReTryAsync(long id);

        /// <summary>
        /// 确认导入任务解析试题
        /// </summary>
        /// <param name="taskId">任务id</param>
        /// <param name="affirms"></param>
        /// <returns></returns>
        Task AffirmTaskQuestionAsync(long taskId, List<AffirmTaskQuestionDto> affirms);

        /// <summary>
        /// 删除任务
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(long id);
    }
}