using Exam.Share.Dtos.Trains;
using Exam.Share.ViewResponses.Train;
using Hotline.Exams.Trains;
using Hotline.Repository.SqlSugar.Exam.Interface;
using Hotline.Share.Dtos.Trains;
using Hotline.Share.Requests.Train;
using Hotline.Share.ViewResponses.Trains;

namespace Hotline.Application.Exam.Interface.Train
{
    public interface ITrainRecordService:IQueryService<TrainRecordViewResponse,TrainRecordDto,TrainRecordPagedRequest>,IApiService<AddTrainRecordDto,UpdateTrainRecordDto,ExamTrainRecord>
    {
        /// <summary>
        /// 结束培训
        /// </summary>
        /// <param name="completeTrainRecordDto"></param>
        /// <returns></returns>
        Task CompleteTrainRecordAsync(CompleteTrainRecordDto completeTrainRecordDto,CancellationToken cancellationToken);


        /// <summary>
        /// 初次培训
        /// </summary>
        /// <param name="addUserTrainItemDto"></param>
        /// <returns></returns>
        Task<TrainPracticeDto> TrainAsync(AddTrainDto addTrainDto, CancellationToken cancellationToken);

        /// <summary>
        /// 获取培训习题
        /// </summary>
        /// <param name="trainPracticeRequest"></param>
        /// <returns></returns>
        Task<TrainPracticeDto> GetTrainPracticeAsync(TrainPracticeRequest trainPracticeRequest);

        /// <summary>
        /// 获取培训习题
        /// </summary>
        /// <param name="trainPracticeRequest"></param>
        /// <returns></returns>
        Task<SimpleTrainPracticeDto> GetSimpleTrainPracticeAsync(TrainPracticeRequest trainPracticeRequest);

        /// <summary>
        /// 完成培训课件学习
        /// </summary>
        /// <param name="completeTrainPracticeDto"></param>
        /// <returns></returns>
        Task CompleteTrainKnowladgeAsync(CompleteTrainKnowladgeDto completeTrainPracticeDto, CancellationToken cancellationToken);

        /// <summary>
        /// 统计培训结果
        /// </summary>
        /// <param name="trainResultReportPagedRequest"></param>
        /// <returns></returns>
        Task<TrainResultPagedViewResponse> AnalysisTrainResult(TrainResultReportPagedRequest trainResultReportPagedRequest);

        /// <summary>
        /// 计算培训结果比例
        /// </summary>
        /// <param name="trainResultReportPagedRequest"></param>
        /// <returns></returns>
        Task<TrainResultRateViewResponse> CalcuteAnalysisRate(TrainResultReportPagedRequest trainResultReportPagedRequest);
    }
}
