Bläddra i källkod

切屏次数限制

xiatian 3 år sedan
förälder
incheckning
8e9cb70ad8

+ 5 - 0
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/SyncExamDataCloudServiceProvider.java

@@ -167,6 +167,11 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
         if (hasWarn != null && hasWarn) {
             examAuditService.saveHeaderWarnAudit(realExamRecordDataId);
         }
+        
+        //切屏次数超限
+        if (transitionExamRecordData.getExceedMaxSwitchScreenCount()  != null && transitionExamRecordData.getExceedMaxSwitchScreenCount()) {
+            examAuditService.saveExceedMaxSwitchScreenCount(realExamRecordDataId);
+        }
 
         startTime = this.debugCost("3 同步考试记录表", transitionExamRecordDataId, startTime);
 

+ 5 - 1
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/enums/DisciplineType.java

@@ -27,7 +27,11 @@ public enum DisciplineType {
 
     ILLEGAL_DATA(11, "非法数据"),
 
-    ILLEGAL_CLIENT(12, "非法考生端应用");
+    ILLEGAL_CLIENT(12, "非法考生端应用"),
+    
+    EXCEED_MAX_SWITCH_SCREEN_COUNT(13, "超过切屏次数限制")
+    
+    ;
 
     private Integer sortNo;
 

+ 2 - 0
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/ExamAuditService.java

@@ -96,4 +96,6 @@ public interface ExamAuditService {
 
     void saveExamAuditForIllegalClient(Long realExamRecordDataId, String reason);
 
+	void saveExceedMaxSwitchScreenCount(Long realExamRecordDataId);
+
 }

+ 19 - 0
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamAuditServiceImpl.java

@@ -735,4 +735,23 @@ public class ExamAuditServiceImpl implements ExamAuditService {
         examScoreObtainQueueService.sendObtainScoreNotify(examRecordData.getRootOrgId());
     }
 
+	@Override
+	public void saveExceedMaxSwitchScreenCount(Long realExamRecordDataId) {
+		ExamAuditEntity examAudit = examAuditRepo.findByExamRecordDataId(realExamRecordDataId);
+        if (examAudit != null) {
+            return;
+        }
+        ExamAuditEntity examAuditEntity = new ExamAuditEntity();
+        examAuditEntity.setExamRecordDataId(realExamRecordDataId);
+        examAuditEntity.setDisciplineType(DisciplineType.EXCEED_MAX_SWITCH_SCREEN_COUNT.name());
+        examAuditEntity.setDisciplineDetail(null);
+        examAuditEntity.setUserId(DisciplineType.EXCEED_MAX_SWITCH_SCREEN_COUNT.name());
+        examAuditEntity.setAuditUserName(AUDIT_USER_NAME);
+        examAuditEntity.setStatus(AuditStatus.UN_PASS);
+        examAuditRepo.save(examAuditEntity);
+
+        // 修改考试记录为违纪、异常、已审
+        this.disciplineExamRecordData(realExamRecordDataId);
+	}
+
 }