|
@@ -66,10 +66,14 @@ public class TIeInvigilateCallMobileController {
|
|
|
@ApiOperation(value = "监考监控通话查询接口")
|
|
|
@RequestMapping(value = "/call/list", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = TIeExamInvigilateCall.class)})
|
|
|
- public Result callList(@ApiParam(value = "考试批次id", required = true) @RequestParam(required = true) Long examId, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
|
+ public Result callList(@ApiParam(value = "考试批次id", required = true) @RequestParam(required = true) Long examId, @ApiParam(value = "通话状态", required = false) @RequestParam(required = false) String callStatus, @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);
|
|
|
}
|
|
|
+ if (Objects.nonNull(callStatus) && !Objects.equals(callStatus, "")) {
|
|
|
+ MonitorCallStatusSourceEnum callStatusEnum = MonitorCallStatusSourceEnum.valueOf(callStatus);
|
|
|
+ callStatus = callStatusEnum.name();
|
|
|
+ }
|
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
|
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
@@ -77,7 +81,7 @@ public class TIeInvigilateCallMobileController {
|
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
userId = tbUser.getId();
|
|
|
}
|
|
|
- IPage<TIeExamInvigilateCall> tIeExamInvigilateCallIPage = tIeExamInvigilateCallService.examInvigilateCallQuery(new Page<>(pageNumber, pageSize), examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name());
|
|
|
+ IPage<TIeExamInvigilateCall> tIeExamInvigilateCallIPage = tIeExamInvigilateCallService.examInvigilateCallQuery(new Page<>(pageNumber, pageSize), examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name(), callStatus);
|
|
|
BasePage basePage = new BasePage(tIeExamInvigilateCallIPage.getRecords(), tIeExamInvigilateCallIPage.getCurrent(), tIeExamInvigilateCallIPage.getSize(), tIeExamInvigilateCallIPage.getTotal());
|
|
|
return ResultUtil.ok(basePage);
|
|
|
}
|
|
@@ -85,10 +89,14 @@ public class TIeInvigilateCallMobileController {
|
|
|
@ApiOperation(value = "监考监控通话提醒接口")
|
|
|
@RequestMapping(value = "/call/count", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = Integer.class)})
|
|
|
- public Result callCount(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId) {
|
|
|
+ public Result callCount(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId, @ApiParam(value = "通话状态", required = false) @RequestParam(required = false) String callStatus) {
|
|
|
if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
}
|
|
|
+ if (Objects.nonNull(callStatus) && !Objects.equals(callStatus, "")) {
|
|
|
+ MonitorCallStatusSourceEnum callStatusEnum = MonitorCallStatusSourceEnum.valueOf(callStatus);
|
|
|
+ callStatus = callStatusEnum.name();
|
|
|
+ }
|
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
|
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
@@ -96,7 +104,7 @@ public class TIeInvigilateCallMobileController {
|
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
userId = tbUser.getId();
|
|
|
}
|
|
|
- int count = tIeExamInvigilateCallService.examInvigilateCallQueryCount(examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name());
|
|
|
+ int count = tIeExamInvigilateCallService.examInvigilateCallQueryCount(examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name(), callStatus);
|
|
|
return ResultUtil.ok(Collections.singletonMap("count", count));
|
|
|
}
|
|
|
|