|
@@ -1,8 +1,11 @@
|
|
|
package com.qmth.themis.business.dto.response;
|
|
|
|
|
|
+import com.qmth.themis.business.cache.bean.ExamActivityCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
|
|
|
+
|
|
|
import java.io.Serializable;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @Description: 考试场次dto
|
|
@@ -24,13 +27,13 @@ public class TEExamActivityDto implements Serializable {
|
|
|
private Long maxFinishTime;
|
|
|
private String monitorVideoSourceStr;
|
|
|
private List<String> monitorVideoSource;
|
|
|
- private Long openingSeconds;//允许开考开放时长(分钟),相当于迟到时间
|
|
|
- private Long activityOpeningSeconds;//允许开考开放时长(分钟),相当于迟到时间
|
|
|
- private Long prepareSeconds;//提前多长时间开始候考(分钟)
|
|
|
- private Long activityPrepareSeconds;//提前多长时间开始候考(分钟)
|
|
|
- private Long minDurationSeconds;//最短考试时长,相当于考试冻结时间(分钟)
|
|
|
- private Long maxDurationSeconds;//最大考试时长
|
|
|
- private Long activityMaxDurationSeconds;//最大考试时长
|
|
|
+ private Integer openingSeconds;//允许开考开放时长(分钟),相当于迟到时间
|
|
|
+ private Integer activityOpeningSeconds;//允许开考开放时长(分钟),相当于迟到时间
|
|
|
+ private Integer prepareSeconds;//提前多长时间开始候考(分钟)
|
|
|
+ private Integer activityPrepareSeconds;//提前多长时间开始候考(分钟)
|
|
|
+ private Integer minDurationSeconds;//最短考试时长,相当于考试冻结时间(分钟)
|
|
|
+ private Integer maxDurationSeconds;//最大考试时长
|
|
|
+ private Integer activityMaxDurationSeconds;//最大考试时长
|
|
|
private Integer examCount;//允许考试次数
|
|
|
private Integer fouceFinish;//是否在结束时间集中强制收卷,0:不强制,1:强制
|
|
|
private String entryAuthenticationPolicy;//开考身份验证策略,off:关闭,face_verify_optional:非强制人脸验证,face_verify_force:强制人脸验证,liveness:活体验证
|
|
@@ -38,13 +41,98 @@ public class TEExamActivityDto implements Serializable {
|
|
|
private Integer inProcessFaceStrangerIgnore;//考试过程中人脸检测是否忽略陌生人 ,0:不忽略,1:忽略
|
|
|
private Integer inProcessLivenessVerify;//考试过程中是否启用活体检测 ,0:不启用,1:启用
|
|
|
private String inProcessLivenessFixedRangeStr;
|
|
|
- private List<Long> inProcessLivenessFixedRange;//考试过程中活体检测间隔时间
|
|
|
+ private List<Integer> inProcessLivenessFixedRange;//考试过程中活体检测间隔时间
|
|
|
private String inProcessLivenessJudgePolicy;//考试过程中活体检测结果判定规则,any:任意一次通过,all:全部都要通过,more:通过次数大于失败次数
|
|
|
private Integer cameraPhotoUpload;//是否允许使用摄像头拍照答题,0:不允许,1:允许
|
|
|
private Date startTime;//考场开始时间
|
|
|
private Date finishTime;//考场结束时间
|
|
|
private Integer leftExamCount;//剩余考试次数
|
|
|
private Integer mobilePhotoUpload;//是否允许使用移动端拍照答题,0:不开启,1:开启
|
|
|
+ private Boolean monitorAudioEnable;//客户端监控是否启用音频与麦克风
|
|
|
+ private List<String> hardwareTest;//硬件检测
|
|
|
+
|
|
|
+ public TEExamActivityDto() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public TEExamActivityDto(ExamCacheBean ec, ExamActivityCacheBean examActivityCacheBean, ExamStudentCacheBean examStudentCacheBean, Long examStudentId) {
|
|
|
+ this.id = examActivityCacheBean.getId();
|
|
|
+ this.code = examActivityCacheBean.getCode();
|
|
|
+ this.examStudentId = examStudentId;
|
|
|
+ this.courseCode = examStudentCacheBean.getCourseCode();
|
|
|
+ this.courseName = examStudentCacheBean.getCourseName();
|
|
|
+ if (Objects.nonNull(examActivityCacheBean.getPrepareSeconds())) {
|
|
|
+ this.prepareTime = examActivityCacheBean.getStartTime().getTime() - (examActivityCacheBean.getPrepareSeconds() * 1000);
|
|
|
+ } else if (Objects.nonNull(ec.getPrepareSeconds())) {
|
|
|
+ this.prepareTime = examActivityCacheBean.getStartTime().getTime() - (ec.getPrepareSeconds() * 1000);
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(ec.getMinDurationSeconds())) {
|
|
|
+ this.minStartTime = examActivityCacheBean.getStartTime().getTime() + (ec.getMinDurationSeconds() * 1000);
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(examActivityCacheBean.getMaxDurationSeconds())) {
|
|
|
+ this.maxStartTime = examActivityCacheBean.getStartTime().getTime() + (examActivityCacheBean.getMaxDurationSeconds() * 1000);
|
|
|
+ } else if (Objects.nonNull(ec.getMaxDurationSeconds())) {
|
|
|
+ this.maxStartTime = examActivityCacheBean.getStartTime().getTime() + (ec.getMaxDurationSeconds() * 1000);
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(examActivityCacheBean.getFinishTime())) {
|
|
|
+ this.maxFinishTime = examActivityCacheBean.getFinishTime().getTime();
|
|
|
+ } else if (Objects.nonNull(ec.getEndTime())) {
|
|
|
+ this.maxFinishTime = ec.getEndTime().getTime();
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(ec.getMonitorVideoSource()) && !Objects.equals(ec.getMonitorVideoSource().toString().trim().replaceAll(" ", ""), "")) {
|
|
|
+ this.setMonitorVideoSource(Arrays.asList(ec.getMonitorVideoSource().trim().split(",")));
|
|
|
+ } else {
|
|
|
+ this.setMonitorVideoSource(null);
|
|
|
+ }
|
|
|
+ this.openingSeconds = ec.getOpeningSeconds();
|
|
|
+ this.activityOpeningSeconds = examActivityCacheBean.getOpeningSeconds();
|
|
|
+ this.prepareSeconds = ec.getPrepareSeconds();
|
|
|
+ this.activityPrepareSeconds = examActivityCacheBean.getPrepareSeconds();
|
|
|
+ this.minDurationSeconds = ec.getMinDurationSeconds();
|
|
|
+ this.maxDurationSeconds = ec.getMaxDurationSeconds();
|
|
|
+ this.activityMaxDurationSeconds = examActivityCacheBean.getMaxDurationSeconds();
|
|
|
+ this.examCount = ec.getExamCount();
|
|
|
+ this.fouceFinish = ec.getForceFinish();
|
|
|
+ this.entryAuthenticationPolicy = ec.getEntryAuthenticationPolicy().name();
|
|
|
+ this.inProcessFaceVerify = ec.getInProcessFaceVerify();
|
|
|
+ this.inProcessFaceStrangerIgnore = ec.getInProcessFaceStrangerIgnore();
|
|
|
+ this.inProcessLivenessVerify = ec.getInProcessLivenessVerify();
|
|
|
+ if (Objects.nonNull(ec.getInProcessLivenessFixedRange())) {
|
|
|
+ String[] longs = ec.getInProcessLivenessFixedRange().trim().split(",");
|
|
|
+ List inProcessLivenessFixedRange = new ArrayList();
|
|
|
+ for (int i = 0; i < longs.length; i++) {
|
|
|
+ Integer integer = Integer.valueOf(longs[i].trim());
|
|
|
+ inProcessLivenessFixedRange.add(integer);
|
|
|
+ }
|
|
|
+ if (Objects.equals(inProcessLivenessFixedRange.toString().trim().replaceAll(" ", ""), "")) {
|
|
|
+ this.setInProcessLivenessFixedRange(null);
|
|
|
+ } else {
|
|
|
+ this.setInProcessLivenessFixedRange(inProcessLivenessFixedRange);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.inProcessLivenessJudgePolicy = ec.getInProcessLivenessJudgePolicy().name();
|
|
|
+ this.cameraPhotoUpload = ec.getCameraPhotoUpload();
|
|
|
+ this.startTime = examActivityCacheBean.getStartTime();
|
|
|
+ this.finishTime = examActivityCacheBean.getFinishTime();
|
|
|
+ this.leftExamCount = examStudentCacheBean.getLeftExamCount();
|
|
|
+ this.mobilePhotoUpload = ec.getMobilePhotoUpload();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Boolean getMonitorAudioEnable() {
|
|
|
+ return monitorAudioEnable;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMonitorAudioEnable(Boolean monitorAudioEnable) {
|
|
|
+ this.monitorAudioEnable = monitorAudioEnable;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<String> getHardwareTest() {
|
|
|
+ return hardwareTest;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setHardwareTest(List<String> hardwareTest) {
|
|
|
+ this.hardwareTest = hardwareTest;
|
|
|
+ }
|
|
|
|
|
|
public Integer getMobilePhotoUpload() {
|
|
|
return mobilePhotoUpload;
|
|
@@ -158,62 +246,66 @@ public class TEExamActivityDto implements Serializable {
|
|
|
this.courseName = courseName;
|
|
|
}
|
|
|
|
|
|
- public Long getOpeningSeconds() {
|
|
|
+ public Integer getOpeningSeconds() {
|
|
|
return openingSeconds;
|
|
|
}
|
|
|
|
|
|
- public void setOpeningSeconds(Long openingSeconds) {
|
|
|
+ public void setOpeningSeconds(Integer openingSeconds) {
|
|
|
this.openingSeconds = openingSeconds;
|
|
|
}
|
|
|
|
|
|
- public Long getActivityOpeningSeconds() {
|
|
|
+ public Integer getActivityOpeningSeconds() {
|
|
|
return activityOpeningSeconds;
|
|
|
}
|
|
|
|
|
|
- public void setActivityOpeningSeconds(Long activityOpeningSeconds) {
|
|
|
+ public void setActivityOpeningSeconds(Integer activityOpeningSeconds) {
|
|
|
this.activityOpeningSeconds = activityOpeningSeconds;
|
|
|
}
|
|
|
|
|
|
- public Long getPrepareSeconds() {
|
|
|
+ public Integer getPrepareSeconds() {
|
|
|
return prepareSeconds;
|
|
|
}
|
|
|
|
|
|
- public void setPrepareSeconds(Long prepareSeconds) {
|
|
|
+ public void setPrepareSeconds(Integer prepareSeconds) {
|
|
|
this.prepareSeconds = prepareSeconds;
|
|
|
}
|
|
|
|
|
|
- public Long getActivityPrepareSeconds() {
|
|
|
+ public Integer getActivityPrepareSeconds() {
|
|
|
return activityPrepareSeconds;
|
|
|
}
|
|
|
|
|
|
- public void setActivityPrepareSeconds(Long activityPrepareSeconds) {
|
|
|
+ public void setActivityPrepareSeconds(Integer activityPrepareSeconds) {
|
|
|
this.activityPrepareSeconds = activityPrepareSeconds;
|
|
|
}
|
|
|
|
|
|
- public Long getMinDurationSeconds() {
|
|
|
+ public Integer getMinDurationSeconds() {
|
|
|
return minDurationSeconds;
|
|
|
}
|
|
|
|
|
|
- public void setMinDurationSeconds(Long minDurationSeconds) {
|
|
|
+ public void setMinDurationSeconds(Integer minDurationSeconds) {
|
|
|
this.minDurationSeconds = minDurationSeconds;
|
|
|
}
|
|
|
|
|
|
- public Long getMaxDurationSeconds() {
|
|
|
+ public Integer getMaxDurationSeconds() {
|
|
|
return maxDurationSeconds;
|
|
|
}
|
|
|
|
|
|
- public void setMaxDurationSeconds(Long maxDurationSeconds) {
|
|
|
+ public void setMaxDurationSeconds(Integer maxDurationSeconds) {
|
|
|
this.maxDurationSeconds = maxDurationSeconds;
|
|
|
}
|
|
|
|
|
|
- public Long getActivityMaxDurationSeconds() {
|
|
|
+ public Integer getActivityMaxDurationSeconds() {
|
|
|
return activityMaxDurationSeconds;
|
|
|
}
|
|
|
|
|
|
- public void setActivityMaxDurationSeconds(Long activityMaxDurationSeconds) {
|
|
|
+ public void setActivityMaxDurationSeconds(Integer activityMaxDurationSeconds) {
|
|
|
this.activityMaxDurationSeconds = activityMaxDurationSeconds;
|
|
|
}
|
|
|
|
|
|
+ public void setInProcessLivenessFixedRange(List<Integer> inProcessLivenessFixedRange) {
|
|
|
+ this.inProcessLivenessFixedRange = inProcessLivenessFixedRange;
|
|
|
+ }
|
|
|
+
|
|
|
public Integer getExamCount() {
|
|
|
return examCount;
|
|
|
}
|
|
@@ -262,14 +354,10 @@ public class TEExamActivityDto implements Serializable {
|
|
|
this.inProcessLivenessVerify = inProcessLivenessVerify;
|
|
|
}
|
|
|
|
|
|
- public List<Long> getInProcessLivenessFixedRange() {
|
|
|
+ public List<Integer> getInProcessLivenessFixedRange() {
|
|
|
return inProcessLivenessFixedRange;
|
|
|
}
|
|
|
|
|
|
- public void setInProcessLivenessFixedRange(List<Long> inProcessLivenessFixedRange) {
|
|
|
- this.inProcessLivenessFixedRange = inProcessLivenessFixedRange;
|
|
|
- }
|
|
|
-
|
|
|
public String getInProcessLivenessJudgePolicy() {
|
|
|
return inProcessLivenessJudgePolicy;
|
|
|
}
|