|
@@ -7,16 +7,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.google.common.reflect.TypeToken;
|
|
|
+import com.google.gson.Gson;
|
|
|
import com.qmth.themis.business.bean.StudentParams;
|
|
|
import com.qmth.themis.business.bean.admin.StudentPhotoUploadResponseBean;
|
|
|
import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
|
import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
|
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
|
import com.qmth.themis.business.dao.TEStudentMapper;
|
|
|
-import com.qmth.themis.business.dto.response.TEStudentDto;
|
|
|
-import com.qmth.themis.business.dto.response.TEStudentExamRecordDto;
|
|
|
-import com.qmth.themis.business.dto.response.TEStudentExamRecordVideoDto;
|
|
|
-import com.qmth.themis.business.dto.response.TEStudentExamRecordVideoMessageDto;
|
|
|
+import com.qmth.themis.business.dto.response.*;
|
|
|
import com.qmth.themis.business.entity.TBUser;
|
|
|
import com.qmth.themis.business.entity.TEExamStudentLog;
|
|
|
import com.qmth.themis.business.entity.TEStudent;
|
|
@@ -93,7 +92,28 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
|
|
|
*/
|
|
|
@Override
|
|
|
public IPage<TEStudentExamRecordDto> studentExamRecordQuery(IPage<Map> iPage, Long studentId, Long examId) {
|
|
|
- return teStudentMapper.studentExamRecordQuery(iPage, studentId, examId);
|
|
|
+ teStudentMapper.studentExamRecordQuery(iPage, studentId, examId);
|
|
|
+ IPage<TEStudentExamRecordDto> teStudentExamRecordDtoIPage = teStudentMapper.studentExamRecordQuery(iPage, studentId, examId);
|
|
|
+ for (TEStudentExamRecordDto t : teStudentExamRecordDtoIPage.getRecords()) {
|
|
|
+ if (Objects.nonNull(t.getTencentVideoUrl()) && !Objects.equals(t.getTencentVideoUrl().trim(), "")) {
|
|
|
+ Gson gson = new Gson();
|
|
|
+ List<TEStudentMonitorRecordDto> monitorRecordList = gson.fromJson(t.getTencentVideoUrl(), new TypeToken<List<TEStudentMonitorRecordDto>>() {
|
|
|
+ }.getType());
|
|
|
+ StringJoiner stringJoiner = new StringJoiner("");
|
|
|
+ for (TEStudentMonitorRecordDto teStudentMonitorRecordDto : monitorRecordList) {
|
|
|
+ stringJoiner.add(SystemConstant.getMonitorRecordVideoSource(teStudentMonitorRecordDto.getVideoSource()).name().toUpperCase()).add(",");
|
|
|
+ }
|
|
|
+ t.setMonitorRecord(stringJoiner.toString().substring(0, stringJoiner.toString().length() - 1));
|
|
|
+ } else if (Objects.nonNull(t.getVideoSource()) && !Objects.equals(t.getVideoSource().trim(), "")) {
|
|
|
+ String[] strs = t.getVideoSource().split(",");
|
|
|
+ StringJoiner stringJoiner = new StringJoiner("");
|
|
|
+ for (String s : strs) {
|
|
|
+ stringJoiner.add(SystemConstant.getMonitorRecordVideoSource(s).name().toUpperCase()).add(",");
|
|
|
+ }
|
|
|
+ t.setMonitorRecord(stringJoiner.toString().substring(0, stringJoiner.toString().length() - 1));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return teStudentExamRecordDtoIPage;
|
|
|
}
|
|
|
|
|
|
@Transactional
|