Explorar el Código

添加导出主观题json文件相关功能

lideyin hace 5 años
padre
commit
711b2ff522

+ 14 - 0
examcloud-core-oe-admin-api-client/src/main/java/cn/com/qmth/examcloud/core/oe/admin/client/ExamRecordQuestionsCloudServiceClient.java

@@ -1,5 +1,7 @@
 package cn.com.qmth.examcloud.core.oe.admin.client;
 
+import cn.com.qmth.examcloud.core.oe.admin.api.request.GetSubjectiveAnswerReq;
+import cn.com.qmth.examcloud.core.oe.admin.api.response.GetSubjectiveAnswerResp;
 import org.springframework.stereotype.Service;
 
 import cn.com.qmth.examcloud.core.oe.admin.api.ExamRecordQuestionsCloudService;
@@ -26,4 +28,16 @@ public class ExamRecordQuestionsCloudServiceClient extends AbstractCloudClientSu
 		post("examRecordQuestions/saveSubjectiveQuestionScore", req, null);
 	}
 
+	/**
+	 * 批量获取主观题答案
+	 *
+	 * @param req
+	 * @return
+	 */
+	@Override
+	public GetSubjectiveAnswerResp getSubjectiveAnswerList(GetSubjectiveAnswerReq req) {
+		return post("examRecordQuestions/getSubjectiveAnswerList", req,
+				GetSubjectiveAnswerResp.class);
+	}
+
 }

+ 8 - 0
examcloud-core-oe-admin-api/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/ExamRecordQuestionsCloudService.java

@@ -1,8 +1,10 @@
 package cn.com.qmth.examcloud.core.oe.admin.api;
 
 import cn.com.qmth.examcloud.api.commons.CloudService;
+import cn.com.qmth.examcloud.core.oe.admin.api.request.GetSubjectiveAnswerReq;
 import cn.com.qmth.examcloud.core.oe.admin.api.request.QuerySubjectiveAnswerListReq;
 import cn.com.qmth.examcloud.core.oe.admin.api.request.SaveSubjectiveQuestionScoreReq;
