package com.qmth.paper.library.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.paper.library.common.entity.ExamStudent;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 学校id 服务类
 * </p>
 *
 * @author wangliang
 * @since 2021-08-02
 */
public interface ExamStudentService extends IService<ExamStudent> {
    /**
     * 学生基础信息分页查询
     */
    IPage<ExamStudent> findStudentPage(Long examId, String courseCode, String collegeName, String clazzName, String majorName, String queryParams, int pageNumber, int pageSize);

    /**
     * 新增/编辑 考生信息
     */
    void saveBasicStudent(ExamStudent basicStudent);

    /**
     * 删除考生
     */
    Boolean removeBasicStudentBatch(List<Long> ids);

    /**
     * 根据学号查询考生
     */
    ExamStudent getByExamIdAndCourseCodeAndStudentCode(Long examId, String courseCode, String studentCode);

    void dataImport(Long semesterId, Long examId, MultipartFile file);

    void updateBindCount(Long studentId);

    int countByExamIdAndCourseCode(Long examId, String courseCode);

    void downloadTemplate(HttpServletResponse response);

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

    List<ExamStudent> listByExamIdAndCourseCode(Long examId, String courseCode);

    ExamStudent saveExamStudentFromClient(ExamStudent examStudent);

    /**
     * 清除pdf文件（1.上传，2.纠错，3.旋转，4.清除数据，5.删除图片）
     * @param studentId
     */
    void clearPdfFilePath(Long studentId);

    boolean clearFilePath(Long studentId);
}