package com.keao.edu.user.service;


import com.keao.edu.common.entity.HttpResponseResult;
import com.keao.edu.common.page.PageInfo;
import com.keao.edu.common.service.BaseService;
import com.keao.edu.user.api.entity.ExamRoom;
import com.keao.edu.user.dto.ExamRoomDto;
import com.keao.edu.user.dto.ExamRoomListDto;
import com.keao.edu.user.dto.ExamRoomStatisticsDto;
import com.keao.edu.user.page.ExamRoomListQueryInfo;
import com.keao.edu.user.page.ExamRoomQueryInfo;

import java.util.List;

public interface ExamRoomService extends BaseService<Long, ExamRoom> {

    /**
     * 获取教师考试列表
     * @param queryInfo
     * @return
     */
    PageInfo<ExamRoomListDto> queryExamRoomPage(ExamRoomListQueryInfo queryInfo);

    /**
     * @describe 获取考级项目教室列表
     * @author Joburgess
     * @date 2020.07.12
     * @return com.keao.edu.common.page.PageInfo<com.keao.edu.user.dto.ExamRoomDto>
     */
    PageInfo<ExamRoomDto> queryExamRooms(ExamRoomQueryInfo queryInfo);

    /**
     * @describe 创建教室
     * @author Joburgess
     * @date 2020.06.23
     * @param examRoom:
     * @return com.keao.edu.user.api.entity.ExamRoom
     */
    void createExamRoom(ExamRoom examRoom);

    /**
     * @describe 更新教室信息
     * @author Joburgess
     * @date 2020.06.23
     * @param examRoom:
     * @return com.keao.edu.user.api.entity.ExamRoom
     */
    ExamRoom updateExamRoom(ExamRoom examRoom);

    /**
     * @describe 删除教室
     * @author Joburgess
     * @date 2020.06.24
     * @param examRoomIds:
     * @return void
     */
    void deleteExamRooms(Integer organId,String examRoomIds);

    /**
     * @describe 发送考试安排
     * @author Joburgess
     * @date 2020.06.29
     * @return void
     */
    HttpResponseResult sendExamPlan(Integer organId, Integer examId, Integer operatorId);

    /**
     * @describe 明日考试提醒
     * @author Joburgess
     * @date 2020.07.22
     * @return void
     */
    void tomorrowExamPlanRemind(String day);

    /**
     * @describe 获取考场统计信息
     * @author Joburgess
     * @date 2020.06.30
     * @param organId:
     * @param examId:
     * @return com.keao.edu.user.dto.ExamRoomStatisticsDto
     */
    ExamRoomStatisticsDto getExamRoomStatisticsInfo(Integer organId, Long examId);

    /**
     * @describe 教师教室冲突检测
     * @author Joburgess
     * @date 2020.07.07
     * @param examRooms:
     * @return void
     */
    void checkRoomTeachers(List<ExamRoom> examRooms);

    /**
     * @describe 获取报名学员可加入教室列表
     * @author Joburgess
     * @date 2020.07.08
     * @param registId:
     * @return java.util.List<com.keao.edu.user.api.entity.ExamRoom>
     */
    List<ExamRoom> getStudentEnableJoinRoom(Long registId);

    /**
     * 开启（关闭）考场
     * @param examRoomId
     * @param openFlag
     */
    void changeExamRoom(Long examRoomId, Integer openFlag);

    /**
     * @describe 强制关闭考场
     * @author Joburgess
     * @date 2020.07.30
     * @param examRoomId: 考场编号
     * @return com.keao.edu.common.entity.HttpResponseResult
     */
    HttpResponseResult forceCloseExamRoom(Long examRoomId);

    /**
     * @describe 清理未关闭考场
     * @author Joburgess
     * @date 2020.07.30
     * @return void
     */
    void cleanExamRoom();
}
