package com.xjrsoft.module.base.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseService;
import com.xjrsoft.module.base.dto.BaseClassCoursePageDto;
import com.xjrsoft.module.base.dto.ClassCourseReuseDto;
import com.xjrsoft.module.base.entity.BaseClassCourse;
import com.xjrsoft.module.base.entity.ClassCourseTextbook;
import com.xjrsoft.module.base.entity.CourseBookInfo;
import com.xjrsoft.module.base.vo.BaseClassCoursePageVo;

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

/**
* @title: 班级课程
* @Author brealinxx
* @Date: 2024-06-04
* @Version 1.0
*/

public interface IBaseClassCourseService extends MPJBaseService<BaseClassCourse> {

    Page<BaseClassCoursePageVo> getPage(Page<BaseClassCoursePageVo> objectPage, BaseClassCoursePageDto dto);


    List<CourseBookInfo> getAllCourseBook(Long[] classIds, Long subjectGroupId, Long semester);

    List<CourseBookInfo> getSelectedCourseBook(Long[] subjectGroupId, Long semester);


    Boolean updateAddCourseBook(ClassCourseTextbook dto);
    void updateRemoveCourseBook(Long classId, Long courseId, Long textbookId);

    void markExistingRecordsAsDeleted(Long newClassId, Long sourceClassId);

    Boolean duplicateCourseBook(ClassCourseReuseDto dto);

    Map<String, Map<String, Object>> getSemesterTree();

    Long GetClassIdByName(String name);

    Long GetCourseIdByName(String name);

    Long GetTextbookIdByName(String name);

    Long GetBaseSemesterIdByName(String name);

    boolean checkExits(Long classId, Long courseId, Long textbookId);

    boolean checkExitsWithoutTextbook(Long classId, Long courseId);
}
