package com.qmth.teachcloud.mark.service;

import com.qmth.teachcloud.common.bean.marking.CardJpgResult;
import com.qmth.teachcloud.mark.bean.UriVo;
import com.qmth.teachcloud.mark.bean.answercard.AnswerCardSaveDomain;
import com.qmth.teachcloud.mark.bean.answercard.AnswerCardVo;
import com.qmth.teachcloud.mark.entity.ScanAnswerCard;

import java.util.List;

import org.springframework.web.multipart.MultipartFile;

import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 题卡卡格式表 服务类
 * </p>
 *
 * @author xf
 * @since 2023-09-22
 */
public interface ScanAnswerCardService extends IService<ScanAnswerCard> {

    ScanAnswerCard findByExamAndNumber(Long examId, Integer cardNumber);

    List<AnswerCardVo> cardList(Long examId, String coursePaperId);

    ScanAnswerCard cardSave(AnswerCardSaveDomain domain);

    Integer findMaxCardNumberByExamId(Long examId);

    void cardDelete(ScanAnswerCard card);

    UriVo adapteUpload(Long examId, String coursePaperId, Integer cardNumber, String md5, Integer dpi,
                       MultipartFile file, String remark);

    AnswerCardVo cardGet(Long examId, Integer number);

    ScanAnswerCard getByExamIdAndCoursePaperIdAndCardId(Long examId, String coursePaperId, Long cardId);

    List<ScanAnswerCard> listByExamIdAndPaperNumber(Long examId, String paperNumber);

    void deleteByExamIdAndPaperNumber(Long examId, String paperNumber);

    List<CardJpgResult> listPageImage(Long examId, String paperNumber, String paperType);
}
