|
@@ -8,8 +8,12 @@
|
|
|
package cn.com.qmth.examcloud.core.print.service;
|
|
|
|
|
|
import cn.com.qmth.examcloud.core.print.common.jpa.SqlWrapper;
|
|
|
+import cn.com.qmth.examcloud.core.print.entity.ObjectiveQuestionStructure;
|
|
|
+import cn.com.qmth.examcloud.core.print.entity.SubjectiveQuestionStructure;
|
|
|
+import cn.com.qmth.examcloud.core.print.enums.QuesStructType;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.common.ExamCourseInfo;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.common.ExamInfo;
|
|
|
+import cn.com.qmth.examcloud.core.print.service.bean.questionstructure.PaperQuestionStructureInfo;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -76,4 +80,40 @@ public class CommonService {
|
|
|
return this.getExamCourseList(orgId, examId, null, null);
|
|
|
}
|
|
|
|
|
|
+ public PaperQuestionStructureInfo findStructureByPaperId(String paperId) {
|
|
|
+ // just mock data todo
|
|
|
+ PaperQuestionStructureInfo info = new PaperQuestionStructureInfo();
|
|
|
+
|
|
|
+ ObjectiveQuestionStructure objective = new ObjectiveQuestionStructure();
|
|
|
+ objective.setExamId(1L);
|
|
|
+ objective.setCourseId(1L);
|
|
|
+ objective.setCourseCode("123456");
|
|
|
+ objective.setCourseName("测试课程");
|
|
|
+ objective.setPaperId("abc");
|
|
|
+ objective.setPaperName("测试试卷");
|
|
|
+ objective.setPaperType("A");
|
|
|
+ objective.setQuestionType(QuesStructType.SINGLE_ANSWER_QUESTION.name());
|
|
|
+ objective.setAnswer("1");
|
|
|
+ objective.setSectionNum(1);
|
|
|
+ objective.setUnitNum(1);
|
|
|
+ objective.setUnitScore(2.0);
|
|
|
+ info.addObjective(objective);
|
|
|
+
|
|
|
+ SubjectiveQuestionStructure subjective = new SubjectiveQuestionStructure();
|
|
|
+ subjective.setExamId(1L);
|
|
|
+ subjective.setCourseId(1L);
|
|
|
+ subjective.setCourseCode("123456");
|
|
|
+ subjective.setCourseName("测试课程");
|
|
|
+ subjective.setPaperId("abc");
|
|
|
+ subjective.setPaperName("测试试卷");
|
|
|
+ subjective.setPaperType("A");
|
|
|
+ subjective.setSectionNum(1);
|
|
|
+ subjective.setSectionName("简答题");
|
|
|
+ subjective.setUnitNum(1);
|
|
|
+ subjective.setUnitScore(2.0);
|
|
|
+ info.addSubjective(subjective);
|
|
|
+
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+
|
|
|
}
|