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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qmth.teachcloud.report.business.bean.result.DimensionDetailResult;
import com.qmth.teachcloud.report.business.bean.result.ModuleDetailResult;
import com.qmth.teachcloud.report.business.entity.TAExamCourseRecordDio;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 参考课程考生各考查点维度分析表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2021-06-01
 */
public interface TAExamCourseRecordDioMapper extends BaseMapper<TAExamCourseRecordDio> {

    List<ModuleDetailResult> listDiosBySchoolIdAndExamIdAndCourseCodeAndModuleName(@Param("schoolId") Long schoolId, @Param("examId") String examId, @Param("courseCode") String courseCode, @Param("moduleName") String moduleName, @Param("studentCode") String studentCode);

    List<DimensionDetailResult> listSubDiosBySchoolIdAndExamIdAndStudentCodeAndCourseCodeAndModuleName(@Param("schoolId") Long schoolId, @Param("examId") String examId, @Param("studentCode") String studentCode, @Param("courseCode") String courseCode, @Param("moduleName") String moduleName);

    /**
     * 查询每个人的每个考察点情况
     *
     * @param schoolId   学校id
     * @param examId     考试id
     * @param courseCode 课程编号
     * @return 结果
     */
    Set<String> findDimensionTypesByCourseCode(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseCode") String courseCode);
}
