package com.qmth.distributed.print.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qmth.distributed.print.business.entity.ExamDetail;
import com.qmth.distributed.print.business.entity.ExamDetailCourse;
import com.qmth.teachcloud.common.bean.result.TbTaskDetailResult;
import com.qmth.teachcloud.common.entity.BasicCourse;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 考务数据（考场关联科目） Mapper 接口
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
public interface ExamDetailCourseMapper extends BaseMapper<ExamDetailCourse> {

    @SuppressWarnings("MybatisXMapperMethodInspection")
    List<Map<String, Object>> listClientByExamDetailIdAndStatus(@Param("examDetailId") Long examDetailId, @Param("status") String status);

    List<ExamDetailCourse> listByExamDetailIdAndStatus(@Param("examDetailId") Long examDetailId, @Param("status") String status);

    List<BasicCourse> listCoursesByPrintPlanId(@Param("param") String param, @Param("printPlanIdList") List<Long> printPlanIdList);

    List<ExamDetailCourse> listByPrintPlanIdAndCourseCodeAndPaperNumber(@Param("schoolId") Long schoolId, @Param("printPlanId") Long printPlanId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber);

    List<ExamDetailCourse> listExamDetailByExamIdAndPaperNumber(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("paperNumber") String paperNumber);

    TbTaskDetailResult getByExamDetailId(Long examDetailId);

    List<String> listPaperNumberByPrintPlanId(@Param("param") String param, @Param("printPlanIdList") List<Long> printPlanIdList, @Param("orgIds") Set<Long> orgIds);
}
