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.CardCustDto;
import com.qmth.distributed.print.business.bean.dto.CardDetailDto;
import com.qmth.distributed.print.business.bean.dto.SyncExamCardDto;
import com.qmth.distributed.print.business.bean.params.ExamCardParams;
import com.qmth.distributed.print.business.bean.params.GenericExamCardParams;
import com.qmth.distributed.print.business.entity.ExamCard;
import com.qmth.teachcloud.common.bean.params.ArraysParams;

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

/**
 * <p>
 * 题卡 服务类
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
public interface ExamCardService extends IService<ExamCard> {

    String saveExamCard(ExamCardParams examCardParams) throws Exception;

    IPage<CardCustDto> listCardCust(String schoolId, String status, String paperNumber, String userId, Long applyStartTime, Long applyEndTime, Long finishStartTime, Long finishEndTime, Integer pageNumber, Integer pageSize);

    String saveExamCardCust(ExamCardParams examCardParams);

    CardDetailDto getCardDetail(Long cardId);

    ExamCard getOneByTemplateId(Long id);

    boolean usedCardByTemplateId(Long id);

    List<ExamCard> listSelectCard(String courseCode, Long cardRuleId);

    void downloadFiles(HttpServletResponse response, ArraysParams arraysParams) throws Exception;

    List<SyncExamCardDto> listSyncCardByCourseCodeAndPaperNumber(Long schoolId, String courseCode, String paperNumber);

    IPage<ExamCard> listPage(String type, String title, String createMethod, Boolean enable, Long createStartTime, Long createEndTime, Integer pageNumber, Integer pageSize);

    Long saveGeneric(GenericExamCardParams params) throws Exception;

    Boolean deleteGeneric(Long id);
}
