|
@@ -135,7 +135,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
@SuppressWarnings("rawtypes")
|
|
@SuppressWarnings("rawtypes")
|
|
@Override
|
|
@Override
|
|
public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long userId, Long id, String code, String name,
|
|
public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long userId, Long id, String code, String name,
|
|
- String mode, Integer enable, Long orgId, String type) {
|
|
|
|
|
|
+ String mode, Integer enable, Long orgId, String type) {
|
|
return teExamMapper.examQuery(iPage, userId, id, code, name, mode, enable, orgId, type);
|
|
return teExamMapper.examQuery(iPage, userId, id, code, name, mode, enable, orgId, type);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -152,7 +152,9 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
List<TEExamWaitDto> list = teExamMapper.getWaitingExam(studentId, examId, orgId);
|
|
List<TEExamWaitDto> list = teExamMapper.getWaitingExam(studentId, examId, orgId);
|
|
if (Objects.nonNull(list) && list.size() > 0) {
|
|
if (Objects.nonNull(list) && list.size() > 0) {
|
|
Set<String> examActivityIdsTemp = new LinkedHashSet<>();
|
|
Set<String> examActivityIdsTemp = new LinkedHashSet<>();
|
|
|
|
+ Map<Long, TEExamWaitDto> setList = new LinkedHashMap<>();
|
|
for (TEExamWaitDto t : list) {
|
|
for (TEExamWaitDto t : list) {
|
|
|
|
+ setList.put(t.getId(), t);
|
|
if (t.getExamActivityId().indexOf(",") != -1) {
|
|
if (t.getExamActivityId().indexOf(",") != -1) {
|
|
examActivityIdsTemp.addAll(Arrays.asList(t.getExamActivityId().split(",")));
|
|
examActivityIdsTemp.addAll(Arrays.asList(t.getExamActivityId().split(",")));
|
|
} else {
|
|
} else {
|
|
@@ -183,8 +185,8 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
examCache.getExamCount().intValue() - (examStudentCacheBean.getAlreadyExamCount()
|
|
examCache.getExamCount().intValue() - (examStudentCacheBean.getAlreadyExamCount()
|
|
.intValue())));
|
|
.intValue())));
|
|
});
|
|
});
|
|
- list.forEach(s -> {
|
|
|
|
- s.setActivities(new ArrayList<>(map.get(s.getId())));
|
|
|
|
|
|
+ setList.forEach((k, v) -> {
|
|
|
|
+ v.setActivities(new ArrayList<>(map.get(k)));
|
|
});
|
|
});
|
|
}
|
|
}
|
|
return list;
|
|
return list;
|
|
@@ -469,14 +471,14 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
if (Objects.isNull(clientCameraStatus) || Objects
|
|
if (Objects.isNull(clientCameraStatus) || Objects
|
|
.equals(MonitorStatusSourceEnum.STOP, clientCameraStatus)) {
|
|
.equals(MonitorStatusSourceEnum.STOP, clientCameraStatus)) {
|
|
switch (strs[i]) {
|
|
switch (strs[i]) {
|
|
- case "CLIENT_CAMERA":
|
|
|
|
- throw new BusinessException(ExceptionResultEnum.CLIENT_CAMERA_OFFLINE);
|
|
|
|
- case "CLIENT_SCREEN":
|
|
|
|
- throw new BusinessException(ExceptionResultEnum.CLIENT_SCREEN_OFFLINE);
|
|
|
|
- case "MOBILE_FIRST":
|
|
|
|
- throw new BusinessException(ExceptionResultEnum.MOBILE_FIRST_OFFLINE);
|
|
|
|
- default:
|
|
|
|
- throw new BusinessException(ExceptionResultEnum.MOBILE_SECOND_OFFLINE);
|
|
|
|
|
|
+ case "CLIENT_CAMERA":
|
|
|
|
+ throw new BusinessException(ExceptionResultEnum.CLIENT_CAMERA_OFFLINE);
|
|
|
|
+ case "CLIENT_SCREEN":
|
|
|
|
+ throw new BusinessException(ExceptionResultEnum.CLIENT_SCREEN_OFFLINE);
|
|
|
|
+ case "MOBILE_FIRST":
|
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MOBILE_FIRST_OFFLINE);
|
|
|
|
+ default:
|
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MOBILE_SECOND_OFFLINE);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -613,7 +615,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public AnswerSubmitBean answerSubmit(Long studentId, Long recordId, Integer mainNumber, Integer subNumber,
|
|
public AnswerSubmitBean answerSubmit(Long studentId, Long recordId, Integer mainNumber, Integer subNumber,
|
|
- Integer subIndex, String answer, Long version, Integer durationSeconds) {
|
|
|
|
|
|
+ Integer subIndex, String answer, Long version, Integer durationSeconds) {
|
|
|
|
|
|
// 校验当前登录用户和参数一致性
|
|
// 校验当前登录用户和参数一致性
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
@@ -795,7 +797,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public AudioLeftPlayCountSubmitBean audioLeftPlayCountSubmit(Long studentId, Long recordId, String key,
|
|
public AudioLeftPlayCountSubmitBean audioLeftPlayCountSubmit(Long studentId, Long recordId, String key,
|
|
- Integer count) {
|
|
|
|
|
|
+ Integer count) {
|
|
|
|
|
|
// 校验当前登录用户和参数一致性
|
|
// 校验当前登录用户和参数一致性
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
@@ -1397,7 +1399,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public void sendOeLogMessage(SystemOperationEnum systemOperationEnum, Long examStudentId, Long recordId,
|
|
public void sendOeLogMessage(SystemOperationEnum systemOperationEnum, Long examStudentId, Long recordId,
|
|
- MqDto mqDto) {
|
|
|
|
|
|
+ MqDto mqDto) {
|
|
//mq发送消息start
|
|
//mq发送消息start
|
|
Map<String, Object> properties = new HashMap<>();
|
|
Map<String, Object> properties = new HashMap<>();
|
|
properties.put(SystemConstant.REMARK, systemOperationEnum.getCode());
|
|
properties.put(SystemConstant.REMARK, systemOperationEnum.getCode());
|