Răsfoiți Sursa

练习相关代码重构

lideyin 5 ani în urmă
părinte
comite
7d3f4773ca

+ 229 - 0
src/main/java/cn/com/qmth/examcloud/support/examing/ExamQuestion.java

@@ -0,0 +1,229 @@
+package cn.com.qmth.examcloud.support.examing;
+
+import java.io.Serializable;
+
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+
+import cn.com.qmth.examcloud.question.commons.core.question.AnswerType;
+import cn.com.qmth.examcloud.question.commons.core.question.QuestionType;
+
+/**
+ * @author chenken
+ * @date 2018/8/17 10:18
+ * @company QMTH
+ * @description 考生单题作答记录
+ */
+public class ExamQuestion implements Serializable{
+
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = -6141069483774400912L;
+	
+	/**
+     * 作答记录是否在mongo
+     */
+    private Boolean isInMongo;
+    
+    /**
+     * 作答记录在mongo中的id
+     */
+    private String examQuestionTempId;
+	
+	/**
+	 * 考试记录Data Id
+	 */
+    private Long examRecordDataId;
+    /**
+     * 大题号
+     */
+    private Integer mainNumber;
+    /**
+     * 原题ID
+     */
+    private String questionId;
+    /**
+     * 顺序
+     */
+    private Integer order;
+    /**
+     * 小题分数
+     */
+    private Double questionScore;
+    /**
+     * 小题类型
+     */
+    private QuestionType questionType;
+    /**
+     * 标准答案
+     */
+    private String correctAnswer;
+    /**
+     * 考生作答
+     */
+    private String studentAnswer;
+    /**
+     * 学生小题得分
+     */
+    private Double studentScore;
+    /**
+     * 是否作答
+     */
+    private Boolean isAnswer;
+    /**
+     * 是否标记
+     */
+    private Boolean isSign;
+    
+    /**
+	 * 选项排序值
+	 */
+	private Integer[] optionPermutation;
+	
+	/**
+	 * 音频播放次数
+	 */
+	private String audioPlayTimes;
+	/**
+	 * 题目作答类型
+	 */
+	@Enumerated(EnumType.STRING)
+	private AnswerType answerType;	
+	
+	public Long getExamRecordDataId() {
+		return examRecordDataId;
+	}
+	public void setExamRecordDataId(Long examRecordDataId) {
+		this.examRecordDataId = examRecordDataId;
+	}
+	public Integer getMainNumber() {
+		return mainNumber;
+	}
+	/**
+	 * 设置 大题号
+	 * @param mainNumber
+	 */
+	public void setMainNumber(Integer mainNumber) {
+		this.mainNumber = mainNumber;
+	}
+	public String getQuestionId() {
+		return questionId;
+	}
+	/**
+	 * 设置题库试题ID
+	 * @param questionId
+	 */
+	public void setQuestionId(String questionId) {
+		this.questionId = questionId;
+	}
+	public Integer getOrder() {
+		return order;
+	}
+	/**
+	 * 设置小题号
+	 * @param order
+	 */
+	public void setOrder(Integer order) {
+		this.order = order;
+	}
+	public String getStudentAnswer() {
+		return studentAnswer;
+	}
+	public void setStudentAnswer(String studentAnswer) {
+		this.studentAnswer = studentAnswer;
+	}
+	public Double getStudentScore() {
+		return studentScore;
+	}
+	/**
+	 * 设置考生得分
+	 * @param studentScore
+	 */
+	public void setStudentScore(Double studentScore) {
+		this.studentScore = studentScore;
+	}
+	public Double getQuestionScore() {
+		return questionScore;
+	}
+	/**
+	 * 设置试题分数
+	 * @param questionScore
+	 */
+	public void setQuestionScore(Double questionScore) {
+		this.questionScore = questionScore;
+	}
+	public QuestionType getQuestionType() {
+		return questionType;
+	}
+	/**
+	 * 设置题型
+	 * @param questionType
+	 */
+	public void setQuestionType(QuestionType questionType) {
+		this.questionType = questionType;
+	}
+	public Boolean getIsAnswer() {
+		return isAnswer;
+	}
+	public void setIsAnswer(Boolean isAnswer) {
+		this.isAnswer = isAnswer;
+	}
+	public Boolean getIsSign() {
+		return isSign;
+	}
+	public void setIsSign(Boolean isSign) {
+		this.isSign = isSign;
+	}
+
+	public String getCorrectAnswer() {
+		return correctAnswer;
+	}
+
+	public void setCorrectAnswer(String correctAnswer) {
+		this.correctAnswer = correctAnswer;
+	}
+
+	public Integer[] getOptionPermutation() {
+		return optionPermutation;
+	}
+
+	public void setOptionPermutation(Integer[] optionPermutation) {
+		this.optionPermutation = optionPermutation;
+	}
+
+	public String getAudioPlayTimes() {
+		return audioPlayTimes;
+	}
+
+	public void setAudioPlayTimes(String audioPlayTimes) {
+		this.audioPlayTimes = audioPlayTimes;
+	}
+
+	public AnswerType getAnswerType() {
+		return answerType;
+	}
+
+	public void setAnswerType(AnswerType answerType) {
+		this.answerType = answerType;
+	}
+    
+    public String getExamQuestionTempId() {
+        return examQuestionTempId;
+    }
+    
+    public void setExamQuestionTempId(String examQuestionTempId) {
+        this.examQuestionTempId = examQuestionTempId;
+    }
+    
+    public Boolean getIsInMongo() {
+        return isInMongo;
+    }
+    
+    public void setIsInMongo(Boolean isInMongo) {
+        this.isInMongo = isInMongo;
+    }
+
+	
+	
+}

