Forráskód Böngészése

重构网考交卷相关代码

lideyin 5 éve
szülő
commit
2b4c3d8837

+ 48 - 35
examcloud-core-oe-student-api-client/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/client/OeStudentExamRecordCloudServiceClient.java

@@ -1,44 +1,57 @@
 package cn.com.qmth.examcloud.core.oe.student.api.client;
 
 import cn.com.qmth.examcloud.core.oe.student.api.OeStudentExamRecordCloudService;
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetExamSessionInfoReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetQrCodeReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetStudentOnlineExamInfoReq;
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetExamSessionInfoResp;
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetQrCodeResp;
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetStudentOnlineExamInfoResp;
+import cn.com.qmth.examcloud.core.oe.student.api.bean.ExamingRecordBean;
+import cn.com.qmth.examcloud.core.oe.student.api.bean.HandInExamRecordBean;
+import cn.com.qmth.examcloud.core.oe.student.api.request.*;
+import cn.com.qmth.examcloud.core.oe.student.api.response.*;
 import org.springframework.stereotype.Service;
 
 @Service("oeStudentExamRecordCloudService")
 public class OeStudentExamRecordCloudServiceClient extends AbstractCloudClientSupport
-		implements
-			OeStudentExamRecordCloudService {
-
-	private static final long serialVersionUID = 3904195239759933649L;
-
-	@Override
-	public void cleanExamRecords() {
-		post("examRecord/cleanExamRecords");
-	}
-
-	@Override
-	public GetQrCodeResp getQrCode(GetQrCodeReq req) {
-		return post("examRecord/getQrCode",req,GetQrCodeResp.class);
-	}
-
-	@Override
-	public GetExamSessionInfoResp getExamSessionInfo(GetExamSessionInfoReq req) {
-		return post("examRecord/getExamSessionInfo",req,GetExamSessionInfoResp.class);
-	}
-	
-	@Override
-	public GetStudentOnlineExamInfoResp getStudentOnLineExamInfo(GetStudentOnlineExamInfoReq req) {
-		return post("examRecord/getStudentOnLineExamInfo",req,GetStudentOnlineExamInfoResp.class);
-	}
-
-	@Override
-	public void cleanTempFileAnswers() {
-		post("examRecord/cleanTempFileAnswers");
-	}
+        implements
+        OeStudentExamRecordCloudService {
+
+    private static final long serialVersionUID = 3904195239759933649L;
+
+    @Override
+    public void cleanExamingRecord(CleanExamingRecordReq req) {
+        post("examRecord/cleanExamingRecord", req);
+    }
+
+    @Override
+    public void cleanHandInExamRecord(CleanHandInExamRecordReq req) {
+        post("examRecord/cleanHandInExamRecord", req);
+    }
+
+    @Override
+    public GetQrCodeResp getQrCode(GetQrCodeReq req) {
+        return post("examRecord/getQrCode", req, GetQrCodeResp.class);
+    }
+
+    @Override
+    public GetExamSessionInfoResp getExamSessionInfo(GetExamSessionInfoReq req) {
+        return post("examRecord/getExamSessionInfo", req, GetExamSessionInfoResp.class);
+    }
+
+    @Override
+    public GetStudentOnlineExamInfoResp getStudentOnLineExamInfo(GetStudentOnlineExamInfoReq req) {
+        return post("examRecord/getStudentOnLineExamInfo", req, GetStudentOnlineExamInfoResp.class);
+    }
+
+    @Override
+    public GetExamingRecordResp getExamingRecords(GetExamingRecordReq req) {
+        return post("examRecord/getExamingRecords", req, GetExamingRecordResp.class);
+    }
+
+    @Override
+    public GetHandInExamRecordResp getHandInExamRecords(GetHandInExamRecordReq req) {
+        return post("examRecord/getHandInExamRecords", req, GetHandInExamRecordResp.class);
+    }
+
+    @Override
+    public void cleanTempFileAnswers() {
+        post("examRecord/cleanTempFileAnswers");
+    }
 
 }

+ 31 - 7
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/OeStudentExamRecordCloudService.java

@@ -1,16 +1,24 @@
 package cn.com.qmth.examcloud.core.oe.student.api;
 
 import cn.com.qmth.examcloud.api.commons.CloudService;
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetExamSessionInfoReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetQrCodeReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetStudentOnlineExamInfoReq;
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetExamSessionInfoResp;
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetQrCodeResp;
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetStudentOnlineExamInfoResp;
+import cn.com.qmth.examcloud.core.oe.student.api.bean.ExamingRecordBean;
+import cn.com.qmth.examcloud.core.oe.student.api.bean.HandInExamRecordBean;
+import cn.com.qmth.examcloud.core.oe.student.api.request.*;
+import cn.com.qmth.examcloud.core.oe.student.api.response.*;
 
 public interface OeStudentExamRecordCloudService extends CloudService{
 
-	void cleanExamRecords() throws InterruptedException;
+	/**
+	 * 清理已交卷的考试记录
+	 * @param examingRecord
+	 */
+	void cleanExamingRecord(CleanExamingRecordReq req);
+
+	/**
+	 * 清理已交卷的考试记录
+	 * @param handInExamRecord
+	 */
+	void cleanHandInExamRecord(CleanHandInExamRecordReq req);
 	/**
 	 * 获取二维码
 	 * @return
@@ -28,6 +36,22 @@ public interface OeStudentExamRecordCloudService extends CloudService{
 	 */
 	GetStudentOnlineExamInfoResp getStudentOnLineExamInfo(GetStudentOnlineExamInfoReq req);
 
+	/**
+	 * 查询进行中的考试
+	 * @param startId
+	 * @param limit
+	 * @return
+	 */
+	GetExamingRecordResp getExamingRecords(GetExamingRecordReq req);
+
+	/**
+	 * 查询已交卷的考试
+	 * @param startId
+	 * @param limit
+	 * @return
+	 */
+	GetHandInExamRecordResp getHandInExamRecords(GetHandInExamRecordReq req);
+
 	/**
 	 * 清理临时作答记录
 	 */

+ 50 - 0
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/bean/ExamingRecordBean.java

@@ -0,0 +1,50 @@
+package cn.com.qmth.examcloud.core.oe.student.api.bean;
+
+import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
+
+/**
+ * @Description 考试中的bean
+ * @Author lideyin
+ * @Date 2019/8/28 11:17
+ * @Version 1.0
+ */
+public class ExamingRecordBean implements JsonSerializable {
+    private static final long serialVersionUID = 3790338807162610362L;
+    /**
+     * 考试记录id
+     */
+    private Long id;
+
+    /**
+     * 考试记录dataId
+     */
+    private Long examRecordDataId;
+    /**
+     * 学生ID
+     */
+    private Long studentId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getExamRecordDataId() {
+        return examRecordDataId;
+    }
+
+    public void setExamRecordDataId(Long examRecordDataId) {
+        this.examRecordDataId = examRecordDataId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+}

+ 51 - 0
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/bean/HandInExamRecordBean.java

@@ -0,0 +1,51 @@
+package cn.com.qmth.examcloud.core.oe.student.api.bean;
+
+import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
+
+/**
+ * @Description 已交卷的考试bean
+ * @Author lideyin
+ * @Date 2019/8/28 11:17
+ * @Version 1.0
+ */
+public class HandInExamRecordBean implements JsonSerializable {
+
+    private static final long serialVersionUID = 4171317469222572697L;
+    /**
+     * 考试记录id
+     */
+    private Long id;
+
+    /**
+     * 考试记录dataId
+     */
+    private Long examRecordDataId;
+    /**
+     * 学生ID
+     */
+    private Long studentId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getExamRecordDataId() {
+        return examRecordDataId;
+    }
+
+    public void setExamRecordDataId(Long examRecordDataId) {
+        this.examRecordDataId = examRecordDataId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+}

+ 47 - 0
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/request/CleanExamingRecordReq.java

@@ -0,0 +1,47 @@
+package cn.com.qmth.examcloud.core.oe.student.api.request;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseRequest;
+
+/**
+ * 清理考试中的考试记录
+ */
+public class CleanExamingRecordReq extends BaseRequest {
+    private static final long serialVersionUID = 2625926100082951734L;
+    /**
+     * 考试记录id
+     */
+    private Long id;
+
+    /**
+     * 考试记录dataId
+     */
+    private Long examRecordDataId;
+    /**
+     * 学生ID
+     */
+    private Long studentId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getExamRecordDataId() {
+        return examRecordDataId;
+    }
+
+    public void setExamRecordDataId(Long examRecordDataId) {
+        this.examRecordDataId = examRecordDataId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+}

+ 47 - 0
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/request/CleanHandInExamRecordReq.java

@@ -0,0 +1,47 @@
+package cn.com.qmth.examcloud.core.oe.student.api.request;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseRequest;
+
+/**
+ * 清理考试中的考试记录
+ */
+public class CleanHandInExamRecordReq extends BaseRequest {
+    private static final long serialVersionUID = 2625926100082951734L;
+    /**
+     * 考试记录id
+     */
+    private Long id;
+
+    /**
+     * 考试记录dataId
+     */
+    private Long examRecordDataId;
+    /**
+     * 学生ID
+     */
+    private Long studentId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getExamRecordDataId() {
+        return examRecordDataId;
+    }
+
+    public void setExamRecordDataId(Long examRecordDataId) {
+        this.examRecordDataId = examRecordDataId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+}

+ 29 - 0
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/request/GetExamingRecordReq.java

@@ -0,0 +1,29 @@
+package cn.com.qmth.examcloud.core.oe.student.api.request;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseRequest;
+
+/**
+ * 获取考试中的考试记录
+ */
+public class GetExamingRecordReq extends BaseRequest {
+
+    private static final long serialVersionUID = 6036722643777235728L;
+    private Long startId;
+    private int limit;
+
+    public Long getStartId() {
+        return startId;
+    }
+
+    public void setStartId(Long startId) {
+        this.startId = startId;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
+}

+ 29 - 0
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/request/GetHandInExamRecordReq.java

@@ -0,0 +1,29 @@
+package cn.com.qmth.examcloud.core.oe.student.api.request;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseRequest;
+
+/**
+ * 获取已交卷的考试记录
+ */
+public class GetHandInExamRecordReq extends BaseRequest {
+
+    private static final long serialVersionUID = 6036722643777235728L;
+    private Long startId;
+    private int limit;
+
+    public Long getStartId() {
+        return startId;
+    }
+
+    public void setStartId(Long startId) {
+        this.startId = startId;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
+}

+ 35 - 0
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/response/GetExamingRecordResp.java

@@ -0,0 +1,35 @@
+package cn.com.qmth.examcloud.core.oe.student.api.response;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseResponse;
+import cn.com.qmth.examcloud.core.oe.student.api.bean.ExamingRecordBean;
+import java.util.List;
+
+public class GetExamingRecordResp extends BaseResponse{
+
+	private static final long serialVersionUID = -8662723978214179623L;
+	private Long nextId;
+	private List<ExamingRecordBean> list;
+
+	public GetExamingRecordResp() {
+	}
+	public GetExamingRecordResp(Long nextId, List<ExamingRecordBean> list) {
+		this.nextId = nextId;
+		this.list = list;
+	}
+
+	public Long getNextId() {
+		return nextId;
+	}
+
+	public void setNextId(Long nextId) {
+		this.nextId = nextId;
+	}
+
+	public List<ExamingRecordBean> getList() {
+		return list;
+	}
+
+	public void setList(List<ExamingRecordBean> list) {
+		this.list = list;
+	}
+}

+ 36 - 0
examcloud-core-oe-student-api/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/response/GetHandInExamRecordResp.java

@@ -0,0 +1,36 @@
+package cn.com.qmth.examcloud.core.oe.student.api.response;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseResponse;
+import cn.com.qmth.examcloud.core.oe.student.api.bean.HandInExamRecordBean;
+
+import java.util.List;
+
+public class GetHandInExamRecordResp extends BaseResponse{
+
+	private static final long serialVersionUID = 6200155543255637302L;
+	private Long nextId;
+	private List<HandInExamRecordBean> list;
+
+	public GetHandInExamRecordResp() {
+	}
+
+	public GetHandInExamRecordResp(Long startId, List<HandInExamRecordBean> list) {
+		super();
+	}
+
+	public Long getNextId() {
+		return nextId;
+	}
+
+	public void setNextId(Long nextId) {
+		this.nextId = nextId;
+	}
+
+	public List<HandInExamRecordBean> getList() {
+		return list;
+	}
+
+	public void setList(List<HandInExamRecordBean> list) {
+		this.list = list;
+	}
+}