package com.keao.edu.user.service;

import com.keao.edu.common.page.PageInfo;
import com.keao.edu.common.service.BaseService;
import com.keao.edu.user.api.enums.StudentExamResultApiDto;
import com.keao.edu.user.dto.RecordNotify;
import com.keao.edu.user.dto.StudentExamResultStatisticsDto;
import com.keao.edu.user.entity.StudentExamResult;
import com.keao.edu.user.page.StudentExamResultQueryInfo;

public interface StudentExamResultService extends BaseService<Long, StudentExamResult> {

    /**
     * @describe 查询考试结果
     * @author Joburgess
     * @date 2020.06.30
     * @param queryInfo:
     * @return com.keao.edu.common.page.PageInfo<com.keao.edu.user.entity.StudentExamResult>
     */
    PageInfo<StudentExamResult> queryStudentExamResult(StudentExamResultQueryInfo queryInfo);

    /**
     * @describe 更新考试结果
     * @author Joburgess
     * @date 2020.06.30
     * @param studentExamResult:
     * @return void
     */
    void updateStudentExamResult(StudentExamResult studentExamResult);

    /**
     * @describe 考试结果确认推送
     * @author Joburgess
     * @date 2020.07.23
     * @param examId:
     * @return void
     */
    void examResultConfirmPush(Long examId);

    /**
     * @describe 计算考场中学员平均分
     * @author Joburgess
     * @date 2020.07.30
     * @param examRoomId:
     * @return void
     */
    void calculateStudentExamAvgScore(Long examRoomId);

    StudentExamResultStatisticsDto getStudentExamResultStatisticsInfo(Integer organId, Integer examId);

    /**
     * 获取考试结果
     * @param id
     * @return
     */
    StudentExamResultApiDto getStudentExamResultApiDto(Long id);

    /**
     * 确认考生
     * @param examRegistrationId
     */
    void confirmStudent(Long examRegistrationId);

    /**
     * 修改学员考试状态
     * @param examRegistrationId
     * @param finishedExam
     */
    void updateFinishedExam(Long examRegistrationId, Integer finishedExam);

    /**
     * 录像结束回调
     * @param recordNotify
     */
    void recordSync(RecordNotify recordNotify);

    /**
     * 屏蔽指定用户
     * @param roomId
     */
    void shieldUserId(Long roomId,Integer shieldFlag);
}
