Browse Source

Merge branch 'branch_other' 5

deason 5 years ago
parent
commit
72ef378516

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

@@ -0,0 +1,56 @@
+package cn.com.qmth.examcloud.question.commons.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 class DefaultPaper implements Serializable {
+
+	private static final long serialVersionUID = -5979287118960427883L;
+
+	/**
+	 * 试卷名称
+	 */
+	private String name;
+
+	/**
+	 * 是否全是客观题
+	 */
+	private Boolean fullyObjective;
+
+	/**
+	 * 分组集合
+	 */
+	private List<DefaultQuestionGroup> questionGroupList;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Boolean getFullyObjective() {
+		return fullyObjective;
+	}
+
+	public void setFullyObjective(Boolean fullyObjective) {
+		this.fullyObjective = fullyObjective;
+	}
+
+	public List<DefaultQuestionGroup> getQuestionGroupList() {
+		return questionGroupList;
+	}
+
+	public void setQuestionGroupList(List<DefaultQuestionGroup> questionGroupList) {
+		this.questionGroupList = questionGroupList;
+	}
+
+}

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

@@ -0,0 +1,56 @@
+package cn.com.qmth.examcloud.question.commons.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 class DefaultQuestionGroup implements Serializable {
+
+	private static final long serialVersionUID = 2149814711274942645L;
+
+	/**
+	 * 题组名称
+	 */
+	private String groupName;
+
+	/**
+	 * 题包装器集合<br>
+	 */
+	private List<DefaultQuestionStructureWrapper> questionWrapperList;
+
+	/**
+	 * 题组总分
+	 */
+	private Double groupScore;
+
+	public String getGroupName() {
+		return groupName;
+	}
+
+	public void setGroupName(String groupName) {
+		this.groupName = groupName;
+	}
+
+	public List<DefaultQuestionStructureWrapper> getQuestionWrapperList() {
+		return questionWrapperList;
+	}
+
+	public void setQuestionWrapperList(List<DefaultQuestionStructureWrapper> questionWrapperList) {
+		this.questionWrapperList = questionWrapperList;
+	}
+
+	public Double getGroupScore() {
+		return groupScore;
+	}
+
+	public void setGroupScore(Double groupScore) {
+		this.groupScore = groupScore;
+	}
+
+}

+ 109 - 0
src/main/java/cn/com/qmth/examcloud/question/commons/core/paper/DefaultQuestionStructureWrapper.java

