package com.qmth.teachcloud.report.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.report.business.bean.dto.AnswerDetailBean;
import com.qmth.teachcloud.report.business.bean.dto.query.BasicAnswerDto;
import com.qmth.teachcloud.report.business.bean.dto.query.ValidAnswerDetailDto;
import com.qmth.teachcloud.report.business.bean.result.TBAnswerResult;
import com.qmth.teachcloud.report.business.entity.TBAnswer;

import java.util.LinkedList;
import java.util.List;

/**
 * <p>
 * 基础考生作答记录详情表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2021-06-01
 */
public interface TBAnswerService extends IService<TBAnswer> {

    /**
     * 根据试卷id查询参与该试卷的考生详细作答记录
     *
     * @param paperId 试卷id
     * @return 考生作答记录
     */
    List<BasicAnswerDto> findByPaperId(Long paperId);

    /**
     * 查找试卷结构效度数据
     *
     * @param examId     考试id
     * @param courseCode 课程编号
     * @return 结果
     */
    List<ValidAnswerDetailDto> findValid(Long examId, String courseCode);

    /**
     * 查找有效答案
     *
     * @param examId
     * @param courseCode
     * @return
     */
    List<TBAnswerResult> findValidAnswerDetail(Long examId, String courseCode);

    /**
     * 查找实际参加考试的详细作答记录
     *
     * @param examId  考试id
     * @param courseCode  课程编号
     * @return 键值对
     */
    LinkedList<AnswerDetailBean> findValidAnswerDetailWithPap(Long examId, String courseCode);
}
