|
@@ -126,26 +126,28 @@ public class TIeInvigilateController {
|
|
|
if (Objects.nonNull(examCacheBean.getMonitorVideoSource()) && !Objects.equals(examCacheBean.getMonitorVideoSource().toString().trim().replaceAll(" ", ""), "")) {
|
|
|
monitorVideoSourceList = Arrays.asList(examCacheBean.getMonitorVideoSource().trim().toUpperCase().replaceAll(" ", "").split(","));
|
|
|
}
|
|
|
- if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.size() > 0 && Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
|
|
|
+ if (Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
|
|
|
List<String> finalMonitorVideoSourceList = monitorVideoSourceList;
|
|
|
invigilateListVideoBeanList.forEach(s -> {
|
|
|
- finalMonitorVideoSourceList.forEach(l -> {
|
|
|
- MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(l);
|
|
|
- switch (source.ordinal()) {
|
|
|
- case 0:
|
|
|
- s.setScreenMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source.name()));
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- s.setCameraMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source.name()));
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- s.setMobileFirstMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source.name()));
|
|
|
- break;
|
|
|
- default:
|
|
|
- s.setMobileSecondMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source.name()));
|
|
|
- break;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (Objects.nonNull(finalMonitorVideoSourceList) && finalMonitorVideoSourceList.size() > 0) {
|
|
|
+ finalMonitorVideoSourceList.forEach(l -> {
|
|
|
+ MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(l);
|
|
|
+ switch (source.ordinal()) {
|
|
|
+ case 0:
|
|
|
+ s.setScreenMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source.name()));
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ s.setCameraMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source.name()));
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ s.setMobileFirstMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source.name()));
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ s.setMobileSecondMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source.name()));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
MonitorVideoSourceEnum source = MonitorVideoSourceEnum.CLIENT_CAMERA;
|
|
|
if (Objects.nonNull(monitorVideoSource)) {
|
|
|
source = MonitorVideoSourceEnum.valueOf(monitorVideoSource);
|
|
@@ -371,7 +373,19 @@ public class TIeInvigilateController {
|
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
userId = tbUser.getId();
|
|
|
}
|
|
|
- return ResultUtil.ok(tOeExamRecordService.invigilatePagePatrolList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, userId));
|
|
|
+ IPage<InvigilateListPatrolBean> invigilateListPatrolBeanIPage = tOeExamRecordService.invigilatePagePatrolList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, userId);
|
|
|
+ if (Objects.nonNull(invigilateListPatrolBeanIPage)) {
|
|
|
+ List<InvigilateListPatrolBean> invigilateListPatrolBeanList = invigilateListPatrolBeanIPage.getRecords();
|
|
|
+ if (Objects.nonNull(invigilateListPatrolBeanList) && invigilateListPatrolBeanList.size() > 0) {
|
|
|
+ invigilateListPatrolBeanList.forEach(s -> {
|
|
|
+ WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(s.getExamRecordId());
|
|
|
+ if (Objects.nonNull(websocketStatusEnum)) {
|
|
|
+ s.setClientWebsocketStatus(websocketStatusEnum);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ResultUtil.ok(invigilateListPatrolBeanIPage);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "进度查询列表接口")
|