package com.xhkjedu.suser.mapper.gradeclass;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.suser.model.gradeclass.TClassTeacher;
import com.xhkjedu.suser.vo.gradeclass.ClassTeacherParams;
import com.xhkjedu.suser.vo.gradeclass.ClassTeacherVo;
import com.xhkjedu.suser.vo.gradeclass.ClassVo;
import com.xhkjedu.suser.vo.gradeclass.GradeVo;
import com.xhkjedu.suser.vo.system.TeacherRoleParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

@Repository
public interface ClassTeacherMapper extends TkMapper<TClassTeacher> {
    //学校教师列表
    List<ClassTeacherVo> findAll(@Param("teacher") TClassTeacher teacher);

    /**
     * 功能描述  当前年份教师任教班级
     *
     * @param *    @param teacherid
     * @param year
     * @param schoolid
     * @return java.util.List<com.xhkjedu.suser.vo.gradeclass.ClassVo>
     * @author WN
     * @date 2020/6/13
     */
    List<ClassVo> listTeacherClass(@Param("teacherid") Integer teacherid, @Param("year") Integer year
            , @Param("classtype") Integer classtype,@Param("schoolid") Integer schoolid);

    //当前年份教师任教班级
    List<ClassVo> listTeacherClass2(@Param("teacherid") Integer teacherid, @Param("year") Integer year
            ,@Param("schoolid") Integer schoolid);

    //删除教师任教班级
    void deleteByUserid(Integer userid, Integer year);

    //删除教师任教班级
    void deleteByUserid2(@Param("teacherids") String teacherids, Integer year);

    //教师任教班级id集合
    List<ClassVo> listClassesByUserid(Integer userid, Integer year, Integer classtype,Integer schoolid);

    //教师任教班级年级层级
    List<GradeVo> listGradeClassesByUserid(@Param("role") TeacherRoleParam role);

    /**
     * 获取作业学生列表
     * @Param [paperid]
     * @Author ywx
     * @Date 2020/7/10 15:51
     * @return java.util.List<java.util.Map>
     **/
    List<Map> listPaperStudent(Integer paperid);

    //获取作业教师列表
    List<Map> listPaperTeacher(@Param("paperid") Integer paperid,@Param("subjectid") String subjectid);

    /**
     *功能描述 年级下教师集合
     * @author WN
     * @date 2021/1/23
     * @param  * @param schoolid
     * @param gradeid
     * @return java.util.List<com.xhkjedu.model.gradeclass.TClassTeacher>
     */
    List<ClassTeacherVo> listTeachersByGradeid(Integer schoolid,Integer gradeid,Integer year);

    /**
     * 功能描述 获取年级科目下教师集合
     *
     * @param * @param ctp
     * @return java.util.List<com.xhkjedu.suser.vo.gradeclass.ClassTeacherVo>
     * @author WN
     * @date 2021/1/29
     */
    List<ClassTeacherVo> listTeahcersBySubjectGrade(@Param("ctp") ClassTeacherParams ctp);

    List<GradeVo> listGradeClassesByUserid2(@Param("role") TeacherRoleParam role);

    /**
     * 获取年级科目下老师(标识是否是本班教师)
     *
     * @param [ctp]
     * @return java.util.List<java.util.Map>
     * @author ywx
     * @date 2022/5/5 11:29
     */
    List<Map> listTeahcersBySubjectGrade2(@Param("ctp") ClassTeacherParams ctp);

    /**
     * @Description 获取教师权限年级下所有班级
     * @Param [role]
     * @Return java.util.List<com.xhkjedu.suser.vo.gradeclass.GradeVo>
     * @Author wn
     * @Date 2022/6/28 9:32
     **/
    List<GradeVo> listRoleGradeAllClass(@Param("role")TeacherRoleParam role);

    /**
     * @Description 教师权限班级学生
     * @Date 2023/12/19 10:41
     * @Author YWX
     * @Param [role]
     * @Return java.util.List<java.util.Map>
     **/
    List<Map> listClassStu(@Param("role") TeacherRoleParam role);
}
