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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qmth.teachcloud.report.business.bean.result.ExamRecordResult;
import com.qmth.teachcloud.report.business.bean.result.ExamStudentResult;
import com.qmth.teachcloud.report.business.bean.result.SurveyTeacherDistributionResult;
import com.qmth.teachcloud.report.business.bean.result.SynthesisResult;
import com.qmth.teachcloud.report.business.entity.TAExamCourseRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 参考课程考生成绩维度表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2021-06-01
 */
public interface TAExamCourseRecordMapper extends BaseMapper<TAExamCourseRecord> {

    List<TAExamCourseRecord> listExamCourseRecord(@Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode);

    ExamStudentResult getStudent(@Param("schoolId") Long schoolId, @Param("examId") String examId, @Param("studentCode") String studentCode, @Param("courseCode") String courseCode);

    SynthesisResult getSynthesisResult(@Param("schoolId") Long schoolId, @Param("examId") String examId, @Param("studentCode") String studentCode, @Param("courseCode") String courseCode);

    /**
     * 查询考生信息
     *
     * @param examId
     * @param courseCode
     * @return
     */
    List<ExamRecordResult> findExamRecordByExamIdAndCourseCode(@Param("examId") Long examId, @Param("courseCode") String courseCode);

    /**
     * 开课学院分数段
     *
     * @param examId
     * @param courseCode
     * @param filter
     * @return
     */
    List<SurveyTeacherDistributionResult> surveyTeacherDistribution(@Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("filter") boolean filter);
}