@@ -0,0 +1,109 @@
+package cn.com.qmth.examcloud.question.commons.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 class DefaultQuestionStructureWrapper implements Serializable {
+
+	private static final long serialVersionUID = 8423916951155451548L;
+
+	/**
+	 * 题ID
+	 */
+	private String questionId;
+
+	/**
+	 * 版本号
+	 */
+	private String version;
+
+	/**
+	 * 题分数
+	 */
+	private Double questionScore;
+
+	/**
+	 * 限制播放次数
+	 */
+	private Integer limitedPlayTimes;
+
+	/**
+	 * 已播放次数
+	 */
+	private Integer playedTimes;
+
+	/**
+	 * 作答限时
+	 */
+	private Long timeLimit;
+
+	/**
+	 * 题单元包装器
+	 */
+	private List<DefaultQuestionUnitWrapper> questionUnitWrapperList;
+
+	public String getQuestionId() {
+		return questionId;
+	}
+
+	public void setQuestionId(String questionId) {
+		this.questionId = questionId;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public Double getQuestionScore() {
+		return questionScore;
+	}
+
+	public void setQuestionScore(Double questionScore) {
+		this.questionScore = questionScore;
+	}
+
+	public Integer getLimitedPlayTimes() {
+		return limitedPlayTimes;
+	}
+
+	public void setLimitedPlayTimes(Integer limitedPlayTimes) {
+		this.limitedPlayTimes = limitedPlayTimes;
+	}
+
+	public Integer getPlayedTimes() {
+		return playedTimes;
+	}
+
+	public void setPlayedTimes(Integer playedTimes) {
+		this.playedTimes = playedTimes;
+	}
+
+	public Long getTimeLimit() {
+		return timeLimit;
+	}
+
+	public void setTimeLimit(Long timeLimit) {
+		this.timeLimit = timeLimit;
+	}
+
+	public List<DefaultQuestionUnitWrapper> getQuestionUnitWrapperList() {
+		return questionUnitWrapperList;
+	}
+
+	public void setQuestionUnitWrapperList(
+			List<DefaultQuestionUnitWrapper> questionUnitWrapperList) {
+		this.questionUnitWrapperList = questionUnitWrapperList;
+	}
+
+}

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

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

+ 57 - 0
src/main/java/cn/com/qmth/examcloud/question/commons/core/question/AnswerType.java

@@ -0,0 +1,57 @@
+package cn.com.qmth.examcloud.question.commons.core.question;
+
+/**
+ * 作答类型
+ *
+ * @author WANGWEI
+ * @date 2019年5月9日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public enum AnswerType {
+
+	STRICT("S", "严格作答(可程序判分.如判断,单选...)"),
+	//
+	DIVERSIFIED_TEXT("DT", "多元化文本(不可程序判分.如非严格填空,简答...)"),
+	//
+	SINGLE_VIDEO("SV", "单个视频"),
+	//
+	SINGLE_AUDIO("SA", "单个音频"),
+	//
+	SINGLE_FILE("SF", "单个文件"),
+	//
+	SINGLE_PICTURE("SP", "单个照片"),
+	//
+	MULTIPLE_PICTURES("MP", "多个照片");
+
+	// ===========================================================================
+
+	/**
+	 * 简码
+	 */
+	private String code;
+
+	/**
+	 * 描述
+	 */
+	private String desc;
+
+	/**
+	 * 构造函数
+	 *
+	 * @param code
+	 * @param desc
+	 */
+	private AnswerType(String code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+}

+ 82 - 0
src/main/java/cn/com/qmth/examcloud/question/commons/core/question/DefaultQuestion.java

@@ -0,0 +1,82 @@
+package cn.com.qmth.examcloud.question.commons.core.question;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * 题<完整题>
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class DefaultQuestion implements Serializable {
+
+	private static final long serialVersionUID = 195811114083691548L;
+
+	/**
+	 * 题ID
+	 */
+	private String id;
+
+	/**
+	 * 属性注释
+	 */
+	private Long rootOrgId;
+
+	/**
+	 * 是否脱离试卷存在
+	 */
+	private Boolean isolated;
+
+	/**
+	 * 主版本
+	 */
+	private DefaultQuestionStructure masterVersion;
+
+	/**
+	 * 扩展属性
+	 */
+	private Map<String, String> properties;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Boolean getIsolated() {
+		return isolated;
+	}
+
+	public void setIsolated(Boolean isolated) {
+		this.isolated = isolated;
+	}
+
+	public DefaultQuestionStructure getMasterVersion() {
+		return masterVersion;
+	}
+
+	public void setMasterVersion(DefaultQuestionStructure masterVersion) {
+		this.masterVersion = masterVersion;
+	}
+
+	public Map<String, String> getProperties() {
+		return properties;
+	}
+
+	public void setProperties(Map<String, String> properties) {
+		this.properties = properties;
+	}
+
+}

+ 29 - 0
src/main/java/cn/com/qmth/examcloud/question/commons/core/question/DefaultQuestionOption.java

@@ -0,0 +1,29 @@
+package cn.com.qmth.examcloud.question.commons.core.question;
+
+import java.io.Serializable;
+
+/**
+ * 选择题选项
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class DefaultQuestionOption implements Serializable {
+
+	private static final long serialVersionUID = 8258548156850194710L;
+
+	/**
+	 * 选项体
+	 */
+	private String body;
+
+	public String getBody() {
+		return body;
+	}
+
+	public void setBody(String body) {
+		this.body = body;
+	}
+
+}

+ 69 - 0
src/main/java/cn/com/qmth/examcloud/question/commons/core/question/DefaultQuestionStructure.java

