package com.xhkjedu.smarking.mapper.exam;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.smarking.model.exam.MsClass;
import com.xhkjedu.smarking.vo.exam.CTeacherVo;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description 阅卷考试班级表 Mapper 接口
 * @Author auto
 * @Date 2024-10-15
 */
public interface MsClassMapper extends TkMapper<MsClass> {
    //获取班级基本信息列表
    List<MsClass> listByClassIds(@Param("classids") List<Integer> classids);

    //考试班级
    List<Map<String,Object>> listByExamId(@Param("examid") Integer examid,@Param("subjectid") String subjectid);

    //考试关联学校班级
    List<Map<String,Object>> listSchoolClassByExamId(@Param("schoolid") Integer schoolid,@Param("examid") Integer examid);

    //获取学校所有教师
    List<CTeacherVo> listTeacherBySchoolId(@Param("schoolid") Integer schoolid);

    //获取教师科目
    List<CTeacherVo> listSubjectByTeacherIds(@Param("teacherids") String teacherids);

    //获取科目列表
    List<CTeacherVo> listSubjectBySubjectIds(@Param("subjectids") String subjectids);

    //学校教师查找
    List<Map> listSearchTeacher(@Param("usernames") String[] usernames,@Param("examid") Integer examid);

    //按班设置教师列表
    List<Map> listClassTeacher(@Param("classids") String classids,@Param("subjectid") String subjectid);

    void batchSave(@Param("list") List<MsClass> classes);

    //班级选择列表（创建考试用）
    List<Map> listSchoolClass(@Param("schoolid") Integer schoolid, @Param("year") Integer year,@Param("teacherid") Integer teacherid);

    //考试班级名称和人数列表
    List<Map> listNameAndNumByExamId(@Param("examid") Integer examid);

    //获取考试关联学校
    List<Map<String, Object>> listSchoolByExamId(@Param("schoolid") Integer schoolid,@Param("examid") Integer examid);

    //获取考试关联班级
    List<MsClass> listClassByExamId(@Param("examid") Integer examid);
    //考试科目关联不安及
    List<MsClass> listClassByExamidAndSubjectid(@Param("examid") Integer examid, @Param("subjectid") String subjectid);

    //获取考试关联班级数量
    Integer getClassNumByExamId(@Param("examid") Integer examid);
}
