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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qmth.teachcloud.report.business.bean.result.*;
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("semesterId") Long semesterId, @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
     * @param inspectCollegeId
     * @return
     */
    List<SurveyTeacherDistributionResult> surveyTeacherDistribution(@Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("filter") boolean filter, @Param("inspectCollegeId") Long inspectCollegeId);

    /**
     * 我的课堂考试分析-考试概况，查找我的课堂数据
     *
     * @param schoolId
     * @param semesterId
     * @param examId
     * @param courseCode
     * @param inspectCollegeId
     * @param teacherId
     * @return
     */
    List<TeachCourseResult> findTeacherInspect(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("inspectCollegeId") Long inspectCollegeId, @Param("teacherId") Long teacherId);
}
