package com.ruoyi.school.course.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.school.course.domain.ScClaTime;
import com.ruoyi.school.course.domain.req.time.ReqClaTimeCount;

/**
 * <p>
 * 排课信息 服务类
 * </p>
 *
 * @author zhangby
 * @since 2020-09-16
 */
public interface IScClaTimeService extends IService<ScClaTime> {

    /**
     * 删除 状态为 待上课 的排课信息
     * @param ruleId
     * @param claId
     * @param tenantId
     * @return
     */
    boolean deleteUnBeginTime(Long ruleId, String tenantId);

    /**
     * 排课总数量
     * @param reqClaTimeCount
     * @return
     */
    Integer claTimeCount(ReqClaTimeCount reqClaTimeCount);

    /**
     * 预约数量
     * @param ruleId
     * @param claId
     * @return
     */
    Integer selectBookCount( Long ruleId,  String courseTimeId);

    /**
     * 检查教师冲突
     * @param teacherId
     * @param date
     * @param startTime
     * @param endTime
     * @param excludeScheduleId
     * @return
     */
    boolean checkTeacherConflict(Long teacherId, String date, String startTime, String endTime, String excludeScheduleId);

    /**
     * 检查教室冲突
     * @param classroomId
     * @param date
     * @param startTime
     * @param endTime
     * @param excludeSchedule
     * @return
     */
    boolean checkClassroomConflict(Long classroomId, String date, String startTime, String endTime, String excludeSchedule);

}
