|
@@ -2,7 +2,6 @@ package com.qmth.themis.business.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
-import com.aliyun.oss.common.utils.BinaryUtil;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -24,7 +23,6 @@ import com.qmth.themis.business.util.ServletUtil;
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
import com.qmth.themis.common.util.GsonUtil;
|
|
import com.qmth.themis.common.util.GsonUtil;
|
|
-import com.qmth.themis.common.util.HexUtils;
|
|
|
|
import org.apache.commons.io.FilenameUtils;
|
|
import org.apache.commons.io.FilenameUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -105,14 +103,20 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
|
|
}.getType());
|
|
}.getType());
|
|
Set<MonitorVideoSourceEnum> set = new LinkedHashSet<>(monitorRecordList.size());
|
|
Set<MonitorVideoSourceEnum> set = new LinkedHashSet<>(monitorRecordList.size());
|
|
for (TEStudentMonitorRecordDto teStudentMonitorRecordDto : monitorRecordList) {
|
|
for (TEStudentMonitorRecordDto teStudentMonitorRecordDto : monitorRecordList) {
|
|
- set.add(SystemConstant.getMonitorRecordVideoSource(teStudentMonitorRecordDto.getVideoSource()));
|
|
|
|
|
|
+ MonitorVideoSourceEnum monitorVideoSourceEnum = SystemConstant.getMonitorRecordVideoSource(teStudentMonitorRecordDto.getVideoSource());
|
|
|
|
+ if (Objects.nonNull(monitorVideoSourceEnum)) {
|
|
|
|
+ set.add(monitorVideoSourceEnum);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
t.setMonitorRecord(set.toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(", ", ",").trim());
|
|
t.setMonitorRecord(set.toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(", ", ",").trim());
|
|
} else if (Objects.nonNull(t.getVideoSource()) && !Objects.equals(t.getVideoSource().trim(), "")) {
|
|
} else if (Objects.nonNull(t.getVideoSource()) && !Objects.equals(t.getVideoSource().trim(), "")) {
|
|
String[] strs = t.getVideoSource().split(",");
|
|
String[] strs = t.getVideoSource().split(",");
|
|
Set<MonitorVideoSourceEnum> set = new LinkedHashSet<>(strs.length);
|
|
Set<MonitorVideoSourceEnum> set = new LinkedHashSet<>(strs.length);
|
|
for (String s : strs) {
|
|
for (String s : strs) {
|
|
- set.add(SystemConstant.getMonitorRecordVideoSource(s));
|
|
|
|
|
|
+ MonitorVideoSourceEnum monitorVideoSourceEnum = SystemConstant.getMonitorRecordVideoSource(s);
|
|
|
|
+ if (Objects.nonNull(monitorVideoSourceEnum)) {
|
|
|
|
+ set.add(monitorVideoSourceEnum);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
t.setMonitorRecord(set.toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(", ", ",").trim());
|
|
t.setMonitorRecord(set.toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(", ", ",").trim());
|
|
}
|
|
}
|