package com.qmth.teachcloud.report.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.report.business.bean.result.TBExamCourseResult;
import com.qmth.teachcloud.report.business.entity.TBExamCourse;
import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;

import java.util.List;

/**
 * <p>
 * 考试科目表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2021-06-02
 */
public interface TBExamCourseService extends IService<TBExamCourse> {
    /**
     * 校验该考试科目是否不能继续进行教研分析流程
     *
     * @param examId     考试id
     * @param schoolId   学校id
     * @param courseCode 课程编号
     * @param courseName 课程名称
     * @return 是
     */
    boolean verifyExamCourseCantRun(Long examId, Long schoolId, String courseCode, String courseName);

    List<String> findEffectiveByExamId(Long examId, String courseCode);

    /**
     * 查询科目信息
     *
     * @param schoolId
     * @param examId
     * @param inspect
     * @param absent
     * @param current
     * @param status
     * @return
     */
    List<TBExamCourseResult> findCourseList(Long schoolId, Long examId, boolean inspect, Boolean absent, Boolean current, PublishStatusEnum status);

    /**
     * 查询科目信息
     *
     * @param schoolId
     * @param examId
     * @param absent
     * @param current
     * @param status
     * @return
     */
    List<TBExamCourseResult> findCourseList(Long schoolId, Long examId, Boolean absent, Boolean current, PublishStatusEnum status);

    /**
     * 创建课程
     *
     * @param schoolId         学校id
     * @param examId           考试id
     * @param courseCode       课程编号
     * @param courseName       课程名称
     * @param paperType        试卷类型
     * @param teachCollegeName 开课学院名称
     */
    void createCourse(Long schoolId, Long examId, String courseCode, String courseName, String paperType, String teachCollegeName);

    /**
     * 检验某课程是否完成已计算
     *
     * @param schoolId   学校id
     * @param examId     考试id
     * @param courseCode 课程编号
     * @return true:已完成过计算 false:未完成计算
     */
    boolean checkFinishCalculate(Long schoolId, Long examId, String courseCode);
}
