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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.teachcloud.report.business.bean.result.SurveyTeacherViewResult;
import com.qmth.teachcloud.report.business.bean.result.TAExamCourseTeacherResult;
import com.qmth.teachcloud.report.business.bean.result.TeacherClassRankResult;
import com.qmth.teachcloud.report.business.bean.result.TeacherMyClassRankResult;
import com.qmth.teachcloud.report.business.entity.TAExamCourseCollegeTeacher;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 参考课程学院下授课教师维度分析表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2021-06-01
 */
public interface TAExamCourseCollegeTeacherMapper extends BaseMapper<TAExamCourseCollegeTeacher> {

    IPage<TeacherClassRankResult> listClassRank(@Param("page") Page<TeacherClassRankResult> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("inspectCollegeId") Long inspectCollegeId, @Param("collegeIds") List<Long> collegeIds, @Param("column") String column, @Param("order") String order);

    IPage<TeacherMyClassRankResult> listMyClassRank(@Param("page") Page<TeacherMyClassRankResult> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("teacherId") Long teacherId, @Param("courseCode") String courseCode, @Param("inspectCollegeId") Long inspectCollegeId, @Param("column") String column, @Param("order") String order);

    IPage<TeacherClassRankResult> listAllTeacherClassRank(@Param("page") Page<TeacherClassRankResult> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("inspectCollegeId") Long inspectCollegeId, @Param("courseCode") String courseCode, @Param("teacherId") Long teacherId, @Param("collegeIds") List<Long> collegeIds, @Param("column") String column, @Param("order") String order);

    /**
     * 查询老师得分
     *
     * @param examId
     * @param courseCode
     * @param collegeId
     * @return
     */
    List<TAExamCourseTeacherResult> findTeacherInfo(@Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("collegeId") Long collegeId);

    IPage<TeacherClassRankResult> listTeacherClassRank(@Param("page") Page<TeacherClassRankResult> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("column") String column, @Param("order") String order);

    /**
     * 我的课堂考试分析图表接口
     *
     * @param schoolId
     * @param semester
     * @param examId
     * @param courseCode
     * @param inspectCollegeId
     * @return
     */
    SurveyTeacherViewResult teacherView(@Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("inspectCollegeId") Long inspectCollegeId);
}
