wangwei 6 лет назад
Родитель
Сommit
7932ca6f41

+ 31 - 0
src/main/java/cn/com/qmth/examcloud/question/core/paper/DefaultPaper.java

@@ -0,0 +1,31 @@
+package cn.com.qmth.examcloud.question.core.paper;
+
+import java.util.List;
+
+/**
+ * 试卷结构
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class DefaultPaper implements Paper {
+
+	private static final long serialVersionUID = -5979287118960427883L;
+
+	/**
+	 * 分组集合
+	 */
+	private List<QuestionGroup> questionGroupList;
+
+	@Override
+	public List<QuestionGroup> getQuestionGroupList() {
+		return questionGroupList;
+	}
+
+	@Override
+	public void setQuestionGroupList(List<QuestionGroup> questionGroupList) {
+		this.questionGroupList = questionGroupList;
+	}
+
+}

+ 78 - 0
src/main/java/cn/com/qmth/examcloud/question/core/paper/DefaultQuestionGroup.java

@@ -0,0 +1,78 @@
+package cn.com.qmth.examcloud.question.core.paper;
+
+import java.util.List;
+
+import cn.com.qmth.examcloud.question.core.question.QuestionType;
+
+/**
+ * 题分组集合
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class DefaultQuestionGroup implements QuestionGroup {
+
+	private static final long serialVersionUID = 2149814711274942645L;
+
+	/**
+	 * 题组名称
+	 */
+	private String groupName;
+
+	/**
+	 * 题包装器集合
+	 */
+	private List<QuestionWrapper> QuestionWrapperList;
+
+	/**
+	 * 题组总分
+	 */
+	private Float groupScore;
+
+	/**
+	 * 题(集合)类型
+	 */
+	private QuestionType questionType;
+
+	@Override
+	public String getGroupName() {
+		return groupName;
+	}
+
+	@Override
+	public void setGroupName(String groupName) {
+		this.groupName = groupName;
+	}
+
+	@Override
+	public List<QuestionWrapper> getQuestionWrapperList() {
+		return QuestionWrapperList;
+	}
+
+	@Override
+	public void setQuestionWrapperList(List<QuestionWrapper> questionWrapperList) {
+		QuestionWrapperList = questionWrapperList;
+	}
+
+	@Override
+	public Float getGroupScore() {
+		return groupScore;
+	}
+
+	@Override
+	public void setGroupScore(Float groupScore) {
+		this.groupScore = groupScore;
+	}
+
+	@Override
+	public QuestionType getQuestionType() {
+		return questionType;
+	}
+
+	@Override
+	public void setQuestionType(QuestionType questionType) {
+		this.questionType = questionType;
+	}
+
+}

+ 72 - 0
src/main/java/cn/com/qmth/examcloud/question/core/paper/DefaultQuestionWrapper.java

@@ -0,0 +1,72 @@
+package cn.com.qmth.examcloud.question.core.paper;
+
+/**
+ * 题包装器
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class DefaultQuestionWrapper implements QuestionWrapper {
+
+	/**
+	 * 选项排序值
+	 */
+	private String[] optionPermutation;
+
+	/**
+	 * 题ID
+	 */
+	private String questionId;
+
+	/**
+	 * 题分数
+	 */
+	private Float questionScore;
+
+	/**
+	 * 得分
+	 */
+	private Float resultScore;
+
+	@Override
+	public String[] getOptionPermutation() {
+		return optionPermutation;
+	}
+
+	@Override
+	public void setOptionPermutation(String[] optionPermutation) {
+		this.optionPermutation = optionPermutation;
+	}
+
+	@Override
+	public String getQuestionId() {
+		return questionId;
+	}
+
+	@Override
+	public void setQuestionId(String questionId) {
+		this.questionId = questionId;
+	}
+
+	@Override
+	public Float getQuestionScore() {
+		return questionScore;
+	}
+
+	@Override
+	public void setQuestionScore(Float questionScore) {
+		this.questionScore = questionScore;
+	}
+
+	@Override
+	public Float getResultScore() {
+		return resultScore;
+	}
+
+	@Override
+	public void setResultScore(Float resultScore) {
+		this.resultScore = resultScore;
+	}
+
+}

+ 31 - 0
src/main/java/cn/com/qmth/examcloud/question/core/paper/Paper.java

@@ -0,0 +1,31 @@
+package cn.com.qmth.examcloud.question.core.paper;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 试卷结构
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public interface Paper extends Serializable {
+
+	/**
+	 * 获取题组集合
+	 *
+	 * @author WANGWEI
+	 * @return
+	 */
+	public List<QuestionGroup> getQuestionGroupList();
+
+	/**
+	 * 设置题组集合
+	 *
+	 * @author WANGWEI
+	 * @param questionGroupList
+	 */
+	public void setQuestionGroupList(List<QuestionGroup> questionGroupList);
+
+}

+ 81 - 0
src/main/java/cn/com/qmth/examcloud/question/core/paper/QuestionGroup.java

@@ -0,0 +1,81 @@
+package cn.com.qmth.examcloud.question.core.paper;
+
+import java.io.Serializable;
+import java.util.List;
+
+import cn.com.qmth.examcloud.question.core.question.QuestionType;
+
+/**
+ * 题分组集合
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public interface QuestionGroup extends Serializable {
+
+	/**
+	 * 获取组名
+	 *
+	 * @author WANGWEI
+	 * @return
+	 */
+	public String getGroupName();
+
+	/**
+	 * 设置组名
+	 *
+	 * @author WANGWEI
+	 * @param groupName
+	 */
+	public void setGroupName(String groupName);
+
+	/**
+	 * 获取题包装器集合
+	 *
+	 * @author WANGWEI
+	 * @return
+	 */
+	public List<QuestionWrapper> getQuestionWrapperList();
+
+	/**
+	 * 设置题包装器集合
+	 *
+	 * @author WANGWEI
+	 * @param questionWrapperList
+	 */
+	public void setQuestionWrapperList(List<QuestionWrapper> questionWrapperList);
+
+	/**
+	 * 获取题组总分
+	 *
+	 * @author WANGWEI
+	 * @return
+	 */
+	public Float getGroupScore();
+
+	/**
+	 * 设置题组总分
+	 *
+	 * @author WANGWEI
+	 * @param groupScore
+	 */
+	public void setGroupScore(Float groupScore);
+
+	/**
+	 * 获取题组题类型
+	 *
+	 * @author WANGWEI
+	 * @return
+	 */
+	public QuestionType getQuestionType();
+
+	/**
+	 * 设置题组类型
+	 *
+	 * @author WANGWEI
+	 * @param questionType
+	 */
+	public void setQuestionType(QuestionType questionType);
+
+}

+ 28 - 0
src/main/java/cn/com/qmth/examcloud/question/core/paper/QuestionWrapper.java

@@ -0,0 +1,28 @@
+package cn.com.qmth.examcloud.question.core.paper;
+
+/**
+ * 题包装器
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public interface QuestionWrapper {
+
+	public String[] getOptionPermutation();
+
+	public void setOptionPermutation(String[] optionPermutation);
+
+	public String getQuestionId();
+
+	public void setQuestionId(String questionId);
+
+	public Float getQuestionScore();
+
+	public void setQuestionScore(Float questionScore);
+
+	public Float getResultScore();
+
+	public void setResultScore(Float resultScore);
+
+}