|
@@ -1,102 +1,108 @@
|
|
|
-package com.qmth.cqb.paper.service;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-import org.springframework.data.domain.Page;
|
|
|
-
|
|
|
-import cn.com.qmth.examcloud.common.dto.question.QuestionDto;
|
|
|
-import cn.com.qmth.examcloud.common.uac.entity.AccessUser;
|
|
|
-
|
|
|
-import com.qmth.cqb.paper.model.ExtractConfig;
|
|
|
-import com.qmth.cqb.paper.model.Paper;
|
|
|
-import com.qmth.cqb.utils.enums.PaperType;
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- * @author chenken
|
|
|
- * @date 2017年4月14日 下午6:08:15
|
|
|
- * @company QMTH
|
|
|
- * @description 调卷规则接口
|
|
|
- */
|
|
|
-public interface ExtractConfigService {
|
|
|
- /**
|
|
|
- * 根据考试ID和课程code获取规则
|
|
|
- * @param examId
|
|
|
- * @param courseCode
|
|
|
- * @return
|
|
|
- */
|
|
|
- public ExtractConfig findConfig(ExtractConfig extractConfig);
|
|
|
- /**
|
|
|
- * 根据ID获取调卷规则
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- public ExtractConfig findConfigById(String id);
|
|
|
- /**
|
|
|
- * 保存调卷规则
|
|
|
- * @param extractConfig
|
|
|
- * @param orgName 机构名称
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- public Map<String, String> saveExtractConfig(ExtractConfig extractConfig,AccessUser accessUser) throws Exception;
|
|
|
- /**
|
|
|
- * 按照设定调卷规则生成一套试卷
|
|
|
- * 1.根据ExamPaper集合得出每个类型下应该抽取的试卷,并返回 试卷类型--->试卷的map
|
|
|
- * 2.根据小题乱序和选项乱序规则,重组试卷
|
|
|
- * 3.得到试卷类型--->试卷ID的map,设置到finishedPaperIdMap属性中
|
|
|
- * 4.如果 是第一次生成试卷,保存finishedPaperIdMap
|
|
|
- * @param extractConfigId 规则 ID
|
|
|
- * @return 类型--->试卷ID的Map集合
|
|
|
- */
|
|
|
- public Map<String, String> makePaperByConfig(ExtractConfig extractConfig);
|
|
|
- /**
|
|
|
- * 根据给定试卷重组试卷,生成新的试卷
|
|
|
- * @param paper 给定的试卷
|
|
|
- * @param upSetQuestionOrder 小题乱序 1:乱序 0:不乱序
|
|
|
- * @param upSetOptionOrder 选项乱序 1:乱序 0:不乱序
|
|
|
- * @return
|
|
|
- */
|
|
|
- public Paper recombinationPaper(Paper paper,PaperType paperType,int upSetQuestionOrder,int upSetOptionOrder);
|
|
|
- /**
|
|
|
- * 根据courseNo和orgId取出所有被引用的试卷 ID
|
|
|
- * @return
|
|
|
- */
|
|
|
- public List<String> getExamPaperId(String courseCode,String orgId);
|
|
|
- /**
|
|
|
- * 根据考试ID,课程code,试卷类型生成试卷
|
|
|
- * @return PaperDto
|
|
|
- */
|
|
|
- public Map<String, Object> extractExamPaper(Long exam_id,String course_code,String group_code);
|
|
|
- /**
|
|
|
- * 根据paperDetailUnitId抽取单个试题
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- public QuestionDto extractExamQuestion(String examId,String courseCode,String groupCode,String paperDetailUnitId);
|
|
|
- /**
|
|
|
- * 判断试卷中的题是否都为客观题(单选、多选、判断),包括套题中的小题
|
|
|
- * 全为客观题返回true
|
|
|
- * 不全为客观题返回false
|
|
|
- * @param newPaper
|
|
|
- * @return
|
|
|
- */
|
|
|
- public boolean checkIsAllQbjectiveQuestion(String paperId);
|
|
|
- /**
|
|
|
- * 分页查询调卷规则
|
|
|
- * @param currentPage
|
|
|
- * @param pageSize
|
|
|
- * @param examId
|
|
|
- * @param courseNo
|
|
|
- * @return
|
|
|
- */
|
|
|
- public Page<ExtractConfig> findPageExtractConfig(int currentPage,int pageSize, Long examId, String courseNo, String courseLevel);
|
|
|
-
|
|
|
-}
|
|
|
+package com.qmth.cqb.paper.service;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+
|
|
|
+import cn.com.qmth.examcloud.common.dto.question.QuestionDto;
|
|
|
+import cn.com.qmth.examcloud.common.uac.entity.AccessUser;
|
|
|
+
|
|
|
+import com.qmth.cqb.paper.model.ExtractConfig;
|
|
|
+import com.qmth.cqb.paper.model.Paper;
|
|
|
+import com.qmth.cqb.utils.enums.PaperType;
|
|
|
+
|
|
|
+/**
|
|
|
+ *
|
|
|
+ * @author chenken
|
|
|
+ * @date 2017年4月14日 下午6:08:15
|
|
|
+ * @company QMTH
|
|
|
+ * @description 调卷规则接口
|
|
|
+ */
|
|
|
+public interface ExtractConfigService {
|
|
|
+ /**
|
|
|
+ * 根据考试ID和课程code获取规则
|
|
|
+ * @param examId
|
|
|
+ * @param courseCode
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ExtractConfig findConfig(ExtractConfig extractConfig);
|
|
|
+ /**
|
|
|
+ * 根据ID获取调卷规则
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ExtractConfig findConfigById(String id);
|
|
|
+ /**
|
|
|
+ * 保存调卷规则
|
|
|
+ * @param extractConfig
|
|
|
+ * @param orgName 机构名称
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ public Map<String, String> saveExtractConfig(ExtractConfig extractConfig,AccessUser accessUser) throws Exception;
|
|
|
+ /**
|
|
|
+ * 按照设定调卷规则生成一套试卷
|
|
|
+ * 1.根据ExamPaper集合得出每个类型下应该抽取的试卷,并返回 试卷类型--->试卷的map
|
|
|
+ * 2.根据小题乱序和选项乱序规则,重组试卷
|
|
|
+ * 3.得到试卷类型--->试卷ID的map,设置到finishedPaperIdMap属性中
|
|
|
+ * 4.如果 是第一次生成试卷,保存finishedPaperIdMap
|
|
|
+ * @param extractConfigId 规则 ID
|
|
|
+ * @return 类型--->试卷ID的Map集合
|
|
|
+ */
|
|
|
+ public Map<String, String> makePaperByConfig(ExtractConfig extractConfig);
|
|
|
+ /**
|
|
|
+ * 根据给定试卷重组试卷,生成新的试卷
|
|
|
+ * @param paper 给定的试卷
|
|
|
+ * @param upSetQuestionOrder 小题乱序 1:乱序 0:不乱序
|
|
|
+ * @param upSetOptionOrder 选项乱序 1:乱序 0:不乱序
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Paper recombinationPaper(Paper paper,PaperType paperType,int upSetQuestionOrder,int upSetOptionOrder);
|
|
|
+ /**
|
|
|
+ * 根据courseNo和orgId取出所有被引用的试卷 ID
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<String> getExamPaperId(String courseCode,String orgId);
|
|
|
+ /**
|
|
|
+ * 根据考试ID,课程code,试卷类型生成试卷
|
|
|
+ * @return PaperDto
|
|
|
+ */
|
|
|
+ public Map<String, Object> extractExamPaper(Long exam_id,String course_code,String group_code);
|
|
|
+ /**
|
|
|
+ * 根据paperDetailUnitId抽取单个试题
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public QuestionDto extractExamQuestion(String examId,String courseCode,String groupCode,String paperDetailUnitId);
|
|
|
+ /**
|
|
|
+ * 判断试卷中的题是否都为客观题(单选、多选、判断),包括套题中的小题
|
|
|
+ * 全为客观题返回true
|
|
|
+ * 不全为客观题返回false
|
|
|
+ * @param newPaper
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public boolean checkIsAllQbjectiveQuestion(String paperId);
|
|
|
+ /**
|
|
|
+ * 分页查询调卷规则
|
|
|
+ * @param currentPage
|
|
|
+ * @param pageSize
|
|
|
+ * @param examId
|
|
|
+ * @param courseNo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Page<ExtractConfig> findPageExtractConfig(int currentPage,int pageSize, Long examId, String courseNo, String courseLevel);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据试卷id获取试卷结构
|
|
|
+ * @return PaperDto
|
|
|
+ */
|
|
|
+ public Map<String, Object> extractPaper(String paperId);
|
|
|
+
|
|
|
+}
|