|
@@ -12,6 +12,7 @@ import com.qmth.themis.business.bean.backend.*;
|
|
|
import com.qmth.themis.business.cache.RedisKeyHelper;
|
|
|
import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
|
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
|
+import com.qmth.themis.business.dto.AuthDto;
|
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
|
import com.qmth.themis.business.entity.*;
|
|
|
import com.qmth.themis.business.enums.*;
|
|
@@ -73,7 +74,7 @@ public class TIeInvigilateController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListBean.class)})
|
|
|
public Result list(@ApiParam(value = "考试批次id") @RequestParam Long examId,
|
|
|
@ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
- @ApiParam(value = "虚拟考场代码", required = true) @RequestParam Set<String> roomCodes,
|
|
|
+ @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,
|
|
@@ -87,10 +88,14 @@ public class TIeInvigilateController {
|
|
|
if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
}
|
|
|
- if (Objects.isNull(roomCodes) || Objects.equals(roomCodes, "")) {
|
|
|
- throw new BusinessException(ExceptionResultEnum.ROOMCODE_IS_NULL);
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
+ AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
|
|
|
+ //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
|
+ Long userId = null;
|
|
|
+ if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
+ userId = tbUser.getId();
|
|
|
}
|
|
|
- IPage<InvigilateListBean> invigilateListBeanIPage = tOeExamRecordService.invigilatePageList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodes, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
|
|
|
+ IPage<InvigilateListBean> invigilateListBeanIPage = tOeExamRecordService.invigilatePageList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId);
|
|
|
BasePage basePage = new BasePage(invigilateListBeanIPage.getRecords(), invigilateListBeanIPage.getCurrent(), invigilateListBeanIPage.getSize(), invigilateListBeanIPage.getTotal());
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.RECORDS, basePage);
|
|
@@ -102,7 +107,7 @@ public class TIeInvigilateController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListVideoBean.class)})
|
|
|
public Result listVideo(@ApiParam(value = "考试批次id") @RequestParam Long examId,
|
|
|
@ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
- @ApiParam(value = "虚拟考场代码", required = true) @RequestParam Set<String> roomCodes,
|
|
|
+ @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,
|
|
@@ -116,10 +121,14 @@ public class TIeInvigilateController {
|
|
|
if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
}
|
|
|
- if (Objects.isNull(roomCodes) || Objects.equals(roomCodes, "")) {
|
|
|
- throw new BusinessException(ExceptionResultEnum.ROOMCODE_IS_NULL);
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
+ AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
|
|
|
+ //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
|
+ Long userId = null;
|
|
|
+ if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
+ userId = tbUser.getId();
|
|
|
}
|
|
|
- IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodes, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
|
|
|
+ IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId);
|
|
|
BasePage basePage = new BasePage(invigilateListVideoBeanIPage.getRecords(), invigilateListVideoBeanIPage.getCurrent(), invigilateListVideoBeanIPage.getSize(), invigilateListVideoBeanIPage.getTotal());
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.RECORDS, basePage);
|
|
@@ -145,8 +154,9 @@ public class TIeInvigilateController {
|
|
|
String examStudentName = examStudentCacheBean.getName();
|
|
|
String courseNameCode = examStudentCacheBean.getCourseName() + "(" + examStudentCacheBean.getCourseCode() + ")";
|
|
|
String roomCode = examStudentCacheBean.getRoomCode();
|
|
|
+ String roomName = examStudentCacheBean.getRoomName();
|
|
|
Long studentId = examStudentCacheBean.getStudentId();
|
|
|
- InvigilateListDetailBean invigilateListDetailBean = new InvigilateListDetailBean(examId, examActivityId, examStudentId, examRecordId, identity, examStudentName, courseNameCode, status, roomCode, breachStatus);
|
|
|
+ InvigilateListDetailBean invigilateListDetailBean = new InvigilateListDetailBean(examId, examActivityId, examStudentId, examRecordId, identity, examStudentName, courseNameCode, status, roomCode, roomName, breachStatus);
|
|
|
|
|
|
//预警、异常、人脸
|
|
|
//预警
|
|
@@ -232,7 +242,7 @@ public class TIeInvigilateController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListPatrolBean.class)})
|
|
|
public Result patrolList(@ApiParam(value = "考试批次id") @RequestParam Long examId,
|
|
|
@ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
- @ApiParam(value = "虚拟考场代码", required = true) @RequestParam Set<String> roomCodes,
|
|
|
+ @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,
|
|
@@ -249,10 +259,14 @@ public class TIeInvigilateController {
|
|
|
if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
}
|
|
|
- if (Objects.isNull(roomCodes) || Objects.equals(roomCodes, "")) {
|
|
|
- throw new BusinessException(ExceptionResultEnum.ROOMCODE_IS_NULL);
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
+ AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
|
|
|
+ //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
|
+ Long userId = null;
|
|
|
+ if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
+ userId = tbUser.getId();
|
|
|
}
|
|
|
- IPage<InvigilateListPatrolBean> invigilateListPatrolBeanIPage = tOeExamRecordService.invigilatePagePatrolList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodes, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
|
|
|
+ IPage<InvigilateListPatrolBean> invigilateListPatrolBeanIPage = tOeExamRecordService.invigilatePagePatrolList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId);
|
|
|
BasePage basePage = new BasePage(invigilateListPatrolBeanIPage.getRecords(), invigilateListPatrolBeanIPage.getCurrent(), invigilateListPatrolBeanIPage.getSize(), invigilateListPatrolBeanIPage.getTotal());
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.RECORDS, basePage);
|
|
@@ -264,14 +278,18 @@ public class TIeInvigilateController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"count\":1}", response = Result.class)})
|
|
|
public Result warnNotify(@ApiParam(value = "考试批次id") @RequestParam Long examId,
|
|
|
@ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
- @ApiParam(value = "虚拟考场代码", required = true) @RequestParam Set<String> roomCodes) {
|
|
|
+ @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode) {
|
|
|
if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
}
|
|
|
- if (Objects.isNull(roomCodes) || Objects.equals(roomCodes, "")) {
|
|
|
- throw new BusinessException(ExceptionResultEnum.ROOMCODE_IS_NULL);
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
+ AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
|
|
|
+ //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
|
+ Long userId = null;
|
|
|
+ if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
+ userId = tbUser.getId();
|
|
|
}
|
|
|
- Integer count = tIeInvigilateWarnInfoService.warningCount(examId, examActivityId, roomCodes);
|
|
|
+ Integer count = tIeInvigilateWarnInfoService.warningCount(examId, examActivityId, roomCode, userId);
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.COUNT, count);
|
|
|
return ResultUtil.ok(map);
|
|
@@ -282,7 +300,7 @@ public class TIeInvigilateController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考预警信息", response = InvigilateListWarningBean.class)})
|
|
|
public Result warnList(@ApiParam(value = "考试批次id") @RequestParam Long examId,
|
|
|
@ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
|
|
|
- @ApiParam(value = "虚拟考场代码", required = true) @RequestParam Set<String> roomCodes,
|
|
|
+ @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
|
|
|
@ApiParam(value = "审阅状态", required = false) @RequestParam(required = false) Integer approveStatus,
|
|
|
@ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
|
@ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
|
|
@@ -299,16 +317,48 @@ public class TIeInvigilateController {
|
|
|
if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
}
|
|
|
- if (Objects.isNull(roomCodes) || Objects.equals(roomCodes, "")) {
|
|
|
- throw new BusinessException(ExceptionResultEnum.ROOMCODE_IS_NULL);
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
+ AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
|
|
|
+ //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
|
+ Long userId = null;
|
|
|
+ if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
+ userId = tbUser.getId();
|
|
|
}
|
|
|
- IPage<InvigilateListWarningBean> invigilateListWarningBeanIPage = tOeExamRecordService.invigilatePageWarningList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodes, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
|
|
|
+ IPage<InvigilateListWarningBean> invigilateListWarningBeanIPage = tOeExamRecordService.invigilatePageWarningList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId);
|
|
|
BasePage basePage = new BasePage(invigilateListWarningBeanIPage.getRecords(), invigilateListWarningBeanIPage.getCurrent(), invigilateListWarningBeanIPage.getSize(), invigilateListWarningBeanIPage.getTotal());
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.RECORDS, basePage);
|
|
|
return ResultUtil.ok(map);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "进度查询列表接口")
|
|
|
+ @RequestMapping(value = "/progress/list", method = RequestMethod.POST)
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "监考进度信息", response = InvigilateListProgressBean.class)})
|
|
|
+ public Result progressList(@ApiParam(value = "考试批次id") @RequestParam 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 = true) @RequestParam int pageNumber,
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
|
+ if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
+ }
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
+ AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
|
|
|
+ //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
|
+ Long userId = null;
|
|
|
+ if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
+ userId = tbUser.getId();
|
|
|
+ }
|
|
|
+ IPage<InvigilateListProgressBean> invigilateListProgressBeanIPage = tOeExamRecordService.invigilatePageProgressList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, userId);
|
|
|
+ BasePage basePage = new BasePage(invigilateListProgressBeanIPage.getRecords(), invigilateListProgressBeanIPage.getCurrent(), invigilateListProgressBeanIPage.getSize(), invigilateListProgressBeanIPage.getTotal());
|
|
|
+ Map map = new HashMap<>();
|
|
|
+ map.put(SystemConstant.RECORDS, basePage);
|
|
|
+ return ResultUtil.ok(map);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "违纪处理接口")
|
|
|
@RequestMapping(value = "/breach", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|