package com.xhkjedu.sclass.mapper.classroom;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.sclass.model.classroom.TClassroomPaperStudent;
import org.apache.ibatis.annotations.Param;

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

/**
 * @author ywx
 * @classname RoomPaperStudentMapper
 * @description
 * @date 2020/7/15 16:06
 **/
public interface ClassroomPaperStudentMapper extends TkMapper<TClassroomPaperStudent> {
    //获取考试学生信息
    TClassroomPaperStudent findById(Integer psid);

    //更新用户得分
    void updateScantronStuScore(Integer psid);

    //判断该作业该班级是否存在未批改学生
    Integer getNotCorrect(Long paperid, Integer classid);

    //根据考试学生id获取考试是否完成批阅
    Integer getCheckedByPsId(Integer psid);

    //考试按人统计
    List<Map> listEStudent(Long paperid);

    //修改学生得分和批改状态
    void updateScantronStuScoreAndChecked(@Param("psid") Integer psid, @Param("stuscore") Double stuscore, @Param("pschecked") Integer pschecked);

    void batchUpdateScantronStuScoreAndChecked(@Param("students") List<TClassroomPaperStudent> students);
}