+import cn.com.qmth.examcloud.core.oe.admin.api.response.GetSubjectiveAnswerResp;
 import cn.com.qmth.examcloud.core.oe.admin.api.response.QuerySubjectiveAnswerListResp;
 
 public interface ExamRecordQuestionsCloudService extends CloudService{
@@ -19,4 +21,10 @@ public interface ExamRecordQuestionsCloudService extends CloudService{
 	 * @param req
 	 */
 	public void saveSubjectiveQuestionScore(SaveSubjectiveQuestionScoreReq req);
+
+	/**
+	 * 批量获取主观题答案(此接口外部工具调用)
+	 * @return
+	 */
+	GetSubjectiveAnswerResp getSubjectiveAnswerList(GetSubjectiveAnswerReq req);
 }

+ 137 - 0
examcloud-core-oe-admin-api/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/bean/SubjectiveAnswerBean.java

@@ -0,0 +1,137 @@
+package cn.com.qmth.examcloud.core.oe.admin.api.bean;
+
+import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
+import cn.com.qmth.examcloud.question.commons.core.question.AnswerType;
+
+/**
+ * @Description 主观题答案实体bean
+ * @Author lideyin
+ * @Date 2019/11/19 15:44
+ * @Version 1.0
+ */
+public class SubjectiveAnswerBean implements JsonSerializable{
+
+	private static final long serialVersionUID = 3292347198033809640L;
+
+	/**
+	 * 考试id
+	 */
+	private Long examId;
+	/**
+	 * 课程代码
+	 */
+	private String courseCode;
+	/**
+	 * 考生id
+	 */
+	private Long examStudentId;
+	/**
+	 * 考试记录Data Id
+	 */
+	private Long examRecordDataId;
+    /**
+     * 大题号
+     */
+    private Integer mainNumber;
+    /**
+     * 原题ID
+     */
+    private String questionId;
+    /**
+     * 在整个试卷中的序号
+     */
+    private Integer order;
+    /**
+     * 考生作答
+     */
+    private String studentAnswer;
+    /**
+	 * 题目作答类型
+	 */
+    private AnswerType answerType;
+
+	/**
+	 * 真实的题目作答类型(历史原因,图片作答类型未按规范指定)
+	 */
+	private String realAnswerType;
+
+	public Long getExamId() {
+		return examId;
+	}
+
+	public void setExamId(Long examId) {
+		this.examId = examId;
+	}
+
+	public String getCourseCode() {
+		return courseCode;
+	}
+
+	public void setCourseCode(String courseCode) {
+		this.courseCode = courseCode;
+	}
+
+	public Long getExamStudentId() {
+		return examStudentId;
+	}
+
+	public void setExamStudentId(Long examStudentId) {
+		this.examStudentId = examStudentId;
+	}
+
+	public Long getExamRecordDataId() {
+		return examRecordDataId;
+	}
+
+	public void setExamRecordDataId(Long examRecordDataId) {
+		this.examRecordDataId = examRecordDataId;
+	}
+
+	public Integer getMainNumber() {
+		return mainNumber;
+	}
+
+	public void setMainNumber(Integer mainNumber) {
+		this.mainNumber = mainNumber;
+	}
+
+	public String getQuestionId() {
+		return questionId;
+	}
+
+	public void setQuestionId(String questionId) {
+		this.questionId = questionId;
+	}
+
+	public Integer getOrder() {
+		return order;
+	}
+
+	public void setOrder(Integer order) {
+		this.order = order;
+	}
+
+	public String getStudentAnswer() {
+		return studentAnswer;
+	}
+
+	public void setStudentAnswer(String studentAnswer) {
+		this.studentAnswer = studentAnswer;
+	}
+
+	public AnswerType getAnswerType() {
+		return answerType;
+	}
+
+	public void setAnswerType(AnswerType answerType) {
+		this.answerType = answerType;
+	}
+
+	public String getRealAnswerType() {
+		return realAnswerType;
+	}
+
+	public void setRealAnswerType(String realAnswerType) {
+		this.realAnswerType = realAnswerType;
+	}
+}

+ 37 - 0
examcloud-core-oe-admin-api/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/request/GetSubjectiveAnswerReq.java

@@ -0,0 +1,37 @@
+package cn.com.qmth.examcloud.core.oe.admin.api.request;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseRequest;
+
+/**
+ * @Description 获取主观题答案请求类
+ * @Author lideyin
+ * @Date 2019/11/19 15:58
+ * @Version 1.0
+ */
+public class GetSubjectiveAnswerReq extends BaseRequest {
+    private static final long serialVersionUID = -3805764194169424777L;
+    /**
+     * 考试id
+     */
+    private Long examId;
+    /**
+     * 考试记录id
+     */
+    private Long startExamRecordId;
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public Long getStartExamRecordId() {
+        return startExamRecordId;
+    }
+
+    public void setStartExamRecordId(Long startExamRecordId) {
+        this.startExamRecordId = startExamRecordId;
+    }
+}

+ 52 - 0
examcloud-core-oe-admin-api/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/response/GetSubjectiveAnswerResp.java

@@ -0,0 +1,52 @@
+package cn.com.qmth.examcloud.core.oe.admin.api.response;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseResponse;
+import cn.com.qmth.examcloud.core.oe.admin.api.bean.QuerySubjectiveAnswerBean;
+import cn.com.qmth.examcloud.core.oe.admin.api.bean.SubjectiveAnswerBean;
+
+import java.util.List;
+/**
+ * @Description 获取主观题响应类
+ * @Author lideyin
+ * @Date 2019/11/19 15:43
+ * @Version 1.0
+ */
+
+public class GetSubjectiveAnswerResp extends BaseResponse {
+
+	private static final long serialVersionUID = 99964425599746265L;
+
+	/**
+	 * 下一个考试记录id
+	 */
+	private Long nextExamRecordDataId;
+
+	/**
+	 * 主观题答案
+	 */
+	private List<SubjectiveAnswerBean> subjectiveAnswerList;
+
+	public GetSubjectiveAnswerResp() {
+	}
+
+	public GetSubjectiveAnswerResp(Long nextExamRecordDataId, List<SubjectiveAnswerBean> subjectiveAnswerList) {
+		this.nextExamRecordDataId = nextExamRecordDataId;
+		this.subjectiveAnswerList = subjectiveAnswerList;
+	}
+
+	public Long getNextExamRecordDataId() {
+		return nextExamRecordDataId;
+	}
+
+	public void setNextExamRecordDataId(Long nextExamRecordDataId) {
+		this.nextExamRecordDataId = nextExamRecordDataId;
+	}
+
+	public List<SubjectiveAnswerBean> getSubjectiveAnswerList() {
+		return subjectiveAnswerList;
+	}
+
+	public void setSubjectiveAnswerList(List<SubjectiveAnswerBean> subjectiveAnswerList) {
+		this.subjectiveAnswerList = subjectiveAnswerList;
+	}
+}