|
@@ -31,6 +31,7 @@ import com.qmth.themis.common.util.ResultUtil;
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -54,6 +55,7 @@ import java.util.stream.Collectors;
|
|
@RequestMapping(SystemConstant.PREFIX_URL_ADMIN + "/invigilate")
|
|
@RequestMapping(SystemConstant.PREFIX_URL_ADMIN + "/invigilate")
|
|
@Validated
|
|
@Validated
|
|
public class TIeInvigilateController {
|
|
public class TIeInvigilateController {
|
|
|
|
+
|
|
private final static Logger log = LoggerFactory.getLogger(TIeInvigilateController.class);
|
|
private final static Logger log = LoggerFactory.getLogger(TIeInvigilateController.class);
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
@@ -101,33 +103,40 @@ public class TIeInvigilateController {
|
|
@Resource
|
|
@Resource
|
|
TEExamSummaryService teExamSummaryService;
|
|
TEExamSummaryService teExamSummaryService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ TEExamMarkLogService teExamMarkLogService;
|
|
|
|
+
|
|
@ApiOperation(value = "实时监控台视频列表接口")
|
|
@ApiOperation(value = "实时监控台视频列表接口")
|
|
@RequestMapping(value = "/list/video", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/list/video", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListVideoBean.class)})
|
|
|
|
-// @RedisLimitAnnotation(key = "listVideo", period = 1, count = 1)
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListVideoBean.class) })
|
|
|
|
+ // @RedisLimitAnnotation(key = "listVideo", period = 1, count = 1)
|
|
public Result listVideo(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
public Result listVideo(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
- @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
- @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
- @ApiParam(value = "试题下载状态", required = false) @RequestParam(required = false) Integer paperDownload,
|
|
|
|
- @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
|
|
|
|
- @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
- @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
- @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
|
|
|
|
- @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
|
|
|
|
- @ApiParam(value = "客户端网络通信状态", required = false) @RequestParam(required = false) String clientWebsocketStatus,
|
|
|
|
- @ApiParam(value = "监控设备来源", required = false) @RequestParam(required = false) String monitorVideoSource,
|
|
|
|
- @ApiParam(value = "摄像头监控设备推流状态('START'or'STOP')", required = false) @RequestParam(required = false) String cameraMonitorStatus,
|
|
|
|
- @ApiParam(value = "屏幕监控设备推流状态('START'or'STOP')", required = false) @RequestParam(required = false) String screenMonitorStatus,
|
|
|
|
- @ApiParam(value = "手机端主机位监控设备推流状态('START'or'STOP')", required = false) @RequestParam(required = false) String mobileFirstMonitorStatus,
|
|
|
|
- @ApiParam(value = "手机端辅机位监控设备推流状态('START'or'STOP')", required = false) @RequestParam(required = false) String mobileSecondMonitorStatus,
|
|
|
|
- @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
|
|
|
|
- @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
|
|
|
|
|
|
+ @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
+ @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
+ @ApiParam(value = "试题下载状态", required = false) @RequestParam(required = false) Integer paperDownload,
|
|
|
|
+ @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
|
|
|
|
+ @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
+ @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
+ @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
|
|
|
|
+ @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
|
|
|
|
+ @ApiParam(value = "客户端网络通信状态", required = false) @RequestParam(required = false) String clientWebsocketStatus,
|
|
|
|
+ @ApiParam(value = "监控设备来源", required = false) @RequestParam(required = false) String monitorVideoSource,
|
|
|
|
+ @ApiParam(value = "摄像头监控设备推流状态('START'or'STOP')", required = false) @RequestParam(required = false) String cameraMonitorStatus,
|
|
|
|
+ @ApiParam(value = "屏幕监控设备推流状态('START'or'STOP')", required = false) @RequestParam(required = false) String screenMonitorStatus,
|
|
|
|
+ @ApiParam(value = "手机端主机位监控设备推流状态('START'or'STOP')", required = false) @RequestParam(required = false) String mobileFirstMonitorStatus,
|
|
|
|
+ @ApiParam(value = "手机端辅机位监控设备推流状态('START'or'STOP')", required = false) @RequestParam(required = false) String mobileSecondMonitorStatus,
|
|
|
|
+ @ApiParam(value = "标记状态,MARK:标记,UN_MARK:撤销") @RequestParam(required = false) MarkEnum markStatus,
|
|
|
|
+ @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
|
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
- List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
|
|
|
|
|
|
+ List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(
|
|
|
|
+ new QueryWrapper<TBExamInvigilateUser>().lambda()
|
|
|
|
+ .eq(TBExamInvigilateUser::getUserId, tbUser.getId())
|
|
|
|
+ .eq(TBExamInvigilateUser::getExamId, examId));
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
}
|
|
}
|
|
@@ -136,7 +145,11 @@ public class TIeInvigilateController {
|
|
roomCodeList.clear();
|
|
roomCodeList.clear();
|
|
roomCodeList.add(roomCode);
|
|
roomCodeList.add(roomCode);
|
|
}
|
|
}
|
|
- IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, cameraMonitorStatus, screenMonitorStatus, mobileFirstMonitorStatus, mobileSecondMonitorStatus, tbUser.getOrgId());
|
|
|
|
|
|
+ IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(
|
|
|
|
+ new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, paperDownload, status, name,
|
|
|
|
+ identity, minWarningCount, maxWarningCount, clientWebsocketStatus, cameraMonitorStatus,
|
|
|
|
+ screenMonitorStatus, mobileFirstMonitorStatus, mobileSecondMonitorStatus, markStatus,
|
|
|
|
+ tbUser.getOrgId());
|
|
if (Objects.nonNull(invigilateListVideoBeanIPage)) {
|
|
if (Objects.nonNull(invigilateListVideoBeanIPage)) {
|
|
List<InvigilateListVideoBean> invigilateListVideoBeanList = invigilateListVideoBeanIPage.getRecords();
|
|
List<InvigilateListVideoBean> invigilateListVideoBeanList = invigilateListVideoBeanIPage.getRecords();
|
|
ExamCacheBean examCacheBean = null;
|
|
ExamCacheBean examCacheBean = null;
|
|
@@ -149,25 +162,31 @@ public class TIeInvigilateController {
|
|
s.setBasePhotoPath(
|
|
s.setBasePhotoPath(
|
|
ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + s.getBasePhotoPath());
|
|
ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + s.getBasePhotoPath());
|
|
List<String> monitorVideoSourceList = null;
|
|
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(s.getMonitorVideoSource()) && !Objects.equals(
|
|
|
|
+ s.getMonitorVideoSource().trim().replaceAll(" ", ""), "")) {
|
|
|
|
+ monitorVideoSourceList = Arrays.asList(
|
|
|
|
+ s.getMonitorVideoSource().trim().toUpperCase().replaceAll(" ", "").split(","));
|
|
}
|
|
}
|
|
if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.size() > 0) {
|
|
if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.size() > 0) {
|
|
monitorVideoSourceList.forEach(l -> {
|
|
monitorVideoSourceList.forEach(l -> {
|
|
MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(l);
|
|
MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(l);
|
|
switch (source.name()) {
|
|
switch (source.name()) {
|
|
- case "CLIENT_SCREEN":
|
|
|
|
- s.setScreenMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source));
|
|
|
|
- break;
|
|
|
|
- case "CLIENT_CAMERA":
|
|
|
|
- s.setCameraMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source));
|
|
|
|
- break;
|
|
|
|
- case "MOBILE_FIRST":
|
|
|
|
- s.setMobileFirstMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source));
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- s.setMobileSecondMonitorStatusSource(ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source));
|
|
|
|
- break;
|
|
|
|
|
|
+ case "CLIENT_SCREEN":
|
|
|
|
+ s.setScreenMonitorStatusSource(
|
|
|
|
+ ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source));
|
|
|
|
+ break;
|
|
|
|
+ case "CLIENT_CAMERA":
|
|
|
|
+ s.setCameraMonitorStatusSource(
|
|
|
|
+ ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source));
|
|
|
|
+ break;
|
|
|
|
+ case "MOBILE_FIRST":
|
|
|
|
+ s.setMobileFirstMonitorStatusSource(
|
|
|
|
+ ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source));
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ s.setMobileSecondMonitorStatusSource(
|
|
|
|
+ ExamRecordCacheUtil.getMonitorStatus(s.getExamRecordId(), source));
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -175,11 +194,15 @@ public class TIeInvigilateController {
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
|
|
|
|
|
|
if (Objects.nonNull(monitorVideoSource)) {
|
|
if (Objects.nonNull(monitorVideoSource)) {
|
|
- s.setMonitorLiveUrl(SystemConstant.setStreamId(sysConfig.getConfigValue(), s.getExamRecordId(), MonitorVideoSourceEnum.valueOf(monitorVideoSource)));
|
|
|
|
- } else if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.contains(MonitorVideoSourceEnum.CLIENT_CAMERA.name())) {
|
|
|
|
- s.setMonitorLiveUrl(SystemConstant.setStreamId(sysConfig.getConfigValue(), s.getExamRecordId(), MonitorVideoSourceEnum.CLIENT_CAMERA));
|
|
|
|
|
|
+ s.setMonitorLiveUrl(SystemConstant.setStreamId(sysConfig.getConfigValue(), s.getExamRecordId(),
|
|
|
|
+ MonitorVideoSourceEnum.valueOf(monitorVideoSource)));
|
|
|
|
+ } else if (Objects.nonNull(monitorVideoSourceList) && monitorVideoSourceList.contains(
|
|
|
|
+ MonitorVideoSourceEnum.CLIENT_CAMERA.name())) {
|
|
|
|
+ s.setMonitorLiveUrl(SystemConstant.setStreamId(sysConfig.getConfigValue(), s.getExamRecordId(),
|
|
|
|
+ MonitorVideoSourceEnum.CLIENT_CAMERA));
|
|
}
|
|
}
|
|
- WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(s.getExamRecordId());
|
|
|
|
|
|
+ WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(
|
|
|
|
+ s.getExamRecordId());
|
|
if (Objects.nonNull(websocketStatusEnum)) {
|
|
if (Objects.nonNull(websocketStatusEnum)) {
|
|
s.setClientWebsocketStatus(websocketStatusEnum);
|
|
s.setClientWebsocketStatus(websocketStatusEnum);
|
|
}
|
|
}
|
|
@@ -199,9 +222,11 @@ public class TIeInvigilateController {
|
|
|
|
|
|
@ApiOperation(value = "实时监控台视频随机列表接口")
|
|
@ApiOperation(value = "实时监控台视频随机列表接口")
|
|
@RequestMapping(value = "/list/video/random", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/list/video/random", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListVideoBean.class)})
|
|
|
|
-// @RedisLimitAnnotation(key = "listVideoRandom", period = 1, count = 1)
|
|
|
|
- public Result listVideoRandom(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId, @ApiParam(value = "随机数", required = true) @RequestParam Integer randomNum) {
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListVideoBean.class) })
|
|
|
|
+ // @RedisLimitAnnotation(key = "listVideoRandom", period = 1, count = 1)
|
|
|
|
+ public Result listVideoRandom(
|
|
|
|
+ @ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
|
|
+ @ApiParam(value = "随机数", required = true) @RequestParam Integer randomNum) {
|
|
if (Objects.isNull(randomNum) || Objects.equals(randomNum, "")) {
|
|
if (Objects.isNull(randomNum) || Objects.equals(randomNum, "")) {
|
|
throw new BusinessException("随机数不能为空");
|
|
throw new BusinessException("随机数不能为空");
|
|
}
|
|
}
|
|
@@ -210,27 +235,35 @@ public class TIeInvigilateController {
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
- List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
|
|
|
|
|
|
+ List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(
|
|
|
|
+ new QueryWrapper<TBExamInvigilateUser>().lambda()
|
|
|
|
+ .eq(TBExamInvigilateUser::getUserId, tbUser.getId())
|
|
|
|
+ .eq(TBExamInvigilateUser::getExamId, examId));
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- List<InvigilateListVideoBean> invigilateListVideoBeanList = tOeExamRecordService.invigilatePageListVideoRandom(examId, roomCodeList, randomNum, tbUser.getOrgId());
|
|
|
|
|
|
+ List<InvigilateListVideoBean> invigilateListVideoBeanList = tOeExamRecordService.invigilatePageListVideoRandom(
|
|
|
|
+ examId, roomCodeList, randomNum, tbUser.getOrgId());
|
|
if (Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
|
|
if (Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
|
|
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(s.getMonitorVideoSource()) && !Objects.equals(s.getMonitorVideoSource().trim().replaceAll(" ", ""), "")) {
|
|
|
|
- monitorVideoSourceList = Arrays.asList(s.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(","));
|
|
}
|
|
}
|
|
MonitorVideoSourceEnum mainMonitorVideoSource = SystemConstant.getMainMonitor(monitorVideoSourceList);
|
|
MonitorVideoSourceEnum mainMonitorVideoSource = SystemConstant.getMainMonitor(monitorVideoSourceList);
|
|
SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
|
|
SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
|
|
|
|
|
|
if (Objects.nonNull(mainMonitorVideoSource)) {
|
|
if (Objects.nonNull(mainMonitorVideoSource)) {
|
|
- s.setMonitorLiveUrl(SystemConstant.setStreamId(sysConfig.getConfigValue(), s.getExamRecordId(), mainMonitorVideoSource));
|
|
|
|
|
|
+ s.setMonitorLiveUrl(SystemConstant.setStreamId(sysConfig.getConfigValue(), s.getExamRecordId(),
|
|
|
|
+ mainMonitorVideoSource));
|
|
}
|
|
}
|
|
- WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(s.getExamRecordId());
|
|
|
|
|
|
+ WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(
|
|
|
|
+ s.getExamRecordId());
|
|
if (Objects.nonNull(websocketStatusEnum)) {
|
|
if (Objects.nonNull(websocketStatusEnum)) {
|
|
s.setClientWebsocketStatus(websocketStatusEnum);
|
|
s.setClientWebsocketStatus(websocketStatusEnum);
|
|
}
|
|
}
|
|
@@ -244,36 +277,42 @@ public class TIeInvigilateController {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- invigilateListVideoBeanList.sort(Comparator.comparing(InvigilateListVideoBean::getClientWebsocketStatus, Comparator.naturalOrder()).thenComparing(InvigilateListVideoBean::getMonitorLiveUrl, Comparator.nullsLast(Comparator.naturalOrder())));
|
|
|
|
|
|
+ invigilateListVideoBeanList.sort(
|
|
|
|
+ Comparator.comparing(InvigilateListVideoBean::getClientWebsocketStatus, Comparator.naturalOrder())
|
|
|
|
+ .thenComparing(InvigilateListVideoBean::getMonitorLiveUrl,
|
|
|
|
+ Comparator.nullsLast(Comparator.naturalOrder())));
|
|
return ResultUtil.ok(invigilateListVideoBeanList);
|
|
return ResultUtil.ok(invigilateListVideoBeanList);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "监考明细管理列表接口")
|
|
@ApiOperation(value = "监考明细管理列表接口")
|
|
@RequestMapping(value = "/history/list", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/history/list", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "监考明细信息", response = InvigilateListHistoryBean.class)})
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "监考明细信息", response = InvigilateListHistoryBean.class) })
|
|
public Result historyList(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
public Result historyList(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
- @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
- @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
- @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode,
|
|
|
|
- @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
|
|
|
|
- @ApiParam(value = "违纪状态", required = false) @RequestParam(required = false) Integer breachStatus,
|
|
|
|
- @ApiParam(value = "交卷方式", required = false) @RequestParam(required = false) String finishType,
|
|
|
|
- @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
- @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
- @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
|
|
|
|
- @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
|
|
|
|
- @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
|
|
|
|
- @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
|
|
|
|
- @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
|
|
|
|
- @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
|
|
|
|
- @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
|
|
|
|
- @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
|
|
|
|
|
|
+ @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
+ @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
+ @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode,
|
|
|
|
+ @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
|
|
|
|
+ @ApiParam(value = "违纪状态", required = false) @RequestParam(required = false) Integer breachStatus,
|
|
|
|
+ @ApiParam(value = "交卷方式", required = false) @RequestParam(required = false) String finishType,
|
|
|
|
+ @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
+ @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
+ @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
|
|
|
|
+ @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
|
|
|
|
+ @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
|
|
|
|
+ @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
|
|
|
|
+ @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
|
|
|
|
+ @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
|
|
|
|
+ @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
|
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
- List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
|
|
|
|
|
|
+ List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(
|
|
|
|
+ new QueryWrapper<TBExamInvigilateUser>().lambda()
|
|
|
|
+ .eq(TBExamInvigilateUser::getUserId, tbUser.getId())
|
|
|
|
+ .eq(TBExamInvigilateUser::getExamId, examId));
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
}
|
|
}
|
|
@@ -282,33 +321,42 @@ public class TIeInvigilateController {
|
|
roomCodeList.clear();
|
|
roomCodeList.clear();
|
|
roomCodeList.add(roomCode);
|
|
roomCodeList.add(roomCode);
|
|
}
|
|
}
|
|
- return ResultUtil.ok(tOeExamRecordService.invigilatePageListHistory(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, courseCode, status, breachStatus, finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId()));
|
|
|
|
|
|
+ return ResultUtil.ok(
|
|
|
|
+ tOeExamRecordService.invigilatePageListHistory(new Page<>(pageNumber, pageSize), examId, examActivityId,
|
|
|
|
+ roomCodeList, courseCode, status, breachStatus, finishType, name, identity,
|
|
|
|
+ minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
|
|
|
|
+ minWarningCount, maxWarningCount, tbUser.getOrgId()));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "监考明细管理列表导出接口")
|
|
@ApiOperation(value = "监考明细管理列表导出接口")
|
|
@RequestMapping(value = "/history/list/export", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/history/list/export", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "监考明细信息", response = InvigilateListHistoryBean.class)})
|
|
|
|
- public void historyListExport(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
|
|
- @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
- @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
- @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode,
|
|
|
|
- @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
|
|
|
|
- @ApiParam(value = "违纪状态", required = false) @RequestParam(required = false) Integer breachStatus,
|
|
|
|
- @ApiParam(value = "交卷方式", required = false) @RequestParam(required = false) String finishType,
|
|
|
|
- @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
- @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
- @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
|
|
|
|
- @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
|
|
|
|
- @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
|
|
|
|
- @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
|
|
|
|
- @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
|
|
|
|
- @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount) throws Exception {
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "监考明细信息", response = InvigilateListHistoryBean.class) })
|
|
|
|
+ public void historyListExport(
|
|
|
|
+ @ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
|
|
+ @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
+ @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
+ @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode,
|
|
|
|
+ @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
|
|
|
|
+ @ApiParam(value = "违纪状态", required = false) @RequestParam(required = false) Integer breachStatus,
|
|
|
|
+ @ApiParam(value = "交卷方式", required = false) @RequestParam(required = false) String finishType,
|
|
|
|
+ @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
+ @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
+ @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
|
|
|
|
+ @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
|
|
|
|
+ @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
|
|
|
|
+ @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
|
|
|
|
+ @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
|
|
|
|
+ @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount)
|
|
|
|
+ throws Exception {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
- List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
|
|
|
|
|
|
+ List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(
|
|
|
|
+ new QueryWrapper<TBExamInvigilateUser>().lambda()
|
|
|
|
+ .eq(TBExamInvigilateUser::getUserId, tbUser.getId())
|
|
|
|
+ .eq(TBExamInvigilateUser::getExamId, examId));
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
}
|
|
}
|
|
@@ -317,13 +365,17 @@ public class TIeInvigilateController {
|
|
roomCodeList.clear();
|
|
roomCodeList.clear();
|
|
roomCodeList.add(roomCode);
|
|
roomCodeList.add(roomCode);
|
|
}
|
|
}
|
|
- List<InvigilateListHistoryBean> invigilateListHistoryBeanList = tOeExamRecordService.invigilatePageListHistoryExport(examId, examActivityId, roomCodeList, courseCode, status, breachStatus, finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId());
|
|
|
|
- ExportUtils.exportEXCEL("监考明细", InvigilateListHistoryBean.class, invigilateListHistoryBeanList, ServletUtil.getResponse());
|
|
|
|
|
|
+ List<InvigilateListHistoryBean> invigilateListHistoryBeanList = tOeExamRecordService.invigilatePageListHistoryExport(
|
|
|
|
+ examId, examActivityId, roomCodeList, courseCode, status, breachStatus, finishType, name, identity,
|
|
|
|
+ minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount,
|
|
|
|
+ maxWarningCount, tbUser.getOrgId());
|
|
|
|
+ ExportUtils.exportEXCEL("监考明细", InvigilateListHistoryBean.class, invigilateListHistoryBeanList,
|
|
|
|
+ ServletUtil.getResponse());
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "实时监控台列表明细接口")
|
|
@ApiOperation(value = "实时监控台列表明细接口")
|
|
@RequestMapping(value = "/list/detail", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/list/detail", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListDetailBean.class)})
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListDetailBean.class) })
|
|
public Result listDetail(@ApiParam(value = "考试记录id") @RequestParam Long examRecordId) {
|
|
public Result listDetail(@ApiParam(value = "考试记录id") @RequestParam Long examRecordId) {
|
|
if (Objects.isNull(examRecordId) || Objects.equals(examRecordId, "")) {
|
|
if (Objects.isNull(examRecordId) || Objects.equals(examRecordId, "")) {
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
@@ -341,20 +393,31 @@ public class TIeInvigilateController {
|
|
status = tOeExamRecord.getStatus();
|
|
status = tOeExamRecord.getStatus();
|
|
breachStatus = Objects.isNull(tOeExamRecord.getBreachStatus()) ? 1 : tOeExamRecord.getBreachStatus();
|
|
breachStatus = Objects.isNull(tOeExamRecord.getBreachStatus()) ? 1 : tOeExamRecord.getBreachStatus();
|
|
warningCount = Objects.nonNull(tOeExamRecord.getWarningCount()) ? tOeExamRecord.getWarningCount() : 0;
|
|
warningCount = Objects.nonNull(tOeExamRecord.getWarningCount()) ? tOeExamRecord.getWarningCount() : 0;
|
|
- warningMultipleFaceCount = Objects.nonNull(tOeExamRecord.getWarningMultipleFaceCount()) ? tOeExamRecord.getWarningMultipleFaceCount() : 0;
|
|
|
|
|
|
+ warningMultipleFaceCount = Objects.nonNull(tOeExamRecord.getWarningMultipleFaceCount()) ?
|
|
|
|
+ tOeExamRecord.getWarningMultipleFaceCount() :
|
|
|
|
+ 0;
|
|
exceptionCount = Objects.nonNull(tOeExamRecord.getExceptionCount()) ? tOeExamRecord.getExceptionCount() : 0;
|
|
exceptionCount = Objects.nonNull(tOeExamRecord.getExceptionCount()) ? tOeExamRecord.getExceptionCount() : 0;
|
|
} else {
|
|
} else {
|
|
examStudentId = ExamRecordCacheUtil.getExamStudentId(examRecordId);
|
|
examStudentId = ExamRecordCacheUtil.getExamStudentId(examRecordId);
|
|
examActivityId = ExamRecordCacheUtil.getExamActivityId(examRecordId);
|
|
examActivityId = ExamRecordCacheUtil.getExamActivityId(examRecordId);
|
|
status = ExamRecordCacheUtil.getStatus(examRecordId);
|
|
status = ExamRecordCacheUtil.getStatus(examRecordId);
|
|
- breachStatus = Objects.isNull(ExamRecordCacheUtil.getBreachStatus(examRecordId)) ? 1 : ExamRecordCacheUtil.getBreachStatus(examRecordId);
|
|
|
|
- warningCount = Objects.isNull(ExamRecordCacheUtil.getWarningCount(examRecordId)) ? 0 : ExamRecordCacheUtil.getWarningCount(examRecordId);
|
|
|
|
- warningMultipleFaceCount = Objects.isNull(ExamRecordCacheUtil.getWarningMultipleFaceCount(examRecordId)) ? 0 : ExamRecordCacheUtil.getWarningMultipleFaceCount(examRecordId);
|
|
|
|
- exceptionCount = Objects.isNull(ExamRecordCacheUtil.getExceptionCount(examRecordId)) ? 0 : ExamRecordCacheUtil.getExceptionCount(examRecordId);
|
|
|
|
|
|
+ breachStatus = Objects.isNull(ExamRecordCacheUtil.getBreachStatus(examRecordId)) ?
|
|
|
|
+ 1 :
|
|
|
|
+ ExamRecordCacheUtil.getBreachStatus(examRecordId);
|
|
|
|
+ warningCount = Objects.isNull(ExamRecordCacheUtil.getWarningCount(examRecordId)) ?
|
|
|
|
+ 0 :
|
|
|
|
+ ExamRecordCacheUtil.getWarningCount(examRecordId);
|
|
|
|
+ warningMultipleFaceCount = Objects.isNull(ExamRecordCacheUtil.getWarningMultipleFaceCount(examRecordId)) ?
|
|
|
|
+ 0 :
|
|
|
|
+ ExamRecordCacheUtil.getWarningMultipleFaceCount(examRecordId);
|
|
|
|
+ exceptionCount = Objects.isNull(ExamRecordCacheUtil.getExceptionCount(examRecordId)) ?
|
|
|
|
+ 0 :
|
|
|
|
+ ExamRecordCacheUtil.getExceptionCount(examRecordId);
|
|
}
|
|
}
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
TEStudentCacheDto teStudent = themisCacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
|
|
TEStudentCacheDto teStudent = themisCacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
|
|
- String basePhotoPath = ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + teStudent.getBasePhotoPath();
|
|
|
|
|
|
+ String basePhotoPath =
|
|
|
|
+ ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + teStudent.getBasePhotoPath();
|
|
String identity = examStudentCacheBean.getIdentity();
|
|
String identity = examStudentCacheBean.getIdentity();
|
|
String examStudentName = examStudentCacheBean.getName();
|
|
String examStudentName = examStudentCacheBean.getName();
|
|
String courseNameCode = examStudentCacheBean.getCourseName() + "(" + examStudentCacheBean.getCourseCode() + ")";
|
|
String courseNameCode = examStudentCacheBean.getCourseName() + "(" + examStudentCacheBean.getCourseCode() + ")";
|
|
@@ -363,32 +426,40 @@ public class TIeInvigilateController {
|
|
ExamActivityCacheBean examActivityCacheBean = teExamActivityService.getExamActivityCacheBean(examActivityId);
|
|
ExamActivityCacheBean examActivityCacheBean = teExamActivityService.getExamActivityCacheBean(examActivityId);
|
|
ExamCacheBean examCacheBean = teExamService.getExamCacheBean(examId);
|
|
ExamCacheBean examCacheBean = teExamService.getExamCacheBean(examId);
|
|
|
|
|
|
- IPage<TBExamInvigilateUserDto> tbExamInvigilateUserDtoIPage = tbExamInvigilateUserService.examInvigilateUserQuery(new Page<>(SystemConstant.PAGE_NUMBER_MIN, SystemConstant.SELECT_PAGE_SIZE_MAX), examId, roomCode, null, teStudent.getOrgId());
|
|
|
|
|
|
+ IPage<TBExamInvigilateUserDto> tbExamInvigilateUserDtoIPage = tbExamInvigilateUserService.examInvigilateUserQuery(
|
|
|
|
+ new Page<>(SystemConstant.PAGE_NUMBER_MIN, SystemConstant.SELECT_PAGE_SIZE_MAX), examId, roomCode, null,
|
|
|
|
+ teStudent.getOrgId());
|
|
String invigilateUsers = null;
|
|
String invigilateUsers = null;
|
|
- if (Objects.nonNull(tbExamInvigilateUserDtoIPage) && !CollectionUtils.isEmpty(tbExamInvigilateUserDtoIPage.getRecords())) {
|
|
|
|
|
|
+ if (Objects.nonNull(tbExamInvigilateUserDtoIPage) && !CollectionUtils.isEmpty(
|
|
|
|
+ tbExamInvigilateUserDtoIPage.getRecords())) {
|
|
invigilateUsers = tbExamInvigilateUserDtoIPage.getRecords().get(0).getName();
|
|
invigilateUsers = tbExamInvigilateUserDtoIPage.getRecords().get(0).getName();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ TEExamMarkLog teExamMarkLog = teExamMarkLogService.findByExamRecordId(examRecordId);
|
|
InvigilateListDetailBean invigilateListDetailBean = new InvigilateListDetailBean(examCacheBean.getName(),
|
|
InvigilateListDetailBean invigilateListDetailBean = new InvigilateListDetailBean(examCacheBean.getName(),
|
|
examActivityCacheBean.getCode(), examId, examActivityId, examStudentId, examRecordId, identity,
|
|
examActivityCacheBean.getCode(), examId, examActivityId, examStudentId, examRecordId, identity,
|
|
examStudentName, courseNameCode, status, roomCode, roomName, breachStatus, basePhotoPath,
|
|
examStudentName, courseNameCode, status, roomCode, roomName, breachStatus, basePhotoPath,
|
|
- examActivityCacheBean.getStartTime(), examActivityCacheBean.getFinishTime(), invigilateUsers, examStudentCacheBean.getClassNo());
|
|
|
|
|
|
+ examActivityCacheBean.getStartTime(), examActivityCacheBean.getFinishTime(), invigilateUsers,
|
|
|
|
+ examStudentCacheBean.getClassNo(), Objects.nonNull(teExamMarkLog) ? teExamMarkLog.getStatus() : null);
|
|
|
|
|
|
//考生轨迹
|
|
//考生轨迹
|
|
QueryWrapper<TEExamStudentLog> teExamStudentLogQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<TEExamStudentLog> teExamStudentLogQueryWrapper = new QueryWrapper<>();
|
|
teExamStudentLogQueryWrapper.lambda().eq(TEExamStudentLog::getExamStudentId, examStudentId)
|
|
teExamStudentLogQueryWrapper.lambda().eq(TEExamStudentLog::getExamStudentId, examStudentId)
|
|
.eq(TEExamStudentLog::getExamRecordId, examRecordId)
|
|
.eq(TEExamStudentLog::getExamRecordId, examRecordId)
|
|
-// .ne(TEExamStudentLog::getType, SystemOperationEnum.BREACH_HANDLE.name())
|
|
|
|
-// .ne(TEExamStudentLog::getType, SystemOperationEnum.BREACH_REVOKE.name())
|
|
|
|
|
|
+ // .ne(TEExamStudentLog::getType, SystemOperationEnum.BREACH_HANDLE.name())
|
|
|
|
+ // .ne(TEExamStudentLog::getType, SystemOperationEnum.BREACH_REVOKE.name())
|
|
.orderByAsc(TEExamStudentLog::getCreateTime);
|
|
.orderByAsc(TEExamStudentLog::getCreateTime);
|
|
// .and(w -> w.ne(TEExamStudentLog::getType, SystemOperationEnum.BREACH_HANDLE.name()).or().ne(TEExamStudentLog::getType, SystemOperationEnum.BREACH_REVOKE.name()));
|
|
// .and(w -> w.ne(TEExamStudentLog::getType, SystemOperationEnum.BREACH_HANDLE.name()).or().ne(TEExamStudentLog::getType, SystemOperationEnum.BREACH_REVOKE.name()));
|
|
List<TEExamStudentLog> teExamStudentLogList = teExamStudentLogService.list(teExamStudentLogQueryWrapper);
|
|
List<TEExamStudentLog> teExamStudentLogList = teExamStudentLogService.list(teExamStudentLogQueryWrapper);
|
|
|
|
|
|
//加入文本和语音消息轨迹
|
|
//加入文本和语音消息轨迹
|
|
- List<TIeExamInvigilateNotice> tIeExamInvigilateNoticeList = tIeExamInvigilateNoticeService.queryNoticeByExamRecordId(examRecordId);
|
|
|
|
|
|
+ List<TIeExamInvigilateNotice> tIeExamInvigilateNoticeList = tIeExamInvigilateNoticeService.queryNoticeByExamRecordId(
|
|
|
|
+ examRecordId);
|
|
if (!CollectionUtils.isEmpty(tIeExamInvigilateNoticeList)) {
|
|
if (!CollectionUtils.isEmpty(tIeExamInvigilateNoticeList)) {
|
|
for (TIeExamInvigilateNotice t : tIeExamInvigilateNoticeList) {
|
|
for (TIeExamInvigilateNotice t : tIeExamInvigilateNoticeList) {
|
|
- teExamStudentLogList.add(new TEExamStudentLog(teStudent.getId(), examStudentId, t.getExamRecordId(), t.getType(), t.getContent(), t.getFormUserId(), t.getFormUserName(), t.getSendTime()));
|
|
|
|
|
|
+ teExamStudentLogList.add(
|
|
|
|
+ new TEExamStudentLog(teStudent.getId(), examStudentId, t.getExamRecordId(), t.getType(),
|
|
|
|
+ t.getContent(), t.getFormUserId(), t.getFormUserName(), t.getSendTime()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -396,7 +467,9 @@ public class TIeInvigilateController {
|
|
List<TIeExamMediaLog> tIeExamMediaLogList = tIeExamMediaLogService.queryMediaByExamRecordId(examRecordId);
|
|
List<TIeExamMediaLog> tIeExamMediaLogList = tIeExamMediaLogService.queryMediaByExamRecordId(examRecordId);
|
|
if (!CollectionUtils.isEmpty(tIeExamMediaLogList)) {
|
|
if (!CollectionUtils.isEmpty(tIeExamMediaLogList)) {
|
|
for (TIeExamMediaLog t : tIeExamMediaLogList) {
|
|
for (TIeExamMediaLog t : tIeExamMediaLogList) {
|
|
- teExamStudentLogList.add(new TEExamStudentLog(teStudent.getId(), examStudentId, t.getExamRecordId(), t.getType(), t.getContent(), t.getCreateTime()));
|
|
|
|
|
|
+ teExamStudentLogList.add(
|
|
|
|
+ new TEExamStudentLog(teStudent.getId(), examStudentId, t.getExamRecordId(), t.getType(),
|
|
|
|
+ t.getContent(), t.getCreateTime()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Collections.sort(teExamStudentLogList);
|
|
Collections.sort(teExamStudentLogList);
|
|
@@ -418,7 +491,8 @@ public class TIeInvigilateController {
|
|
tOeExamRecordService.updateWarningUnreadByDb(examRecordId, 0);
|
|
tOeExamRecordService.updateWarningUnreadByDb(examRecordId, 0);
|
|
tOeExamRecordService.updateWarningUnreadCache(examRecordId, 0, false);
|
|
tOeExamRecordService.updateWarningUnreadCache(examRecordId, 0, false);
|
|
|
|
|
|
- teExamSummaryService.updateExamSummaryWarningUnread(examId, examActivityId, examStudentCacheBean.getRoomCode());
|
|
|
|
|
|
+ teExamSummaryService.updateExamSummaryWarningUnread(examId, examActivityId,
|
|
|
|
+ examStudentCacheBean.getRoomCode());
|
|
themisCacheService.updateExamSummaryCache(examId);
|
|
themisCacheService.updateExamSummaryCache(examId);
|
|
themisCacheService.updateExamSummaryCache(examId, examActivityId);
|
|
themisCacheService.updateExamSummaryCache(examId, examActivityId);
|
|
themisCacheService.updateExamSummaryCache(examId, examActivityId, examStudentCacheBean.getRoomCode());
|
|
themisCacheService.updateExamSummaryCache(examId, examActivityId, examStudentCacheBean.getRoomCode());
|
|
@@ -431,16 +505,17 @@ public class TIeInvigilateController {
|
|
|
|
|
|
@ApiOperation(value = "强制/手动交卷接口")
|
|
@ApiOperation(value = "强制/手动交卷接口")
|
|
@RequestMapping(value = "/finish", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/finish", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class) })
|
|
public Result finish(@ApiJsonObject(name = "invigilateFinish", value = {
|
|
public Result finish(@ApiJsonObject(name = "invigilateFinish", value = {
|
|
@ApiJsonProperty(key = "examRecordId", type = "long", example = "1", description = "考试记录id"),
|
|
@ApiJsonProperty(key = "examRecordId", type = "long", example = "1", description = "考试记录id"),
|
|
- @ApiJsonProperty(key = "type", description = "收卷类型,手动/强制")
|
|
|
|
- }) @ApiParam(value = "考试记录信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
|
- if (Objects.isNull(mapParameter.get(SystemConstant.EXAM_RECORD_ID)) || Objects.equals(mapParameter.get(SystemConstant.EXAM_RECORD_ID), "")) {
|
|
|
|
|
|
+ @ApiJsonProperty(key = "type", description = "收卷类型,手动/强制") }) @ApiParam(value = "考试记录信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
|
+ if (Objects.isNull(mapParameter.get(SystemConstant.EXAM_RECORD_ID)) || Objects.equals(
|
|
|
|
+ mapParameter.get(SystemConstant.EXAM_RECORD_ID), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
}
|
|
}
|
|
List<String> recordIdList = (List<String>) mapParameter.get(SystemConstant.EXAM_RECORD_ID);
|
|
List<String> recordIdList = (List<String>) mapParameter.get(SystemConstant.EXAM_RECORD_ID);
|
|
- if (Objects.isNull(mapParameter.get(SystemConstant.TYPE)) || Objects.equals(mapParameter.get(SystemConstant.TYPE), "")) {
|
|
|
|
|
|
+ if (Objects.isNull(mapParameter.get(SystemConstant.TYPE)) || Objects.equals(
|
|
|
|
+ mapParameter.get(SystemConstant.TYPE), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.FINISH_TYPE_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.FINISH_TYPE_IS_NULL);
|
|
}
|
|
}
|
|
if (recordIdList.size() > 0) {
|
|
if (recordIdList.size() > 0) {
|
|
@@ -451,7 +526,9 @@ public class TIeInvigilateController {
|
|
if (Objects.equals(type, FinishTypeEnum.INTERRUPT)) {
|
|
if (Objects.equals(type, FinishTypeEnum.INTERRUPT)) {
|
|
mqTagEnum = MqTagEnum.OE_MONITOR_FINISH;
|
|
mqTagEnum = MqTagEnum.OE_MONITOR_FINISH;
|
|
recordIdList.forEach(s -> {
|
|
recordIdList.forEach(s -> {
|
|
- Integer breachStatus = Objects.nonNull(ExamRecordCacheUtil.getBreachStatus(Long.parseLong(s))) ? ExamRecordCacheUtil.getBreachStatus(Long.parseLong(s)) : 1;
|
|
|
|
|
|
+ Integer breachStatus = Objects.nonNull(ExamRecordCacheUtil.getBreachStatus(Long.parseLong(s))) ?
|
|
|
|
+ ExamRecordCacheUtil.getBreachStatus(Long.parseLong(s)) :
|
|
|
|
+ 1;
|
|
if (Objects.nonNull(breachStatus) && breachStatus.intValue() == 1) {
|
|
if (Objects.nonNull(breachStatus) && breachStatus.intValue() == 1) {
|
|
throw new BusinessException("只有标记为违纪的考生才能强制交卷");
|
|
throw new BusinessException("只有标记为违纪的考生才能强制交卷");
|
|
}
|
|
}
|
|
@@ -459,11 +536,12 @@ public class TIeInvigilateController {
|
|
} else if (Objects.equals(type, FinishTypeEnum.BREACH)) {
|
|
} else if (Objects.equals(type, FinishTypeEnum.BREACH)) {
|
|
mqTagEnum = MqTagEnum.OE_WARNING_FINISH;
|
|
mqTagEnum = MqTagEnum.OE_WARNING_FINISH;
|
|
}
|
|
}
|
|
-// else {
|
|
|
|
-// mqTagEnum = MqTagEnum.OE_HARD_FINISH;
|
|
|
|
-// }
|
|
|
|
|
|
+ // else {
|
|
|
|
+ // mqTagEnum = MqTagEnum.OE_HARD_FINISH;
|
|
|
|
+ // }
|
|
if (Objects.nonNull(mqTagEnum)) {
|
|
if (Objects.nonNull(mqTagEnum)) {
|
|
- MqDto mqDto = new MqDto(mqUtil.getTopic(), mqTagEnum.name(), JacksonUtil.parseJson(recordIdList), mqTagEnum, String.valueOf(tbUser.getId()), mapParameter, tbUser.getName());
|
|
|
|
|
|
+ MqDto mqDto = new MqDto(mqUtil.getTopic(), mqTagEnum.name(), JacksonUtil.parseJson(recordIdList),
|
|
|
|
+ mqTagEnum, String.valueOf(tbUser.getId()), mapParameter, tbUser.getName());
|
|
mqDtoService.assembleSendAsyncOrderMsg(mqDto);
|
|
mqDtoService.assembleSendAsyncOrderMsg(mqDto);
|
|
}
|
|
}
|
|
//发送mq给客户端强制收卷end
|
|
//发送mq给客户端强制收卷end
|
|
@@ -473,28 +551,31 @@ public class TIeInvigilateController {
|
|
|
|
|
|
@ApiOperation(value = "在线巡考列表接口")
|
|
@ApiOperation(value = "在线巡考列表接口")
|
|
@RequestMapping(value = "/patrol/list", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/patrol/list", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListPatrolBean.class)})
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListPatrolBean.class) })
|
|
public Result patrolList(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
public Result patrolList(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
- @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
- @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
- @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
|
|
|
|
- @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
- @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
- @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
|
|
|
|
- @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
|
|
|
|
- @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
|
|
|
|
- @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
|
|
|
|
- @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
|
|
|
|
- @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
|
|
|
|
- @ApiParam(value = "客户端网络通信状态", required = false) @RequestParam(required = false) String clientWebsocketStatus,
|
|
|
|
- @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
|
|
|
|
- @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
|
|
|
|
|
|
+ @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
+ @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
+ @ApiParam(value = "考生状态", required = false) @RequestParam(required = false) String status,
|
|
|
|
+ @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
+ @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
+ @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
|
|
|
|
+ @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
|
|
|
|
+ @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
|
|
|
|
+ @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
|
|
|
|
+ @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
|
|
|
|
+ @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
|
|
|
|
+ @ApiParam(value = "客户端网络通信状态", required = false) @RequestParam(required = false) String clientWebsocketStatus,
|
|
|
|
+ @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
|
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
- List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
|
|
|
|
|
|
+ List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(
|
|
|
|
+ new QueryWrapper<TBExamInvigilateUser>().lambda()
|
|
|
|
+ .eq(TBExamInvigilateUser::getUserId, tbUser.getId())
|
|
|
|
+ .eq(TBExamInvigilateUser::getExamId, examId));
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
}
|
|
}
|
|
@@ -503,7 +584,10 @@ public class TIeInvigilateController {
|
|
roomCodeList.clear();
|
|
roomCodeList.clear();
|
|
roomCodeList.add(roomCode);
|
|
roomCodeList.add(roomCode);
|
|
}
|
|
}
|
|
- IPage<InvigilateListPatrolBean> invigilateListPatrolBeanIPage = tOeExamRecordService.invigilatePagePatrolList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, tbUser.getOrgId());
|
|
|
|
|
|
+ IPage<InvigilateListPatrolBean> invigilateListPatrolBeanIPage = tOeExamRecordService.invigilatePagePatrolList(
|
|
|
|
+ new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, status, name, identity,
|
|
|
|
+ minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount,
|
|
|
|
+ maxWarningCount, clientWebsocketStatus, tbUser.getOrgId());
|
|
if (Objects.nonNull(invigilateListPatrolBeanIPage)) {
|
|
if (Objects.nonNull(invigilateListPatrolBeanIPage)) {
|
|
List<InvigilateListPatrolBean> invigilateListPatrolBeanList = invigilateListPatrolBeanIPage.getRecords();
|
|
List<InvigilateListPatrolBean> invigilateListPatrolBeanList = invigilateListPatrolBeanIPage.getRecords();
|
|
if (Objects.nonNull(invigilateListPatrolBeanList) && invigilateListPatrolBeanList.size() > 0) {
|
|
if (Objects.nonNull(invigilateListPatrolBeanList) && invigilateListPatrolBeanList.size() > 0) {
|
|
@@ -513,7 +597,8 @@ public class TIeInvigilateController {
|
|
}
|
|
}
|
|
ExamCacheBean finalExamCacheBean = examCacheBean;
|
|
ExamCacheBean finalExamCacheBean = examCacheBean;
|
|
invigilateListPatrolBeanList.forEach(s -> {
|
|
invigilateListPatrolBeanList.forEach(s -> {
|
|
- WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(s.getExamRecordId());
|
|
|
|
|
|
+ WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(
|
|
|
|
+ s.getExamRecordId());
|
|
if (Objects.nonNull(websocketStatusEnum)) {
|
|
if (Objects.nonNull(websocketStatusEnum)) {
|
|
s.setClientWebsocketStatus(websocketStatusEnum);
|
|
s.setClientWebsocketStatus(websocketStatusEnum);
|
|
}
|
|
}
|
|
@@ -529,23 +614,27 @@ public class TIeInvigilateController {
|
|
|
|
|
|
@ApiOperation(value = "进度查询列表接口")
|
|
@ApiOperation(value = "进度查询列表接口")
|
|
@RequestMapping(value = "/progress/list", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/progress/list", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "监考进度信息", response = InvigilateListProgressBean.class)})
|
|
|
|
- public Result progressList(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
|
|
- @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
- @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
- @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode,
|
|
|
|
- @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
- @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
- @ApiParam(value = "状态", required = false) @RequestParam(required = false) Integer status,
|
|
|
|
- @ApiParam(value = "违纪状态,0:违纪,1:正常", required = false) @RequestParam(required = false) Integer breachStatus,
|
|
|
|
- @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
|
|
|
|
- @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "监考进度信息", response = InvigilateListProgressBean.class) })
|
|
|
|
+ public Result progressList(
|
|
|
|
+ @ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
|
|
+ @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
+ @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
+ @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode,
|
|
|
|
+ @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
+ @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
+ @ApiParam(value = "状态", required = false) @RequestParam(required = false) Integer status,
|
|
|
|
+ @ApiParam(value = "违纪状态,0:违纪,1:正常", required = false) @RequestParam(required = false) Integer breachStatus,
|
|
|
|
+ @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
|
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
- List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
|
|
|
|
|
|
+ List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(
|
|
|
|
+ new QueryWrapper<TBExamInvigilateUser>().lambda()
|
|
|
|
+ .eq(TBExamInvigilateUser::getUserId, tbUser.getId())
|
|
|
|
+ .eq(TBExamInvigilateUser::getExamId, examId));
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
}
|
|
}
|
|
@@ -554,26 +643,32 @@ public class TIeInvigilateController {
|
|
roomCodeList.clear();
|
|
roomCodeList.clear();
|
|
roomCodeList.add(roomCode);
|
|
roomCodeList.add(roomCode);
|
|
}
|
|
}
|
|
- return ResultUtil.ok(tOeExamRecordService.invigilatePageProgressList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, courseCode, name, identity, status, tbUser.getOrgId(), breachStatus));
|
|
|
|
|
|
+ return ResultUtil.ok(tOeExamRecordService.invigilatePageProgressList(new Page<>(pageNumber, pageSize), examId,
|
|
|
|
+ examActivityId, roomCodeList, courseCode, name, identity, status, tbUser.getOrgId(), breachStatus));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "进度查询列表导出接口")
|
|
@ApiOperation(value = "进度查询列表导出接口")
|
|
@RequestMapping(value = "/progress/list/export", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/progress/list/export", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "监考进度信息", response = InvigilateListProgressBean.class)})
|
|
|
|
- public void progressListExport(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
|
|
- @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
- @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
- @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode,
|
|
|
|
- @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
- @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
- @ApiParam(value = "状态", required = false) @RequestParam(required = false) Integer status,
|
|
|
|
- @ApiParam(value = "违纪状态,0:违纪,1:正常", required = false) @RequestParam(required = false) Integer breachStatus) throws Exception {
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "监考进度信息", response = InvigilateListProgressBean.class) })
|
|
|
|
+ public void progressListExport(
|
|
|
|
+ @ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId,
|
|
|
|
+ @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
|
+ @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
|
+ @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode,
|
|
|
|
+ @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
|
+ @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
|
|
+ @ApiParam(value = "状态", required = false) @RequestParam(required = false) Integer status,
|
|
|
|
+ @ApiParam(value = "违纪状态,0:违纪,1:正常", required = false) @RequestParam(required = false) Integer breachStatus)
|
|
|
|
+ throws Exception {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
List<String> roomCodeList = new ArrayList<>();
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
- List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
|
|
|
|
|
|
+ List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(
|
|
|
|
+ new QueryWrapper<TBExamInvigilateUser>().lambda()
|
|
|
|
+ .eq(TBExamInvigilateUser::getUserId, tbUser.getId())
|
|
|
|
+ .eq(TBExamInvigilateUser::getExamId, examId));
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
|
|
}
|
|
}
|
|
@@ -582,36 +677,41 @@ public class TIeInvigilateController {
|
|
roomCodeList.clear();
|
|
roomCodeList.clear();
|
|
roomCodeList.add(roomCode);
|
|
roomCodeList.add(roomCode);
|
|
}
|
|
}
|
|
- List<InvigilateListProgressExcelBean> invigilateListProgressExcelBeanList = tOeExamRecordService.invigilatePageProgressListExport(examId, examActivityId, roomCodeList, courseCode, name, identity, status, tbUser.getOrgId(), breachStatus);
|
|
|
|
|
|
+ List<InvigilateListProgressExcelBean> invigilateListProgressExcelBeanList = tOeExamRecordService.invigilatePageProgressListExport(
|
|
|
|
+ examId, examActivityId, roomCodeList, courseCode, name, identity, status, tbUser.getOrgId(),
|
|
|
|
+ breachStatus);
|
|
if (!CollectionUtils.isEmpty(invigilateListProgressExcelBeanList)) {
|
|
if (!CollectionUtils.isEmpty(invigilateListProgressExcelBeanList)) {
|
|
for (InvigilateListProgressExcelBean i : invigilateListProgressExcelBeanList) {
|
|
for (InvigilateListProgressExcelBean i : invigilateListProgressExcelBeanList) {
|
|
i.setCourseName(i.getCourseName() + "(" + i.getCourseCode() + ")");
|
|
i.setCourseName(i.getCourseName() + "(" + i.getCourseCode() + ")");
|
|
i.setRoomName(i.getRoomName() + "(" + i.getRoomCode() + ")");
|
|
i.setRoomName(i.getRoomName() + "(" + i.getRoomCode() + ")");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- ExportUtils.exportEXCEL("进度信息", InvigilateListProgressExcelBean.class, invigilateListProgressExcelBeanList, ServletUtil.getResponse());
|
|
|
|
|
|
+ ExportUtils.exportEXCEL("进度信息", InvigilateListProgressExcelBean.class, invigilateListProgressExcelBeanList,
|
|
|
|
+ ServletUtil.getResponse());
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "违纪处理接口")
|
|
@ApiOperation(value = "违纪处理接口")
|
|
@RequestMapping(value = "/breach", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/breach", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class) })
|
|
public Result breach(@ApiJsonObject(name = "invigilateBreach", value = {
|
|
public Result breach(@ApiJsonObject(name = "invigilateBreach", value = {
|
|
@ApiJsonProperty(key = "examRecordId", type = "long", example = "1", description = "考试记录id", required = true),
|
|
@ApiJsonProperty(key = "examRecordId", type = "long", example = "1", description = "考试记录id", required = true),
|
|
@ApiJsonProperty(key = "type", description = "违规类型", required = true),
|
|
@ApiJsonProperty(key = "type", description = "违规类型", required = true),
|
|
@ApiJsonProperty(key = "description", description = "描述", required = true),
|
|
@ApiJsonProperty(key = "description", description = "描述", required = true),
|
|
@ApiJsonProperty(key = "status", type = "int", example = "1", description = "新建/撤销", required = true),
|
|
@ApiJsonProperty(key = "status", type = "int", example = "1", description = "新建/撤销", required = true),
|
|
- @ApiJsonProperty(key = "breachLogId", type = "long", example = "1", description = "违纪日志id", required = true)
|
|
|
|
- }) @ApiParam(value = "考试记录信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
|
- if (Objects.isNull(mapParameter.get(SystemConstant.EXAM_RECORD_ID)) || Objects.equals(mapParameter.get(SystemConstant.EXAM_RECORD_ID), "")) {
|
|
|
|
|
|
+ @ApiJsonProperty(key = "breachLogId", type = "long", example = "1", description = "违纪日志id", required = true) }) @ApiParam(value = "考试记录信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
|
+ if (Objects.isNull(mapParameter.get(SystemConstant.EXAM_RECORD_ID)) || Objects.equals(
|
|
|
|
+ mapParameter.get(SystemConstant.EXAM_RECORD_ID), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
}
|
|
}
|
|
- if (Objects.isNull(mapParameter.get(SystemConstant.TYPE)) || Objects.equals(mapParameter.get(SystemConstant.TYPE), "")) {
|
|
|
|
|
|
+ if (Objects.isNull(mapParameter.get(SystemConstant.TYPE)) || Objects.equals(
|
|
|
|
+ mapParameter.get(SystemConstant.TYPE), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.BREACH_TYPE_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.BREACH_TYPE_IS_NULL);
|
|
}
|
|
}
|
|
if (Objects.isNull(mapParameter.get("description")) || Objects.equals(mapParameter.get("description"), "")) {
|
|
if (Objects.isNull(mapParameter.get("description")) || Objects.equals(mapParameter.get("description"), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.BREACH_DESC_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.BREACH_DESC_IS_NULL);
|
|
}
|
|
}
|
|
- if (Objects.isNull(mapParameter.get(SystemConstant.STATUS)) || Objects.equals(mapParameter.get(SystemConstant.STATUS), "")) {
|
|
|
|
|
|
+ if (Objects.isNull(mapParameter.get(SystemConstant.STATUS)) || Objects.equals(
|
|
|
|
+ mapParameter.get(SystemConstant.STATUS), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.BREACH_STATUS_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.BREACH_STATUS_IS_NULL);
|
|
}
|
|
}
|
|
teExamBreachLogService.breachLogic(mapParameter);
|
|
teExamBreachLogService.breachLogic(mapParameter);
|
|
@@ -619,40 +719,70 @@ public class TIeInvigilateController {
|
|
return ResultUtil.ok(true);
|
|
return ResultUtil.ok(true);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "重点标记接口")
|
|
|
|
+ @RequestMapping(value = "/mark", method = RequestMethod.POST)
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "标记成功", response = Result.class) })
|
|
|
|
+ @Transactional
|
|
|
|
+ public Result mark(@ApiParam(value = "考试记录id", required = true) @RequestParam Long examRecordId,
|
|
|
|
+ @ApiParam(value = "状态,MARK:标记,UN_MARK:撤销", required = true) @RequestParam MarkEnum status) {
|
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
|
+ TEExamMarkLog teExamMarkLog = teExamMarkLogService.findByExamRecordId(examRecordId);
|
|
|
|
+ TOeExamRecord tOeExamRecord = tOeExamRecordService.getById(examRecordId);
|
|
|
|
+ Objects.requireNonNull(tOeExamRecord, ExceptionResultEnum.NOT_FOUND_EXAM_RECORD.getMessage());
|
|
|
|
+ if (tOeExamRecord.getStatus() == ExamRecordStatusEnum.FINISHED
|
|
|
|
+ || tOeExamRecord.getStatus() == ExamRecordStatusEnum.PERSISTED) {
|
|
|
|
+ throw new BusinessException("考试已结束无法标记");
|
|
|
|
+ }
|
|
|
|
+ if (Objects.isNull(teExamMarkLog)) {
|
|
|
|
+ Objects.requireNonNull(tOeExamRecord, ExceptionResultEnum.NOT_FOUND_EXAM_RECORD.getMessage());
|
|
|
|
+ teExamMarkLog = new TEExamMarkLog(tOeExamRecord, tbUser.getId());
|
|
|
|
+ } else {
|
|
|
|
+ if (teExamMarkLog.getStatus() == status) {
|
|
|
|
+ throw new BusinessException("已是" + status.getTitle() + "状态,无需修改");
|
|
|
|
+ } else {
|
|
|
|
+ teExamMarkLog.setStatus(status);
|
|
|
|
+ teExamMarkLog.updateInfo(tbUser.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return ResultUtil.ok(teExamMarkLogService.saveOrUpdate(teExamMarkLog));
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiOperation(value = "监考消息通知接口")
|
|
@ApiOperation(value = "监考消息通知接口")
|
|
@RequestMapping(value = "/notice", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/notice", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class) })
|
|
public Result notice(@ApiJsonObject(name = "invigilateNotice", value = {
|
|
public Result notice(@ApiJsonObject(name = "invigilateNotice", value = {
|
|
@ApiJsonProperty(key = "examRecordId", type = "long", example = "1", description = "考试记录id", required = true),
|
|
@ApiJsonProperty(key = "examRecordId", type = "long", example = "1", description = "考试记录id", required = true),
|
|
@ApiJsonProperty(key = "type", description = "消息类型,text/audio", required = true),
|
|
@ApiJsonProperty(key = "type", description = "消息类型,text/audio", required = true),
|
|
- @ApiJsonProperty(key = "content", description = "消息内容", required = true)
|
|
|
|
- }) @ApiParam(value = "考试记录信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
|
- if (Objects.isNull(mapParameter.get(SystemConstant.EXAM_RECORD_ID)) || Objects.equals(mapParameter.get(SystemConstant.EXAM_RECORD_ID), "")) {
|
|
|
|
|
|
+ @ApiJsonProperty(key = "content", description = "消息内容", required = true) }) @ApiParam(value = "考试记录信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
|
+ if (Objects.isNull(mapParameter.get(SystemConstant.EXAM_RECORD_ID)) || Objects.equals(
|
|
|
|
+ mapParameter.get(SystemConstant.EXAM_RECORD_ID), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
}
|
|
}
|
|
Long recordId = Long.parseLong(String.valueOf(mapParameter.get(SystemConstant.EXAM_RECORD_ID)));
|
|
Long recordId = Long.parseLong(String.valueOf(mapParameter.get(SystemConstant.EXAM_RECORD_ID)));
|
|
- if (Objects.isNull(mapParameter.get(SystemConstant.TYPE)) || Objects.equals(mapParameter.get(SystemConstant.TYPE), "")) {
|
|
|
|
|
|
+ if (Objects.isNull(mapParameter.get(SystemConstant.TYPE)) || Objects.equals(
|
|
|
|
+ mapParameter.get(SystemConstant.TYPE), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.MESSAGE_TYPE_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.MESSAGE_TYPE_IS_NULL);
|
|
}
|
|
}
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
//发送mq给客户端监考消息start
|
|
//发送mq给客户端监考消息start
|
|
mapParameter.put(SystemConstant.FORM_USER_ID, tbUser.getId());
|
|
mapParameter.put(SystemConstant.FORM_USER_ID, tbUser.getId());
|
|
- MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.OE_IM_CLUSTERING.name(), recordId, MqTagEnum.OE_IM_CLUSTERING, String.valueOf(recordId), mapParameter, tbUser.getName());
|
|
|
|
|
|
+ MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.OE_IM_CLUSTERING.name(), recordId,
|
|
|
|
+ MqTagEnum.OE_IM_CLUSTERING, String.valueOf(recordId), mapParameter, tbUser.getName());
|
|
mqDtoService.assembleSendAsyncOrderMsg(mqDto);
|
|
mqDtoService.assembleSendAsyncOrderMsg(mqDto);
|
|
//发送mq给客户端监考消息end
|
|
//发送mq给客户端监考消息end
|
|
|
|
|
|
-// //发送mq给客户端监考强制活体验证start
|
|
|
|
-// mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), MqTagEnum.OE_LIVENESS_VERIFY.name(), recordId, MqTagEnum.OE_LIVENESS_VERIFY, String.valueOf(recordId), mapParameter, tbUser.getName());
|
|
|
|
-// mqDtoService.assembleSendOneOrderMsg(mqDto);
|
|
|
|
-// //发送mq给客户端监考强制活体验证end
|
|
|
|
|
|
+ // //发送mq给客户端监考强制活体验证start
|
|
|
|
+ // mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), MqTagEnum.OE_LIVENESS_VERIFY.name(), recordId, MqTagEnum.OE_LIVENESS_VERIFY, String.valueOf(recordId), mapParameter, tbUser.getName());
|
|
|
|
+ // mqDtoService.assembleSendOneOrderMsg(mqDto);
|
|
|
|
+ // //发送mq给客户端监考强制活体验证end
|
|
return ResultUtil.ok(true);
|
|
return ResultUtil.ok(true);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "结束监考接口")
|
|
@ApiOperation(value = "结束监考接口")
|
|
@RequestMapping(value = "/exam/finish", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/exam/finish", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class) })
|
|
public Result examFinish(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
|
|
public Result examFinish(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
|
|
- @ApiParam(value = "监考状态", required = true) @RequestParam InvigilateMonitorStatusEnum status) {
|
|
|
|
|
|
+ @ApiParam(value = "监考状态", required = true) @RequestParam InvigilateMonitorStatusEnum status) {
|
|
Optional.ofNullable(examId).orElseThrow(() -> new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL));
|
|
Optional.ofNullable(examId).orElseThrow(() -> new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL));
|
|
Optional.ofNullable(status).orElseThrow(() -> new BusinessException("监考状态不能为空"));
|
|
Optional.ofNullable(status).orElseThrow(() -> new BusinessException("监考状态不能为空"));
|
|
|
|
|
|
@@ -675,13 +805,20 @@ public class TIeInvigilateController {
|
|
private String getRemainTime(ExamModeEnum mode, Long recordId) {
|
|
private String getRemainTime(ExamModeEnum mode, Long recordId) {
|
|
String remainTime = null;
|
|
String remainTime = null;
|
|
Integer forceFinish = ExamRecordCacheUtil.getForceFinish(recordId);
|
|
Integer forceFinish = ExamRecordCacheUtil.getForceFinish(recordId);
|
|
- Integer maxDurationSeconds = Objects.isNull(ExamRecordCacheUtil.getMaxDurationSeconds(recordId)) ? 0 : ExamRecordCacheUtil.getMaxDurationSeconds(recordId);
|
|
|
|
- Integer durationSeconds = Objects.isNull(ExamRecordCacheUtil.getDurationSeconds(recordId)) ? 0 : ExamRecordCacheUtil.getDurationSeconds(recordId);
|
|
|
|
- Long endTime = Objects.isNull(ExamRecordCacheUtil.getEndTime(recordId)) ? 0 : ExamRecordCacheUtil.getEndTime(recordId);
|
|
|
|
|
|
+ Integer maxDurationSeconds = Objects.isNull(ExamRecordCacheUtil.getMaxDurationSeconds(recordId)) ?
|
|
|
|
+ 0 :
|
|
|
|
+ ExamRecordCacheUtil.getMaxDurationSeconds(recordId);
|
|
|
|
+ Integer durationSeconds = Objects.isNull(ExamRecordCacheUtil.getDurationSeconds(recordId)) ?
|
|
|
|
+ 0 :
|
|
|
|
+ ExamRecordCacheUtil.getDurationSeconds(recordId);
|
|
|
|
+ Long endTime = Objects.isNull(ExamRecordCacheUtil.getEndTime(recordId)) ?
|
|
|
|
+ 0 :
|
|
|
|
+ ExamRecordCacheUtil.getEndTime(recordId);
|
|
if (Objects.nonNull(mode) && Objects.equals(mode, ExamModeEnum.ANYTIME)) {
|
|
if (Objects.nonNull(mode) && Objects.equals(mode, ExamModeEnum.ANYTIME)) {
|
|
Long diffTime = (maxDurationSeconds.longValue() - durationSeconds.longValue()) * 1000;
|
|
Long diffTime = (maxDurationSeconds.longValue() - durationSeconds.longValue()) * 1000;
|
|
remainTime = diffTime.intValue() == 0 ? "00:00:00" : SystemConstant.getRemainTime(diffTime);
|
|
remainTime = diffTime.intValue() == 0 ? "00:00:00" : SystemConstant.getRemainTime(diffTime);
|
|
- } else if (Objects.nonNull(mode) && Objects.equals(mode, ExamModeEnum.TOGETHER) && Objects.nonNull(forceFinish) && forceFinish.intValue() == 1) {
|
|
|
|
|
|
+ } else if (Objects.nonNull(mode) && Objects.equals(mode, ExamModeEnum.TOGETHER) && Objects.nonNull(forceFinish)
|
|
|
|
+ && forceFinish.intValue() == 1) {
|
|
Long diffTime = endTime - System.currentTimeMillis();
|
|
Long diffTime = endTime - System.currentTimeMillis();
|
|
remainTime = diffTime.intValue() == 0 ? "00:00:00" : SystemConstant.getRemainTime(diffTime);
|
|
remainTime = diffTime.intValue() == 0 ? "00:00:00" : SystemConstant.getRemainTime(diffTime);
|
|
} else {
|
|
} else {
|