package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.dto.CourseScheduleResponse;
import com.ym.mec.biz.dal.dto.StudentAttendanceDto;
import com.ym.mec.biz.dal.dto.StudentPersonalAttendanceDto;
import com.ym.mec.biz.dal.entity.StudentAttendance;
import com.ym.mec.biz.dal.enums.SignStatusEnum;
import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
import com.ym.mec.biz.dal.page.CourseHomeworkQueryInfo;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.page.QueryInfo;
import com.ym.mec.common.service.BaseService;

import java.util.Map;

public interface StudentAttendanceService extends BaseService<Long, StudentAttendance> {

	/**
	 * @Author: Joburgess
	 * @Date: 2019/9/11
	 * 批量插入学生上课签到信息
	 */
	void addStudentAttendances(StudentAttendanceDto studentAttendanceInfo);

	/**
	 * @describe 更新学生点名信息
	 * @author Joburgess
	 * @date 2020/1/17
	 * @param studentAttendanceInfo:
	 * @return void
	 */
	void updateStudentAttendances(StudentAttendanceDto studentAttendanceInfo);

	/**
	 * @describe 获取当前课程的学生
	 * @author Joburgess
	 * @date 2019/10/19
	 * @param queryInfo: 查询参数
	 * @return java.util.Map<java.lang.String,java.lang.Object>
	 */
	Map<String, Object> getCurrentCourseStudents(QueryInfo queryInfo);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/9/16
	 * 获取学生个人签到信息
	 */
	PageInfo<StudentPersonalAttendanceDto> getStudentPersonalAttendances(QueryInfo queryInfo);

	/**
	 * 请假
	 * @param userId 用户编号
	 * @param courseScheduleId 课程编号
	 * @param remark 请假理由
	 * @return
	 */
	boolean leave(Integer userId, Long courseScheduleId, String remark);

	/**
	 * @describe 历史考勤详情
	 * @author Joburgess
	 * @date 2019/10/28
	 * @param queryInfo: 请求参数
	 * @return java.lang.Object
	 */
	PageInfo statisticsList(CourseHomeworkQueryInfo queryInfo);

	/**
	 * @describe 历史考勤头部信息
	 * @author Joburgess
	 * @date 2019/10/28
	 * @param classGroupId: 班级编号
	 * @return com.ym.mec.biz.dal.dto.CourseScheduleResponse
	 */
	CourseScheduleResponse getStatisticsInfo(Integer classGroupId);

	/**
	 * 线上课学生考勤
	 * @param courseScheduleId
	 * @param userId
	 * @param statusEnum
	 */
	void addStudentAttendanceRecord(Integer courseScheduleId, Integer userId, StudentAttendanceStatusEnum statusEnum,SignStatusEnum signStatusEnum);

	/**
	 * 某节课所有学员签到状态
	 * @param queryInfo
	 * @return
	 */
	PageInfo<StudentAttendance> findStudentAttendance(QueryInfo queryInfo);

	/**
	 * 修复连堂课学生签到记录
	 * @param month
	 */
    void repairStudentAttendance(Integer month);
}
