Bladeren bron

merge from release_v3.0

deason 5 jaren geleden
bovenliggende
commit
4c3969ef77

+ 1 - 1
examcloud-core-oe-student-api-provider/pom.xml

@@ -4,7 +4,7 @@
 	<parent>
 		<groupId>cn.com.qmth.examcloud</groupId>
 		<artifactId>examcloud-core-oe-student</artifactId>
-		<version>2019-SNAPSHOT</version>
+		<version>v3.0-RELEASE</version>
 	</parent>
 	<artifactId>examcloud-core-oe-student-api-provider</artifactId>
 

+ 4 - 0
examcloud-core-oe-student-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/student/api/controller/ExamControlController.java

@@ -162,6 +162,10 @@ public class ExamControlController extends ControllerSupport {
         long startTime = System.currentTimeMillis();
 
         ExamingSession examingSession = examingSessionService.getExamingSession(studentId);
+        
+        if(examingSession==null) {
+        	throw new StatusException("8010", "无效的会话,请离开考试");
+        }
 
         if (log.isDebugEnabled()) {
             log.debug("0 [END_EXAM] 交卷前处理耗时:" + (System.currentTimeMillis() - startTime) + " ms");

+ 1 - 1
examcloud-core-oe-student-base/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>cn.com.qmth.examcloud</groupId>
         <artifactId>examcloud-core-oe-student</artifactId>
-        <version>2019-SNAPSHOT</version>
+        <version>v3.0-RELEASE</version>
     </parent>
     <artifactId>examcloud-core-oe-student-base</artifactId>
 

+ 1 - 1
examcloud-core-oe-student-dao/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>cn.com.qmth.examcloud</groupId>
         <artifactId>examcloud-core-oe-student</artifactId>
-        <version>2019-SNAPSHOT</version>
+        <version>v3.0-RELEASE</version>
     </parent>
     <artifactId>examcloud-core-oe-student-dao</artifactId>
 

+ 2 - 2
examcloud-core-oe-student-dao/src/main/java/cn/com/qmth/examcloud/core/oe/student/dao/ExamRecordDataRepo.java

@@ -22,11 +22,11 @@ public interface ExamRecordDataRepo extends JpaRepository<ExamRecordDataEntity,
     		+ " and (sync_status is null or sync_status ='UNSYNC') and exam_record_status!='EXAM_ERROR' "
     		+ " order by id limit ?3 ",nativeQuery = true)
     List<ExamRecordDataEntity> getLimitExamRecordDataList(Long batchNum, Long startId, Integer size);
-    
+
     @Modifying
     @Query(value = "update ec_oes_exam_record_data set batch_num=?1 where id=?2", nativeQuery = true)
     int updateBatchNumById(Long batchNum, Long id);
-    
+
     @Modifying
     @Query(value = "update ec_oes_exam_record_data set exam_record_status=?1 where id=?2", nativeQuery = true)
     int updateExamRecordStatusById(String examRecordStatus, Long id);

+ 1 - 1
examcloud-core-oe-student-service/pom.xml

@@ -4,7 +4,7 @@
 	<parent>
 		<groupId>cn.com.qmth.examcloud</groupId>
 		<artifactId>examcloud-core-oe-student</artifactId>
-		<version>2019-SNAPSHOT</version>
+		<version>v3.0-RELEASE</version>
 	</parent>
 	<artifactId>examcloud-core-oe-student-service</artifactId>
 

+ 16 - 0
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/bean/CheckExamInProgressInfo.java

@@ -1,5 +1,6 @@
 package cn.com.qmth.examcloud.core.oe.student.bean;
 
+import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
 
 public class CheckExamInProgressInfo implements JsonSerializable{
@@ -29,6 +30,11 @@ public class CheckExamInProgressInfo implements JsonSerializable{
 	 * 活体检测启动分钟数
 	 */
 	private Integer faceVerifyMinute;
+	
+    /**
+     * 考试类型
+     */
+    private ExamType examType;
 
 	public Long getExamRecordDataId() {
 		return examRecordDataId;
@@ -86,4 +92,14 @@ public class CheckExamInProgressInfo implements JsonSerializable{
 		this.isExceed = isExceed;
 	}
 
+    
+    public ExamType getExamType() {
+        return examType;
+    }
+
+    
+    public void setExamType(ExamType examType) {
+        this.examType = examType;
+    }
+
 }

+ 4 - 9
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/ExamRecordDataService.java

@@ -2,12 +2,7 @@ package cn.com.qmth.examcloud.core.oe.student.service;
 
 import java.util.List;
 
-import cn.com.qmth.examcloud.core.oe.student.api.request.CalcExamScoreReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.CalcFaceBiopsyResultReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetExamRecordDataIdsReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.UpdateExamRecordDataBatchNumReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.UpdateExamRecordStatusReq;
-import cn.com.qmth.examcloud.core.oe.student.api.request.UpdatePartialExamRecordReq;
+import cn.com.qmth.examcloud.core.oe.student.api.request.*;
 import cn.com.qmth.examcloud.core.oe.student.api.response.CalcExamScoreResp;
 import cn.com.qmth.examcloud.core.oe.student.api.response.CalcFaceBiopsyResultResp;
 import cn.com.qmth.examcloud.support.cache.bean.CourseCacheBean;
@@ -54,11 +49,11 @@ public interface ExamRecordDataService {
      * @param examRecordDataId
      */
     void deleteExamRecordDataCache(Long examRecordDataId);
-    
+
     List<Long> getExamRecordDataIds(GetExamRecordDataIdsReq req);
-    
+
     void updateExamRecordDataBatchNum(UpdateExamRecordDataBatchNumReq req);
-    
+
     void updateExamRecordStatus(UpdateExamRecordStatusReq req);
 
     /**

+ 4 - 2
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamControlServiceImpl.java

@@ -427,7 +427,7 @@ public class ExamControlServiceImpl implements ExamControlService {
 
         if ((!ExamType.ONLINE.name().equals(examSettingsCacheBean.getExamType()))
                 && (!ExamType.PRACTICE.name().equals(examSettingsCacheBean.getExamType()))
-                ) {
+                && (!ExamType.ONLINE_HOMEWORK.name().equals(examSettingsCacheBean.getExamType()))) {
             throw new StatusException("100019", "考试类型错误");
         }
 
@@ -1298,6 +1298,7 @@ public class ExamControlServiceImpl implements ExamControlService {
             checkExamInProgressInfo.setUsedTime(usedTime);
             checkExamInProgressInfo.setMaxInterruptNum(maxInterruptNum);
             checkExamInProgressInfo.setInterruptNum(examingRecord.getContinuedCount());
+            checkExamInProgressInfo.setExamType(examingRecord.getExamType());
 
             // 断点续考时重新计算活体检测的分钟数
             Integer faceVerifyMinute = null;
@@ -1485,7 +1486,8 @@ public class ExamControlServiceImpl implements ExamControlService {
 
         Long examUsedMilliSeconds = cost * 1000;
         // 如果没有超过冻结时间,抛出异常
-        if (ExamType.ONLINE.name().equals(examingSession.getExamType())) {
+        if (ExamType.ONLINE.name().equals(examingSession.getExamType())
+                || ExamType.ONLINE_HOMEWORK.name().equals(examingSession.getExamType())) {
             ExamRecordData examRecordData = examRecordDataService
                     .getExamRecordDataCache(examingSession.getExamRecordDataId());
 

+ 2 - 1
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamRecordQuestionsServiceImpl.java

@@ -167,7 +167,8 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
             List<DefaultQuestionUnit> questionUnits = questionStructure.getQuestionUnitList();
 
             // 在线考试,清除答案
-            if (examSessionInfo.getExamType().equals(ExamType.ONLINE.name())) {
+            if (ExamType.ONLINE.name().equals(examSessionInfo.getExamType())
+                    || ExamType.ONLINE_HOMEWORK.name().equals(examSessionInfo.getExamType())) {
                 for (DefaultQuestionUnit questionUnit : questionUnits) {
                     questionUnit.setRightAnswer(null);
                 }

+ 1 - 1
examcloud-core-oe-student-starter/pom.xml

@@ -5,7 +5,7 @@
 	<parent>
 		<groupId>cn.com.qmth.examcloud</groupId>
 		<artifactId>examcloud-core-oe-student</artifactId>
-		<version>2019-SNAPSHOT</version>
+		<version>v3.0-RELEASE</version>
 	</parent>
 	<artifactId>examcloud-core-oe-student-starter</artifactId>
 

+ 1 - 1
examcloud-core-oe-student-starter/shell/start.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-APP_MAIN_JAR="examcloud-core-oe-student-starter-2019-SNAPSHOT.jar"
+APP_MAIN_JAR="examcloud-core-oe-student-starter-v3.0-RELEASE.jar"
 
 FILE_PATH=$(cd `dirname $0`; pwd)
 

+ 1 - 1
examcloud-core-oe-student-starter/shell/stop.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-APP_MAIN_JAR="examcloud-core-oe-student-starter-2019-SNAPSHOT.jar"
+APP_MAIN_JAR="examcloud-core-oe-student-starter-v3.0-RELEASE.jar"
 
 FILE_PATH=$(cd `dirname $0`; pwd)
 

+ 2 - 2
examcloud-core-oe-student-starter/src/main/resources/aliyun.xml

@@ -3,14 +3,14 @@
 	<site>
 		<id>capturePhoto</id>
 		<name>网考学生端抓拍照片</name>
-		<aliyunId>2</aliyunId>
+		<aliyunId>1</aliyunId>
 		<maxSize>1M</maxSize>
 		<path>/capture_photo/${rootOrgId}/${userId}/${timeMillis}${fileSuffix}</path>
 	</site>
 	<site>
 		<id>miniProgramAnwser</id>
 		<name>小程序作答文件</name>
-		<aliyunId>2</aliyunId>
+		<aliyunId>1</aliyunId>
 		<maxSize>100M</maxSize>
 		<path>/${relativePath}</path>
 	</site>

+ 61 - 2
examcloud-core-oe-student-starter/src/main/resources/limited.properties

@@ -1,6 +1,65 @@
+# mean: \u5e73\u5747\u8017\u65f6(\u6beb\u79d2)
+# meanRate: \u5e73\u5747\u901f\u7387(\u6b21/\u79d2)
+# oneMinRate: \u4e00\u5206\u949f\u5185\u901f\u7387(\u6b21/\u79d2)
+# [S] \u4e3a\u77ac\u65f6TPS
+# [E] \u76d1\u63a7\u9650\u6d41\u8868\u8fbe\u5f0f
+# [S] \u9650\u6d41\u540e\u6700\u5c0f
 
-
-
+#[${app.api.oe.student}/examControl][/startExam][GET][S] : 50
+#[${app.api.oe.student}/examControl][/startExam][GET][E] : mean>1000 && oneMinRate>10
+#[${app.api.oe.student}/examControl][/startExam][GET][R] : 10
+#
+#[${app.api.oe.student}/examControl][/endExam][GET][S] : 50
+#[${app.api.oe.student}/examControl][/endExam][GET][E] : mean>1000 && oneMinRate>10
+#[${app.api.oe.student}/examControl][/endExam][GET][R] : 10
+#
+#[${app.api.oe.student}/examRecordPaperStruct][/getExamRecordPaperStruct][GET][S] : 50
+#[${app.api.oe.student}/examRecordPaperStruct][/getExamRecordPaperStruct][GET][E] : mean>1000 && oneMinRate>10
+#[${app.api.oe.student}/examRecordPaperStruct][/getExamRecordPaperStruct][GET][R] : 10
+#
+#[${app.api.oe.student}/examControl][/getEndExamInfo][GET][S] : 50
+#[${app.api.oe.student}/examControl][/getEndExamInfo][GET][E] : mean>1000 && oneMinRate>10
+#[${app.api.oe.student}/examControl][/getEndExamInfo][GET][R] : 10
+#
+#[${app.api.oe.student}/examQuestion][/findExamQuestionList][GET][S] : 50
+#[${app.api.oe.student}/examQuestion][/findExamQuestionList][GET][E] : mean>1000 && oneMinRate>10
+#[${app.api.oe.student}/examQuestion][/findExamQuestionList][GET][R] : 10
+#
+#[${app.api.oe.student}/examControl][/queryExamList][GET][S] : 50
+#[${app.api.oe.student}/examControl][/queryExamList][GET][E] : mean>1000 && oneMinRate>10 
+#[${app.api.oe.student}/examControl][/queryExamList][GET][R] : 10
+#
+#[${app.api.oe.student}/examControl][/checkExamInProgress][GET][S] : 50
+#[${app.api.oe.student}/examControl][/checkExamInProgress][GET][E] : mean>1000 && oneMinRate>10
+#[${app.api.oe.student}/examControl][/checkExamInProgress][GET][R] : 10
+#
+#[${app.api.oe.student}/examControl][/checkQrCode][POST][GET][S] : 30
+#[${app.api.oe.student}/examControl][/checkQrCode][POST][GET][E] : mean>1000 && oneMinRate>20
+#[${app.api.oe.student}/examControl][/checkQrCode][POST][GET][R] : 20
+#
+#[${app.api.oe.student}/examControl][/saveUploadedFile][POST][S] : 30
+#[${app.api.oe.student}/examControl][/saveUploadedFile][POST][E] : mean>1000 && oneMinRate>20
+#[${app.api.oe.student}/examControl][/saveUploadedFile][POST][R] : 20
+#
+#[${app.api.oe.student}/examControl][/getUploadedFileAcknowledgeStatus][POST][S] : 100
+#[${app.api.oe.student}/examControl][/getUploadedFileAcknowledgeStatus][POST][POST][E] : mean>1000 && oneMinRate>20
+#[${app.api.oe.student}/examControl][/getUploadedFileAcknowledgeStatus][POST][POST][R] : 20
+#
+#[${app.api.oe.student}/examQuestion][/submitQuestionAnswer][POST][S] : 100
+#[${app.api.oe.student}/examQuestion][/submitQuestionAnswer][POST][E] : mean>1000 && oneMinRate>50
+#[${app.api.oe.student}/examQuestion][/submitQuestionAnswer][POST][R] : 50
+#
+#[${$rmp.cloud.oe.student}examRecord][/getQrCode][POST][S] : 100
+#[${$rmp.cloud.oe.student}examRecord][/getQrCode][POST][POST][E] : mean>1000 && oneMinRate>50
+#[${$rmp.cloud.oe.student}examRecord][/getQrCode][POST][POST][R] : 50
+#
+#[${app.api.oe.student}/examControl][/upyunSignature][POST][S] : 100
+#[${app.api.oe.student}/examControl][/upyunSignature][POST][POST][E] : mean>1000 && oneMinRate>50
+#[${app.api.oe.student}/examControl][/upyunSignature][POST][POST][R] : 50
+#
+#[${app.api.oe.student}/examControl][/saveUploadedFileAcknowledgeStatus][POST][S] : 100
+#[${app.api.oe.student}/examControl][/saveUploadedFileAcknowledgeStatus][POST][E] : mean>1000 && oneMinRate>50
+#[${app.api.oe.student}/examControl][/saveUploadedFileAcknowledgeStatus][POST][R] : 50
 
 
 

+ 2 - 2
pom.xml

@@ -3,10 +3,10 @@
 	<parent>
 		<groupId>cn.com.qmth.examcloud</groupId>
 		<artifactId>examcloud-parent</artifactId>
-		<version>2019</version>
+		<version>v3.0-RELEASE</version>
 	</parent>
 	<artifactId>examcloud-core-oe-student</artifactId>
-	<version>2019-SNAPSHOT</version>
+	<version>v3.0-RELEASE</version>
 	<packaging>pom</packaging>