+ 41 - 0
src/main/java/cn/com/qmth/examcloud/support/examing/ExamRecordPaperStruct.java

@@ -0,0 +1,41 @@
+package cn.com.qmth.examcloud.support.examing;
+
+import java.io.Serializable;
+
+import cn.com.qmth.examcloud.question.commons.core.paper.DefaultPaper;
+
+/**
+ * 
+ * @author  	chenken
+ * @date    	2018年8月27日 下午3:26:27
+ * @company 	QMTH
+ * @description ExamRecordPaper.java
+ */
+public class ExamRecordPaperStruct implements Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4672132535133881321L;
+
+	private String id;
+	
+	private DefaultPaper defaultPaper;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public DefaultPaper getDefaultPaper() {
+		return defaultPaper;
+	}
+
+	public void setDefaultPaper(DefaultPaper defaultPaper) {
+		this.defaultPaper = defaultPaper;
+	}
+	
+}

+ 48 - 0
src/main/java/cn/com/qmth/examcloud/support/examing/ExamRecordQuestions.java

@@ -0,0 +1,48 @@
+package cn.com.qmth.examcloud.support.examing;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author chenken
+ * @date 2018年9月3日 上午10:46:06
+ * @company QMTH
+ * @description 考试作答试题集合
+ */
+public class ExamRecordQuestions implements Serializable {
+    private static final long serialVersionUID = -1688201571728312142L;
+
+    private Long examRecordDataId;
+
+    private Date creationTime;
+
+    private List<ExamQuestion> examQuestions;
+
+    public Long getExamRecordDataId() {
+        return examRecordDataId;
+    }
+
+    public Date getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Date creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public void setExamRecordDataId(Long examRecordDataId) {
+        this.examRecordDataId = examRecordDataId;
+    }
+
+    
+    public List<ExamQuestion> getExamQuestions() {
+        return examQuestions;
+    }
+
+    
+    public void setExamQuestions(List<ExamQuestion> examQuestions) {
+        this.examQuestions = examQuestions;
+    }
+
+}