|
@@ -5,12 +5,16 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
import com.qmth.themis.business.base.BaseEntity;
|
|
import com.qmth.themis.business.base.BaseEntity;
|
|
|
|
+import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.dto.request.TEExamDto;
|
|
import com.qmth.themis.business.dto.request.TEExamDto;
|
|
import com.qmth.themis.business.enums.*;
|
|
import com.qmth.themis.business.enums.*;
|
|
import io.swagger.annotations.ApiModel;
|
|
import io.swagger.annotations.ApiModel;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
+import java.util.LinkedHashSet;
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Description: 考试批次
|
|
* @Description: 考试批次
|
|
@@ -246,15 +250,19 @@ public class TEExam extends BaseEntity {
|
|
this.ipAllow = teExamDto.getIpAllow();
|
|
this.ipAllow = teExamDto.getIpAllow();
|
|
this.scoreStatus = teExamDto.getScoreStatus();
|
|
this.scoreStatus = teExamDto.getScoreStatus();
|
|
this.objectiveScorePolicy = teExamDto.getObjectiveScorePolicy();
|
|
this.objectiveScorePolicy = teExamDto.getObjectiveScorePolicy();
|
|
- if (Objects.nonNull(teExamDto.getMonitorVideoSource()) && !Objects.equals(teExamDto.getMonitorVideoSource(), "") && teExamDto.getMonitorVideoSource().size() > 0) {
|
|
|
|
- this.monitorVideoSource = teExamDto.getMonitorVideoSource().toString().trim().replace("[", "").replace("]", "").replaceAll(" ", "");
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(teExamDto.getMonitorVideoSource())) {
|
|
|
|
+ MonitorVideoSourceEnum mainMonitorVideoSource = SystemConstant.getMainMonitor(teExamDto.getMonitorVideoSource());
|
|
|
|
+ Set<String> set = new LinkedHashSet<>();
|
|
|
|
+ set.add(mainMonitorVideoSource.name());
|
|
|
|
+ set.addAll(teExamDto.getMonitorVideoSource());
|
|
|
|
+ this.monitorVideoSource = set.toString().trim().replace("[", "").replace("]", "").replaceAll(" ", "");
|
|
if (Objects.equals(this.monitorVideoSource.trim().replaceAll(" ", ""), "")) {
|
|
if (Objects.equals(this.monitorVideoSource.trim().replaceAll(" ", ""), "")) {
|
|
this.monitorVideoSource = null;
|
|
this.monitorVideoSource = null;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.monitorVideoSource = null;
|
|
this.monitorVideoSource = null;
|
|
}
|
|
}
|
|
- if (Objects.nonNull(teExamDto.getMonitorRecord()) && !Objects.equals(teExamDto.getMonitorRecord(), "") && teExamDto.getMonitorRecord().size() > 0) {
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(teExamDto.getMonitorRecord())) {
|
|
this.monitorRecord = teExamDto.getMonitorRecord().toString().trim().replace("[", "").replace("]", "").replaceAll(" ", "");
|
|
this.monitorRecord = teExamDto.getMonitorRecord().toString().trim().replace("[", "").replace("]", "").replaceAll(" ", "");
|
|
if (Objects.equals(this.monitorRecord.trim().replaceAll(" ", ""), "")) {
|
|
if (Objects.equals(this.monitorRecord.trim().replaceAll(" ", ""), "")) {
|
|
this.monitorRecord = null;
|
|
this.monitorRecord = null;
|