package cn.com.qmth.examcloud.core.questions.service;

import cn.com.qmth.examcloud.core.questions.service.bean.extract.ExtractConfigPaper;
import cn.com.qmth.examcloud.question.commons.core.paper.DefaultPaper;
import cn.com.qmth.examcloud.question.commons.core.question.DefaultQuestion;
import cn.com.qmth.examcloud.support.cache.bean.ExtractConfigCacheBean;
import cn.com.qmth.examcloud.support.cache.bean.ExtractConfigPaperCacheBean;

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

/**
 * @author weiwenhai
 * @date 2018.8.15
 * @company qmth
 * @describle 调卷规则远程接口
 */
public interface ExtractConfigProviderService {

    /**
     * 获取调卷规则信息
     */
    public ExtractConfigCacheBean getExtractConfig(Long examId, String courseCode);

    /**
     * 获取调卷规则调取的试卷结构
     */
    public ExtractConfigPaperCacheBean getExtractConfigPaper(Long examId, String courseCode, String groupCode, String paperId);

    /**
     * 根据调卷规则获取试卷结构
     */
    public ExtractConfigPaper getDefaultPaper(Long examId, String courseCode, String groupCode);

    /**
     * 根据调卷规则获取某个试题
     */
    public DefaultQuestion getDefaultQuestion(Long examId, String courseCode, String groupCode, String questionId);

    /**
     * 获取某份试卷的试卷结构
     */
    public DefaultPaper getBaseDefaultPaper(String paperId);

    /**
     * 根据试题id集合获取试题对象集合
     *
     * @param questionIds
     * @return
     */
    public Map<String, DefaultQuestion> getDefaultQuestions(Set<String> questionIds);

    /**
     * 根据试题id查询试题答案
     *
     * @param questionId
     * @return
     */
    public List<String> getAnswer(String questionId);

    /**
     * 根据试卷id查询主观题与客观题数量
     *
     * @param paperId
     * @return
     */
    public String getQuestionStructure(String paperId) throws Exception;

}