@@ -0,0 +1,69 @@
+package cn.com.qmth.examcloud.question.commons.core.question;
+
+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 class DefaultQuestionStructure implements Serializable {
+
+	private static final long serialVersionUID = 4744728219699873386L;
+
+	/**
+	 * 题结构体
+	 */
+	private String body;
+
+	/**
+	 * 版本号
+	 */
+	private String version;
+
+	/**
+	 * 是否有音频
+	 */
+	private boolean hasAudios;
+
+	/**
+	 * 体单元集合
+	 */
+	private List<DefaultQuestionUnit> questionUnitList;
+
+	public String getBody() {
+		return body;
+	}
+
+	public void setBody(String body) {
+		this.body = body;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public boolean isHasAudios() {
+		return hasAudios;
+	}
+
+	public void setHasAudios(boolean hasAudios) {
+		this.hasAudios = hasAudios;
+	}
+
+	public List<DefaultQuestionUnit> getQuestionUnitList() {
+		return questionUnitList;
+	}
+
+	public void setQuestionUnitList(List<DefaultQuestionUnit> questionUnitList) {
+		this.questionUnitList = questionUnitList;
+	}
+
+}

+ 82 - 0
src/main/java/cn/com/qmth/examcloud/question/commons/core/question/DefaultQuestionUnit.java

@@ -0,0 +1,82 @@
+package cn.com.qmth.examcloud.question.commons.core.question;
+
+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 class DefaultQuestionUnit implements Serializable {
+
+	private static final long serialVersionUID = 3092731472173574671L;
+
+	/**
+	 * 题型
+	 */
+	private QuestionType questionType;
+
+	/**
+	 * 题干
+	 */
+	private String body;
+
+	/**
+	 * 选项集合
+	 */
+	private List<DefaultQuestionOption> questionOptionList;
+
+	/**
+	 * 正确答案
+	 */
+	private String[] rightAnswer;
+
+	/**
+	 * 作答类型
+	 */
+	private AnswerType answerType;
+
+	public QuestionType getQuestionType() {
+		return questionType;
+	}
+
+	public void setQuestionType(QuestionType questionType) {
+		this.questionType = questionType;
+	}
+
+	public String getBody() {
+		return body;
+	}
+
+	public void setBody(String body) {
+		this.body = body;
+	}
+
+	public List<DefaultQuestionOption> getQuestionOptionList() {
+		return questionOptionList;
+	}
+
+	public void setQuestionOptionList(List<DefaultQuestionOption> questionOptionList) {
+		this.questionOptionList = questionOptionList;
+	}
+
+	public String[] getRightAnswer() {
+		return rightAnswer;
+	}
+
+	public void setRightAnswer(String[] rightAnswer) {
+		this.rightAnswer = rightAnswer;
+	}
+
+	public AnswerType getAnswerType() {
+		return answerType;
+	}
+
+	public void setAnswerType(AnswerType answerType) {
+		this.answerType = answerType;
+	}
+
+}

+ 60 - 0
src/main/java/cn/com/qmth/examcloud/question/commons/core/question/QuestionType.java

@@ -0,0 +1,60 @@
+package cn.com.qmth.examcloud.question.commons.core.question;
+
+/**
+ * 题型
+ *
+ * @author WANGWEI
+ * @date 2018年8月15日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public enum QuestionType {
+
+	/**
+	 * 单选题
+	 */
+	SINGLE_CHOICE("单选题"),
+
+	/**
+	 * 多选题
+	 */
+	MULTIPLE_CHOICE("多选题"),
+
+	/**
+	 * 填空题
+	 */
+	FILL_UP("填空题"),
+
+	/**
+	 * 问答题
+	 */
+	ESSAY("问答题"),
+
+	/**
+	 * 判断题
+	 */
+	TRUE_OR_FALSE("判断题");
+
+	// ===========================================================================
+
+	/**
+	 * 描述
+	 */
+	private String desc;
+
+	/**
+	 * 构造函数
+	 *
+	 * @param desc
+	 */
+	private QuestionType(String desc) {
+		this.desc = desc;
+	}
+
+	/**
+	 * @return the desc
+	 */
+	public String getDesc() {
+		return desc;
+	}
+
+}