|
@@ -133,16 +133,15 @@ public class TIeInvigilateController {
|
|
if (Objects.nonNull(examId)) {
|
|
if (Objects.nonNull(examId)) {
|
|
examCacheBean = teExamService.getExamCacheBean(examId);
|
|
examCacheBean = teExamService.getExamCacheBean(examId);
|
|
}
|
|
}
|
|
- List<String> monitorVideoSourceList = null;
|
|
|
|
- if (Objects.nonNull(examCacheBean) && Objects.nonNull(examCacheBean.getMonitorVideoSource()) && !Objects.equals(examCacheBean.getMonitorVideoSource().toString().trim().replaceAll(" ", ""), "")) {
|
|
|
|
- monitorVideoSourceList = Arrays.asList(examCacheBean.getMonitorVideoSource().trim().toUpperCase().replaceAll(" ", "").split(","));
|
|
|
|
- }
|
|
|
|
if (Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
|
|
if (Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
|
|
ExamCacheBean finalExamCacheBean = examCacheBean;
|
|
ExamCacheBean finalExamCacheBean = examCacheBean;
|
|
- List<String> finalMonitorVideoSourceList = monitorVideoSourceList;
|
|
|
|
invigilateListVideoBeanList.forEach(s -> {
|
|
invigilateListVideoBeanList.forEach(s -> {
|
|
- if (Objects.nonNull(finalMonitorVideoSourceList) && finalMonitorVideoSourceList.size() > 0) {
|
|
|
|
- finalMonitorVideoSourceList.forEach(l -> {
|
|
|
|
|
|
+ List<String> monitorVideoSourceList = null;
|
|
|
|
+ if (Objects.nonNull(s.getMonitorVideoSource()) && !Objects.equals(s.getMonitorVideoSource().trim().replaceAll(" ", ""), "")) {
|
|
|
|
+ monitorVideoSourceList = Arrays.asList(s.getMonitorVideoSource().trim().toUpperCase().replaceAll(" ", "").split(","));
|
|
|
|
+ }
|
|
|
|
+ if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.size() > 0) {
|
|
|
|
+ monitorVideoSourceList.forEach(l -> {
|
|
MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(l);
|
|
MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(l);
|
|
switch (source.name()) {
|
|
switch (source.name()) {
|
|
case "CLIENT_SCREEN":
|
|
case "CLIENT_SCREEN":
|
|
@@ -162,7 +161,7 @@ public class TIeInvigilateController {
|
|
}
|
|
}
|
|
if (Objects.nonNull(monitorVideoSource)) {
|
|
if (Objects.nonNull(monitorVideoSource)) {
|
|
s.setMonitorLiveUrl(SystemConstant.setStreamId(dictionaryConfig.monitorDomain().getPrefix(), s.getExamRecordId(), MonitorVideoSourceEnum.valueOf(monitorVideoSource)));
|
|
s.setMonitorLiveUrl(SystemConstant.setStreamId(dictionaryConfig.monitorDomain().getPrefix(), s.getExamRecordId(), MonitorVideoSourceEnum.valueOf(monitorVideoSource)));
|
|
- } else if (Objects.nonNull(finalMonitorVideoSourceList) && finalMonitorVideoSourceList.contains(MonitorVideoSourceEnum.CLIENT_CAMERA.name())) {
|
|
|
|
|
|
+ } else if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.contains(MonitorVideoSourceEnum.CLIENT_CAMERA.name())) {
|
|
s.setMonitorLiveUrl(SystemConstant.setStreamId(dictionaryConfig.monitorDomain().getPrefix(), s.getExamRecordId(), MonitorVideoSourceEnum.CLIENT_CAMERA));
|
|
s.setMonitorLiveUrl(SystemConstant.setStreamId(dictionaryConfig.monitorDomain().getPrefix(), s.getExamRecordId(), MonitorVideoSourceEnum.CLIENT_CAMERA));
|
|
}
|
|
}
|
|
WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(s.getExamRecordId());
|
|
WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(s.getExamRecordId());
|
|
@@ -202,8 +201,8 @@ public class TIeInvigilateController {
|
|
invigilateListVideoBeanList.forEach(s -> {
|
|
invigilateListVideoBeanList.forEach(s -> {
|
|
ExamCacheBean examCacheBean = teExamService.getExamCacheBean(s.getExamId());
|
|
ExamCacheBean examCacheBean = teExamService.getExamCacheBean(s.getExamId());
|
|
List<String> monitorVideoSourceList = null;
|
|
List<String> monitorVideoSourceList = null;
|
|
- if (Objects.nonNull(examCacheBean) && Objects.nonNull(examCacheBean.getMonitorVideoSource()) && !Objects.equals(examCacheBean.getMonitorVideoSource().toString().trim().replaceAll(" ", ""), "")) {
|
|
|
|
- monitorVideoSourceList = Arrays.asList(examCacheBean.getMonitorVideoSource().trim().toUpperCase().replaceAll(" ", "").split(","));
|
|
|
|
|
|
+ if (Objects.nonNull(s.getMonitorVideoSource()) && !Objects.equals(s.getMonitorVideoSource().trim().replaceAll(" ", ""), "")) {
|
|
|
|
+ monitorVideoSourceList = Arrays.asList(s.getMonitorVideoSource().trim().toUpperCase().replaceAll(" ", "").split(","));
|
|
}
|
|
}
|
|
if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.contains(MonitorVideoSourceEnum.CLIENT_CAMERA.name())) {
|
|
if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.contains(MonitorVideoSourceEnum.CLIENT_CAMERA.name())) {
|
|
s.setMonitorLiveUrl(SystemConstant.setStreamId(dictionaryConfig.monitorDomain().getPrefix(), s.getExamRecordId(), MonitorVideoSourceEnum.CLIENT_CAMERA));
|
|
s.setMonitorLiveUrl(SystemConstant.setStreamId(dictionaryConfig.monitorDomain().getPrefix(), s.getExamRecordId(), MonitorVideoSourceEnum.CLIENT_CAMERA));
|