package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.dto.ClassDateAdjustDto;
import com.ym.mec.biz.dal.dto.CourseScheduleDto;
import com.ym.mec.biz.dal.dto.TeacherAttendanceDto;
import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
import com.ym.mec.biz.dal.entity.CourseSchedule;
import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
import com.ym.mec.biz.dal.enums.YesOrNoEnum;
import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.service.BaseService;

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

public interface CourseScheduleService extends BaseService<Long, CourseSchedule> {

    /**
     * @Author: Joburgess
     * @Date: 2019/9/10
     * 根据课程ID获取当前课程的信息
     */
    TeacherAttendanceDto getCurrentCourseDetail(Long courseID);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/16
     * @params [teacherAttendanceDto, userId]
     * @return YesOrNoEnum
     * @describe 判断该课程是否只能进行正常签到
     */
    YesOrNoEnum enableOnlyNormalAttendance(TeacherAttendanceDto teacherAttendanceDto, Long userId);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 批量插入课程计划
     */
    void batchAddCourseSchedule(List<CourseSchedule> courseSchedules);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 批量更新课程计划
     */
    void batchUpdateCourseSchedule(List<CourseSchedule> courseSchedules,Long musicGroupID);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 根据日期获取当日排课信息
     */
    List<CourseScheduleDto> getCourseSchedulesWithDate(Date classDate);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 根据日期获取当日排课信息
     */
    Map getStudentCourseSchedulesWithDate(Date classDate);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 根据日期获取当日排课信息
     */
    List<CourseScheduleDto> getTeacherCourseSchedulesWithDate(Date classDate);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 根据日期获取当日排课信息
     */
    PageInfo getCourseSchedulesWithDateByEdu(CourseScheduleQueryInfo queryInfo);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 根据月份获取乐团在该月有课的日期
     */
    List<Date> getCourseScheduleDateByMonth(Long musicGroupID, Date month);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 根据学生获取乐团在该月有课的日期
     */
    List<Date> getCourseScheduleDateByStudent(Date month, Integer isAttend);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/17
     * 获取教师在该月有课的日期
     */
    List<Date> getCourseScheduleDateByTeacher(Date month);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/11
     * @params [month]
     * @return java.util.List<java.util.Date>
     * @describe 获取
     */
    List<Date> getCourseScheduleDates(Date month);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/23
     * 课时调整
     */
    void classStartDateAdjust(ClassDateAdjustDto classDateAdjustDto);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/24
     * 课程交换
     */
    void courseSwap(Long courseScheduleId1,Long courseScheduleId2);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/14
     * @params [day1, day2]
     * @return void
     * @describe 对调两天的课程
     */
    void courseSwapWithDay(Date day1,Date day2);

    /**
     * 获取班级未开始的课程计划
     *
     * @param classGroupTeacherMapperList
     * @return
     */
    List<CourseSchedule> findClassGroupNoStartCourseSchedules(List<ClassGroupTeacherMapper> classGroupTeacherMapperList);


    /**
     * @Author: Joburgess
     * @Date: 2019/9/30
     * 获取学生上课记录
     */
    Object findStudentCourseScheduleRecords(StudentCourseScheduleRecordQueryInfo queryInfo);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [courseScheduleComplaints]
     * @return void
     * @describe 课程投诉
     */
    void courseScheduleCommplaint(CourseScheduleComplaints courseScheduleComplaints);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [courseScheduleComplaints]
     * @return void
     * @describe 课程投诉审核
     */
    void courseScheduleCommplaintAudit(CourseScheduleComplaints courseScheduleComplaints);
    
    /**
     * 更新课程至结束状态
     * @return
     */
    boolean updateCourseScheduleToOverStatus();
}