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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.report.business.bean.result.*;
import com.qmth.teachcloud.report.business.entity.TAExamCourse;
import com.qmth.teachcloud.report.business.enums.OrderEnum;
import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;

import java.util.Map;

/**
 * <p>
 * 考试课程维度分析表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2021-06-01
 */
public interface TAExamCourseService extends IService<TAExamCourse> {

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


    ExamCourseResult getOverview(Long semesterId, Long examId, String courseCode);

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

    GradeDistributeFinalResult getGradeDistribute(Long semesterId, Long examId, String courseCode);

    /**
     * 考查课程考试分析接口
     *
     * @param schoolId
     * @param semesterId
     * @param examId
     * @param courseCode
     * @param collegeId
     * @return
     */
    CollegeAndCourseResult surveyInspectAnalyseView(Long schoolId, Long semesterId, Long examId, String courseCode, Long collegeId);

    /**
     * 开课课程考试总览图表接口
     *
     * @param schoolId
     * @param semesterId
     * @param examId
     * @param courseCode
     * @param collegeId
     * @return
     */
    SurveyTeacherViewResult surveyTeacherView(Long schoolId, Long semesterId, Long examId, String courseCode, Long collegeId);

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

    /**
     * 开课课程考试总览-试题难度得分情况分析接口
     *
     * @param schoolId
     * @param semesterId
     * @param examId
     * @param courseCode
     * @param collegeId
     * @param teacherId
     * @return
     */
    DimensionAnalyzeResult surveyTeacherQuestionView(Long schoolId, Long semesterId, Long examId, String courseCode, Long collegeId, Long teacherId);

    /**
     * 开课课程考试总览-各难度水平题目上的作答分析接口
     *
     * @param schoolId
     * @param semesterId
     * @param examId
     * @param courseCode
     * @param collegeId
     * @param teacherId
     * @return
     */
    QuestionInfoResult surveyTeacherQuestionAnswerView(Long schoolId, Long semesterId, Long examId, String courseCode, Long collegeId, Long teacherId);

    /**
     * 赋分试算
     *
     * @param examId      考试id
     * @param courseCode  课程编号
     * @param coefficient 赋分系数
     * @return 结果
     */
    TrialCalculationResult trialCalculate(Long examId, String courseCode, String coefficient);

    /**
     * 导出课程分析接口
     *
     * @param examId
     * @param semesterId
     * @param schoolId
     * @param courseCode
     */
    void courseExport(Long examId, Long semesterId, Long schoolId, String courseCode) throws Exception;
}
