package com.qmth.distributed.print.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.distributed.print.business.bean.dto.ExamTaskPrintDto;
import com.qmth.teachcloud.common.bean.dto.TaskPrintClassDto;
import com.qmth.distributed.print.business.bean.dto.TaskPrintExtendFieldsDto;
import com.qmth.distributed.print.business.bean.dto.TaskPrintHouseDto;
import com.qmth.distributed.print.business.bean.params.ExamTaskPrintParams;
import com.qmth.teachcloud.common.entity.BasicStudent;
import com.qmth.distributed.print.business.entity.ExamDetail;
import com.qmth.distributed.print.business.entity.ExamTaskPrint;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 以试卷作为起点生成考务数据 服务类
 * </p>
 *
 * @author xf
 * @since 2021-08-02
 */
public interface ExamTaskPrintService extends IService<ExamTaskPrint> {
    IPage<BasicStudent> listStudentByClass(String classId, Integer pageNumber, Integer pageSize);

    void remove(Long examTaskPrintId);

    ExamTaskPrintDto listTaskPrint(Long printPlanId, String courseCode, String paperNumber);

    ExamDetail createTaskPrint(ExamTaskPrint examTaskPrint);

    List<TaskPrintClassDto> listClass(String printPlanId, String courseCode, String paperNumber, Long examTaskPrintId);

    List<TaskPrintHouseDto> listHouse();

    List<TaskPrintExtendFieldsDto> listTaskPrintExtendFields();

    void submitTaskPrint(ExamTaskPrintParams examTaskPrintParams) throws IOException;

    /**
     * 查找考场
     * <p>
     * 入库申请里——新建任务，需要命题老师提交试卷+考务数据的模式，课程选择范围依然是从字典里取数据，列表显示当前用户所在机构下的全部课程，
     * 考务数据选择班级，优先查看基础信息里是否有当前用户自己在基础管理里创建的数据，如果没有选择字典
     * 如果基础管理创建的班级数据，无命题老师想选择的，选择班级下拉列表应该有一个选项，创建班级
     * </p>
     * @param courseCode 课程编号
     * @return 结果
     */
    List<TaskPrintClassDto> listExamTaskClass(String courseCode);
}
