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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.teachcloud.report.business.bean.result.ExamCourseResult;
import com.qmth.teachcloud.report.business.bean.result.TAExamCourseCollegeTeacherResult;
import com.qmth.teachcloud.report.business.bean.result.TAExamCourseResult;
import com.qmth.teachcloud.report.business.entity.TAExamCourse;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 考试课程维度分析表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2021-06-01
 */
public interface TAExamCourseMapper extends BaseMapper<TAExamCourse> {

    /**
     * 开课课程考试总览列表接口
     *
     * @param iPage
     * @param examId
     * @param semester
     * @param schoolId
     * @param column
     * @param order
     * @return
     */
    IPage<TAExamCourseResult> surveyTeacherList(IPage<Map> iPage, @Param("examId") Long examId, @Param("semesterId") Long semesterId, @Param("schoolId") Long schoolId, @Param("collegeId") Long collegeId, @Param("column") String column, @Param("order") String order);

    ExamCourseResult getOverview(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode);

    /**
     * 赋分管理列表接口
     *
     * @param iPage
     * @param schoolId
     * @param examId
     * @param courseCode
     * @param publishStatus
     * @param collegeIds
     * @param column
     * @param order
     * @return
     */
    IPage<TAExamCourseResult> surveyAspointsList(IPage<Map> iPage, @Param("schoolId") Long schoolId, @Param("examId") Long examId,
                                                 @Param("courseCode") String courseCode,
                                                 @Param("publishStatus") String publishStatus,
                                                 @Param("semesterId") Long semesterId,
                                                 @Param("collegeIds") List<Long> collegeIds, @Param("column") String column, @Param("order") String order);

    Map<String, String> getScoreAndRate(@Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode);

    /**
     * 开课课程考试总览-教师各课堂成绩排名接口
     *
     * @param iPage
     * @param schoolId
     * @param semester
     * @param examId
     * @param courseCode
     * @param column
     * @param order
     * @return
     */
    IPage<TAExamCourseCollegeTeacherResult> surveyTeacherTeacherView(IPage<Map> iPage, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("column") String column, @Param("order") String order);
}
