wangwei 6 tahun lalu
induk
melakukan
779a6ef8ad

+ 58 - 0
src/main/java/cn/com/qmth/examcloud/question/core/paper/DefaultQuestionUnitWrapper.java

@@ -0,0 +1,58 @@
+package cn.com.qmth.examcloud.question.core.paper;
+
+import cn.com.qmth.examcloud.question.core.question.QuestionType;
+
+/**
+ * 题单元包装器
+ *
+ * @author WANGWEI
+ * @date 2018年8月16日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class DefaultQuestionUnitWrapper implements QuestionUnitWrapper {
+
+	private static final long serialVersionUID = 7584275153456817959L;
+
+	/**
+	 * 选项排序值
+	 */
+	private Integer[] optionPermutation;
+
+	/**
+	 * 题分数
+	 */
+	private Float questionScore;
+
+	/**
+	 * 题型
+	 */
+	private QuestionType questionType;
+
+	@Override
+	public Integer[] getOptionPermutation() {
+		return optionPermutation;
+	}
+
+	public void setOptionPermutation(Integer[] optionPermutation) {
+		this.optionPermutation = optionPermutation;
+	}
+
+	@Override
+	public Float getQuestionScore() {
+		return questionScore;
+	}
+
+	public void setQuestionScore(Float questionScore) {
+		this.questionScore = questionScore;
+	}
+
+	@Override
+	public QuestionType getQuestionType() {
+		return questionType;
+	}
+
+	public void setQuestionType(QuestionType questionType) {
+		this.questionType = questionType;
+	}
+
+}

+ 8 - 26
src/main/java/cn/com/qmth/examcloud/question/core/paper/DefaultQuestionWrapper.java

@@ -1,5 +1,7 @@
 package cn.com.qmth.examcloud.question.core.paper;
 
+import java.util.List;
+
 /**
  * 题包装器
  *
@@ -9,11 +11,6 @@ package cn.com.qmth.examcloud.question.core.paper;
  */
 public class DefaultQuestionWrapper implements QuestionWrapper {
 
-	/**
-	 * 选项排序值
-	 */
-	private Integer[] optionPermutation;
-
 	/**
 	 * 题ID
 	 */
@@ -24,27 +21,13 @@ public class DefaultQuestionWrapper implements QuestionWrapper {
 	 */
 	private Float questionScore;
 
-	/**
-	 * 得分
-	 */
-	private Float resultScore;
-
-	@Override
-	public Integer[] getOptionPermutation() {
-		return optionPermutation;
-	}
-
-	@Override
-	public void setOptionPermutation(Integer[] optionPermutation) {
-		this.optionPermutation = optionPermutation;
-	}
+	private List<DefaultQuestionUnitWrapper> questionUnitWrapperList;
 
 	@Override
 	public String getQuestionId() {
 		return questionId;
 	}
 
-	@Override
 	public void setQuestionId(String questionId) {
 		this.questionId = questionId;
 	}
@@ -54,19 +37,18 @@ public class DefaultQuestionWrapper implements QuestionWrapper {
 		return questionScore;
 	}
 
-	@Override
 	public void setQuestionScore(Float questionScore) {
 		this.questionScore = questionScore;
 	}
 
 	@Override
-	public Float getResultScore() {
-		return resultScore;
+	public List<? extends QuestionUnitWrapper> getQuestionUnitWrapperList() {
+		return questionUnitWrapperList;
 	}
 
-	@Override
-	public void setResultScore(Float resultScore) {
-		this.resultScore = resultScore;
+	public void setQuestionUnitWrapperList(
+			List<DefaultQuestionUnitWrapper> questionUnitWrapperList) {
+		this.questionUnitWrapperList = questionUnitWrapperList;
 	}
 
 }

+ 22 - 0
src/main/java/cn/com/qmth/examcloud/question/core/paper/QuestionUnitWrapper.java

@@ -0,0 +1,22 @@
+package cn.com.qmth.examcloud.question.core.paper;
+
+import java.io.Serializable;
+
+import cn.com.qmth.examcloud.question.core.question.QuestionType;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年8月16日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public interface QuestionUnitWrapper extends Serializable {
+
+	public Integer[] getOptionPermutation();
+
+	public Float getQuestionScore();
+
+	public QuestionType getQuestionType();
+
+}

+ 4 - 42
src/main/java/cn/com/qmth/examcloud/question/core/paper/QuestionWrapper.java

@@ -1,5 +1,7 @@
 package cn.com.qmth.examcloud.question.core.paper;
 
+import java.util.List;
+
 /**
  * 题包装器
  *
@@ -9,22 +11,6 @@ package cn.com.qmth.examcloud.question.core.paper;
  */
 public interface QuestionWrapper {
 
-	/**
-	 * 获取乱序值
-	 *
-	 * @author WANGWEI
-	 * @return
-	 */
-	public Integer[] getOptionPermutation();
-
-	/**
-	 * 设置乱序值
-	 *
-	 * @author WANGWEI
-	 * @param optionPermutation
-	 */
-	public void setOptionPermutation(Integer[] optionPermutation);
-
 	/**
 	 * 获取体ID
 	 *
@@ -33,14 +19,6 @@ public interface QuestionWrapper {
 	 */
 	public String getQuestionId();
 
-	/**
-	 * 设置题ID
-	 *
-	 * @author WANGWEI
-	 * @param questionId
-	 */
-	public void setQuestionId(String questionId);
-
 	/**
 	 * 获取题分数
 	 *
@@ -50,27 +28,11 @@ public interface QuestionWrapper {
 	public Float getQuestionScore();
 
 	/**
-	 * 设置题分数
-	 *
-	 * @author WANGWEI
-	 * @param questionScore
-	 */
-	public void setQuestionScore(Float questionScore);
-
-	/**
-	 * 获取得分
+	 * 获取题单元包装器
 	 *
 	 * @author WANGWEI
 	 * @return
 	 */
-	public Float getResultScore();
-
-	/**
-	 * 设置得分
-	 *
-	 * @author WANGWEI
-	 * @param resultScore
-	 */
-	public void setResultScore(Float resultScore);
+	public List<? extends QuestionUnitWrapper> getQuestionUnitWrapperList();
 
 }