Explorar el Código

监考端接口

wangliang hace 4 años
padre
commit
b1d9af7bd7
Se han modificado 17 ficheros con 586 adiciones y 128 borrados
  1. 5 3
      themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamController.java
  2. 71 21
      themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateController.java
  3. 11 0
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListBean.java
  4. 26 16
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListDetailBean.java
  5. 11 0
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListPatrolBean.java
  6. 182 0
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListProgressBean.java
  7. 11 0
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListVideoBean.java
  8. 11 0
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListWarningBean.java
  9. 4 4
      themis-business/src/main/java/com/qmth/themis/business/dao/TIeInvigilateWarnInfoMapper.java
  10. 53 27
      themis-business/src/main/java/com/qmth/themis/business/dao/TOeExamRecordMapper.java
  11. 26 2
      themis-business/src/main/java/com/qmth/themis/business/dto/ExamPropCountDto.java
  12. 4 2
      themis-business/src/main/java/com/qmth/themis/business/service/TIeInvigilateWarnInfoService.java
  13. 42 16
      themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java
  14. 4 4
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeInvigilateWarnInfoServiceImpl.java
  15. 37 17
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java
  16. 11 5
      themis-business/src/main/resources/mapper/TIeInvigilateWarnInfoMapper.xml
  17. 77 11
      themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

+ 5 - 3
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamController.java

@@ -33,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.stream.Collectors;
@@ -352,10 +353,10 @@ public class TEExamController {
         //首先查询当前用户所要监控的roomCode
         QueryWrapper<TBExamInvigilateUser> examInvigilateUserQueryWrapper = new QueryWrapper<>();
         AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
-        //如果有监考员角色,只能查看自己所监考的考场,巡考员则可以查看全部考场
+        //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         examInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getOrgId, tbUser.getOrgId());
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            examInvigilateUserQueryWrapper.lambda().in(TBExamInvigilateUser::getUserId, tbUser.getId());
+            examInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId());
         }
         List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(examInvigilateUserQueryWrapper);
         Set<String> roomCodeSet = null;
@@ -448,7 +449,8 @@ public class TEExamController {
             });
         }
         notComplete = allCount - alreadyComplete.get();
-        ExamPropCountDto examPropCountDto = new ExamPropCountDto(examId, allCount, loginCount, prepareCount.get(), examCount.get(), clientCommunicationStatusCount.get(), monitorStatusSourceCount.get(), alreadyComplete.get(), notComplete, roomCodeSet);
+        BigDecimal completionRate = new BigDecimal(alreadyComplete.get()).divide(new BigDecimal(allCount)).setScale(2, BigDecimal.ROUND_HALF_UP);
+        ExamPropCountDto examPropCountDto = new ExamPropCountDto(examId, allCount, loginCount, prepareCount.get(), examCount.get(), clientCommunicationStatusCount.get(), monitorStatusSourceCount.get(), alreadyComplete.get(), notComplete, completionRate);
         return ResultUtil.ok(examPropCountDto);
     }
 }

+ 71 - 21
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateController.java

@@ -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)})

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListBean.java

@@ -30,6 +30,9 @@ public class InvigilateListBean implements Serializable {
     @ApiModelProperty(name = "虚拟考场代码")
     private String roomCode;
 
+    @ApiModelProperty(name = "虚拟考场名称")
+    private String roomName;
+
     @ApiModelProperty(name = "姓名")
     private String name;
 
@@ -69,6 +72,14 @@ public class InvigilateListBean implements Serializable {
     @ApiModelProperty(name = "更新时间")
     private Date updateTime;
 
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
+
     public Date getUpdateTime() {
         return updateTime;
     }

+ 26 - 16
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListDetailBean.java

@@ -1,7 +1,5 @@
 package com.qmth.themis.business.bean.backend;
 
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.qmth.themis.business.enums.ExamRecordStatusEnum;
 import com.qmth.themis.business.enums.ExceptionEnum;
 import com.qmth.themis.business.enums.VerifyExceptionEnum;
@@ -52,6 +50,9 @@ public class InvigilateListDetailBean implements Serializable {
     @ApiModelProperty(name = "虚拟考场代码")
     private String roomCode;
 
+    @ApiModelProperty(name = "虚拟考场名称")
+    private String roomName;
+
     @ApiModelProperty(name = "系统预警")
     private Integer warningCount;
 
@@ -77,7 +78,7 @@ public class InvigilateListDetailBean implements Serializable {
 
     }
 
-    public InvigilateListDetailBean(Long examId, Long examActivityId, Long examStudentId, Long examRecordId, String identity, String examStudentName, String courseNameCode, ExamRecordStatusEnum statusCode, String roomCode, Integer breachStatus) {
+    public InvigilateListDetailBean(Long examId, Long examActivityId, Long examStudentId, Long examRecordId, String identity, String examStudentName, String courseNameCode, ExamRecordStatusEnum statusCode, String roomCode, String roomName, Integer breachStatus) {
         this.examId = examId;
         this.examActivityId = examActivityId;
         this.examStudentId = examStudentId;
@@ -87,9 +88,18 @@ public class InvigilateListDetailBean implements Serializable {
         this.courseNameCode = courseNameCode;
         this.statusCode = statusCode;
         this.roomCode = roomCode;
+        this.roomName = roomName;
         this.breachStatus = breachStatus;
     }
 
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
+
     public List<StudentLogBean> getStudentLogs() {
         return studentLogs;
     }
@@ -230,13 +240,13 @@ public class InvigilateListDetailBean implements Serializable {
     }
 
     /**
-    * @Description: 预警bean
-    * @Param:
-    * @return:
-    * @Author: wangliang
-    * @Date: 2020/8/24
-    */
-    public class InvigilateWarnInfoBean implements Serializable{
+     * @Description: 预警bean
+     * @Param:
+     * @return:
+     * @Author: wangliang
+     * @Date: 2020/8/24
+     */
+    public class InvigilateWarnInfoBean implements Serializable {
 
         @ApiModelProperty(value = "预警信息")
         private String info;
@@ -306,12 +316,12 @@ public class InvigilateListDetailBean implements Serializable {
     }
 
     /**
-    * @Description: 异常bean
-    * @Param:
-    * @return:
-    * @Author: wangliang
-    * @Date: 2020/8/24
-    */
+     * @Description: 异常bean
+     * @Param:
+     * @return:
+     * @Author: wangliang
+     * @Date: 2020/8/24
+     */
     public class InvigilateExceptionInfoBean implements Serializable {
         @ApiModelProperty(value = "异常信息")
         private String info;

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListPatrolBean.java

@@ -59,6 +59,17 @@ public class InvigilateListPatrolBean implements Serializable {
     @ApiModelProperty(name = "更新时间")
     private Date updateTime;
 
+    @ApiModelProperty(name = "虚拟考场名称")
+    private String roomName;
+
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
+
     public Integer getMultipleFaceCount() {
         return multipleFaceCount;
     }

+ 182 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListProgressBean.java

@@ -0,0 +1,182 @@
+package com.qmth.themis.business.bean.backend;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 进度查询返回对象
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/8/22
+ */
+@ApiModel("进度查询返回对象")
+public class InvigilateListProgressBean implements Serializable {
+
+    @ApiModelProperty(name = "考试id")
+    private Long examId;
+
+    @ApiModelProperty(name = "场次id")
+    private Long examActivityId;
+
+    @ApiModelProperty(name = "考生id")
+    private Long examStudentId;
+
+    @ApiModelProperty(name = "考试记录id")
+    private Long examRecordId;
+
+    @ApiModelProperty(name = "考试批次")
+    private String examName;
+
+    @ApiModelProperty(name = "考试场次")
+    private String examActivityCode;
+
+    @ApiModelProperty(name = "证件号")
+    private String identity;
+
+    @ApiModelProperty(name = "虚拟考场代码")
+    private String roomCode;
+
+    @ApiModelProperty(name = "虚拟考场名称")
+    private String roomName;
+
+    @ApiModelProperty(name = "姓名")
+    private String name;
+
+    @ApiModelProperty(name = "考生状态")
+    private String status;
+
+    @ApiModelProperty(name = "联系电话")
+    private String mobileNumber;
+
+    @ApiModelProperty(name = "科目名称")
+    private String courseName;
+
+    @ApiModelProperty(name = "科目编码")
+    private String courseCode;
+
+    @ApiModelProperty(value = "剩余考试次数")
+    private Integer leftExamCount;
+
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
+
+    public String getExamName() {
+        return examName;
+    }
+
+    public void setExamName(String examName) {
+        this.examName = examName;
+    }
+
+    public String getExamActivityCode() {
+        return examActivityCode;
+    }
+
+    public void setExamActivityCode(String examActivityCode) {
+        this.examActivityCode = examActivityCode;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public Long getExamActivityId() {
+        return examActivityId;
+    }
+
+    public void setExamActivityId(Long examActivityId) {
+        this.examActivityId = examActivityId;
+    }
+
+    public Long getExamStudentId() {
+        return examStudentId;
+    }
+
+    public void setExamStudentId(Long examStudentId) {
+        this.examStudentId = examStudentId;
+    }
+
+    public Long getExamRecordId() {
+        return examRecordId;
+    }
+
+    public void setExamRecordId(Long examRecordId) {
+        this.examRecordId = examRecordId;
+    }
+
+    public String getIdentity() {
+        return identity;
+    }
+
+    public void setIdentity(String identity) {
+        this.identity = identity;
+    }
+
+    public String getRoomCode() {
+        return roomCode;
+    }
+
+    public void setRoomCode(String roomCode) {
+        this.roomCode = roomCode;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getMobileNumber() {
+        return mobileNumber;
+    }
+
+    public void setMobileNumber(String mobileNumber) {
+        this.mobileNumber = mobileNumber;
+    }
+
+    public Integer getLeftExamCount() {
+        return leftExamCount;
+    }
+
+    public void setLeftExamCount(Integer leftExamCount) {
+        this.leftExamCount = leftExamCount;
+    }
+}

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListVideoBean.java

@@ -37,6 +37,9 @@ public class InvigilateListVideoBean implements Serializable {
     @ApiModelProperty(name = "虚拟考场代码")
     private String roomCode;
 
+    @ApiModelProperty(name = "虚拟考场名称")
+    private String roomName;
+
     @ApiModelProperty(name = "姓名")
     private String name;
 
@@ -58,6 +61,14 @@ public class InvigilateListVideoBean implements Serializable {
     @ApiModelProperty(name = "更新时间")
     private Date updateTime;
 
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
+
     public Date getUpdateTime() {
         return updateTime;
     }

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListWarningBean.java

@@ -41,6 +41,9 @@ public class InvigilateListWarningBean implements Serializable {
     @ApiModelProperty(name = "虚拟考场代码")
     private String roomCode;
 
+    @ApiModelProperty(name = "虚拟考场名称")
+    private String roomName;
+
     @ApiModelProperty(name = "姓名")
     private String name;
 
@@ -74,6 +77,14 @@ public class InvigilateListWarningBean implements Serializable {
     @ApiModelProperty(value = "审阅状态,0:未阅,1:已阅")
     private Integer approveStatus;
 
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
+
     public String getExamName() {
         return examName;
     }

+ 4 - 4
themis-business/src/main/java/com/qmth/themis/business/dao/TIeInvigilateWarnInfoMapper.java

@@ -5,8 +5,6 @@ import com.qmth.themis.business.entity.TIeInvigilateWarnInfo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.Set;
-
 /**
  * @Description: 监考预警信息 Mapper 接口
  * @Param:
@@ -22,10 +20,12 @@ public interface TIeInvigilateWarnInfoMapper extends BaseMapper<TIeInvigilateWar
      *
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
+     * @param userId
      * @return
      */
     public Integer warningCount(@Param("examId") Long examId,
                                 @Param("examActivityId") Long examActivityId,
-                                @Param("roomCodes") Set<String> roomCodes);
+                                @Param("roomCode") String roomCode,
+                                @Param("userId") Long userId);
 }

+ 53 - 27
themis-business/src/main/java/com/qmth/themis/business/dao/TOeExamRecordMapper.java

@@ -2,10 +2,7 @@ package com.qmth.themis.business.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.qmth.themis.business.bean.backend.InvigilateListBean;
-import com.qmth.themis.business.bean.backend.InvigilateListPatrolBean;
-import com.qmth.themis.business.bean.backend.InvigilateListVideoBean;
-import com.qmth.themis.business.bean.backend.InvigilateListWarningBean;
+import com.qmth.themis.business.bean.backend.*;
 import com.qmth.themis.business.dto.response.TEExamUnFinishDto;
 import com.qmth.themis.business.entity.TOeExamRecord;
 import org.apache.ibatis.annotations.Mapper;
@@ -49,7 +46,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param paperDownload
      * @param status
      * @param name
@@ -58,11 +55,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     public IPage<InvigilateListBean> invigilatePageList(IPage<Map> iPage, @Param("examId") Long examId,
                                                         @Param("examActivityId") Long examActivityId,
-                                                        @Param("roomCodes") Set roomCodes,
+                                                        @Param("roomCode") String roomCode,
                                                         @Param("paperDownload") Integer paperDownload,
                                                         @Param("status") String status,
                                                         @Param("name") String name,
@@ -70,7 +68,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                         @Param("minWarningCount") Integer minWarningCount,
                                                         @Param("maxWarningCount") Integer maxWarningCount,
                                                         @Param("clientWebsocketStatus") String clientWebsocketStatus,
-                                                        @Param("monitorStatusSource") String monitorStatusSource);
+                                                        @Param("monitorStatusSource") String monitorStatusSource,
+                                                        @Param("userId")Long userId);
 
     /**
      * 查询实时监控台视频列表
@@ -78,7 +77,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param paperDownload
      * @param status
      * @param name
@@ -87,11 +86,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, @Param("examId") Long examId,
                                                                   @Param("examActivityId") Long examActivityId,
-                                                                  @Param("roomCodes") Set<String> roomCodes,
+                                                                  @Param("roomCode") String roomCode,
                                                                   @Param("paperDownload") Integer paperDownload,
                                                                   @Param("status") String status,
                                                                   @Param("name") String name,
@@ -99,7 +99,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                   @Param("minWarningCount") Integer minWarningCount,
                                                                   @Param("maxWarningCount") Integer maxWarningCount,
                                                                   @Param("clientWebsocketStatus") String clientWebsocketStatus,
-                                                                  @Param("monitorStatusSource") String monitorStatusSource);
+                                                                  @Param("monitorStatusSource") String monitorStatusSource,
+                                                                  @Param("userId")Long userId);
 
     /**
      * 查询在线巡考列表
@@ -107,7 +108,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param status
      * @param name
      * @param identity
@@ -119,11 +120,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, @Param("examId") Long examId,
                                                                     @Param("examActivityId") Long examActivityId,
-                                                                    @Param("roomCodes") Set<String> roomCodes,
+                                                                    @Param("roomCode") String roomCode,
                                                                     @Param("status") String status,
                                                                     @Param("name") String name,
                                                                     @Param("identity") String identity,
@@ -134,7 +136,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                     @Param("minWarningCount") Integer minWarningCount,
                                                                     @Param("maxWarningCount") Integer maxWarningCount,
                                                                     @Param("clientWebsocketStatus") String clientWebsocketStatus,
-                                                                    @Param("monitorStatusSource") String monitorStatusSource);
+                                                                    @Param("monitorStatusSource") String monitorStatusSource,
+                                                                    @Param("userId")Long userId);
 
     /**
      * 预警提醒列表
@@ -142,7 +145,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param approveStatus
      * @param name
      * @param identity
@@ -154,20 +157,43 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, @Param("examId") Long examId,
-                                                                           @Param("examActivityId") Long examActivityId,
-                                                                           @Param("roomCodes") Set<String> roomCodes,
-                                                                           @Param("approveStatus") Integer approveStatus,
-                                                                           @Param("name") String name,
-                                                                           @Param("identity") String identity,
-                                                                           @Param("minMultipleFaceCount") Integer minMultipleFaceCount,
-                                                                           @Param("maxMultipleFaceCount") Integer maxMultipleFaceCount,
-                                                                           @Param("minExceptionCount") Integer minExceptionCount,
-                                                                           @Param("maxExceptionCount") Integer maxExceptionCount,
-                                                                           @Param("minWarningCount") Integer minWarningCount,
-                                                                           @Param("maxWarningCount") Integer maxWarningCount,
-                                                                           @Param("clientWebsocketStatus") String clientWebsocketStatus,
-                                                                           @Param("monitorStatusSource") String monitorStatusSource);
+                                                                      @Param("examActivityId") Long examActivityId,
+                                                                      @Param("roomCode") String roomCode,
+                                                                      @Param("approveStatus") Integer approveStatus,
+                                                                      @Param("name") String name,
+                                                                      @Param("identity") String identity,
+                                                                      @Param("minMultipleFaceCount") Integer minMultipleFaceCount,
+                                                                      @Param("maxMultipleFaceCount") Integer maxMultipleFaceCount,
+                                                                      @Param("minExceptionCount") Integer minExceptionCount,
+                                                                      @Param("maxExceptionCount") Integer maxExceptionCount,
+                                                                      @Param("minWarningCount") Integer minWarningCount,
+                                                                      @Param("maxWarningCount") Integer maxWarningCount,
+                                                                      @Param("clientWebsocketStatus") String clientWebsocketStatus,
+                                                                      @Param("monitorStatusSource") String monitorStatusSource,
+                                                                      @Param("userId")Long userId);
+
+    /**
+     * 进度查询列表
+     *
+     * @param iPage
+     * @param examId
+     * @param examActivityId
+     * @param roomCode
+     * @param courseCode
+     * @param name
+     * @param identity
+     * @param userId
+     * @return
+     */
+    public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, @Param("examId") Long examId,
+                                                                        @Param("examActivityId") Long examActivityId,
+                                                                        @Param("roomCode") String roomCode,
+                                                                        @Param("courseCode") String courseCode,
+                                                                        @Param("name") String name,
+                                                                        @Param("identity") String identity,
+                                                                        @Param("userId")Long userId);
 }

+ 26 - 2
themis-business/src/main/java/com/qmth/themis/business/dto/ExamPropCountDto.java

@@ -1,6 +1,7 @@
 package com.qmth.themis.business.dto;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.Set;
 
 /**
@@ -21,13 +22,14 @@ public class ExamPropCountDto implements Serializable {
     private Integer monitorStatusSourceCount;//监控设备通讯故障
     private Integer alreadyComplete;//已完成
     private Integer notComplete;//未完成
-    private Set<String> roomCodes;
+    private Set<String> roomCodes;//虚拟考场代码
+    private BigDecimal completionRate;//完成率
 
     public ExamPropCountDto() {
 
     }
 
-    public ExamPropCountDto(Long examId, Integer allCount, Integer loginCount, Integer prepareCount, Integer examCount, Integer clientCommunicationStatusCount, Integer monitorStatusSourceCount, Integer alreadyComplete, Integer notComplete, Set<String> roomCodes) {
+    public ExamPropCountDto(Long examId, Integer allCount, Integer loginCount, Integer prepareCount, Integer examCount, Integer clientCommunicationStatusCount, Integer monitorStatusSourceCount, Integer alreadyComplete, Integer notComplete, Set<String> roomCodes, BigDecimal completionRate) {
         this.examId = examId;
         this.allCount = allCount;
         this.loginCount = loginCount;
@@ -38,6 +40,28 @@ public class ExamPropCountDto implements Serializable {
         this.alreadyComplete = alreadyComplete;
         this.notComplete = notComplete;
         this.roomCodes = roomCodes;
+        this.completionRate = completionRate;
+    }
+
+    public ExamPropCountDto(Long examId, Integer allCount, Integer loginCount, Integer prepareCount, Integer examCount, Integer clientCommunicationStatusCount, Integer monitorStatusSourceCount, Integer alreadyComplete, Integer notComplete, BigDecimal completionRate) {
+        this.examId = examId;
+        this.allCount = allCount;
+        this.loginCount = loginCount;
+        this.prepareCount = prepareCount;
+        this.examCount = examCount;
+        this.clientCommunicationStatusCount = clientCommunicationStatusCount;
+        this.monitorStatusSourceCount = monitorStatusSourceCount;
+        this.alreadyComplete = alreadyComplete;
+        this.notComplete = notComplete;
+        this.completionRate = completionRate;
+    }
+
+    public BigDecimal getCompletionRate() {
+        return completionRate;
+    }
+
+    public void setCompletionRate(BigDecimal completionRate) {
+        this.completionRate = completionRate;
     }
 
     public Set<String> getRoomCodes() {

+ 4 - 2
themis-business/src/main/java/com/qmth/themis/business/service/TIeInvigilateWarnInfoService.java

@@ -20,10 +20,12 @@ public interface TIeInvigilateWarnInfoService extends IService<TIeInvigilateWarn
      *
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
+     * @param userId
      * @return
      */
     public Integer warningCount(Long examId,
                                 Long examActivityId,
-                                Set<String> roomCodes);
+                                String roomCode,
+                                Long userId);
 }

+ 42 - 16
themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java

@@ -2,10 +2,7 @@ package com.qmth.themis.business.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.qmth.themis.business.bean.backend.InvigilateListBean;
-import com.qmth.themis.business.bean.backend.InvigilateListPatrolBean;
-import com.qmth.themis.business.bean.backend.InvigilateListVideoBean;
-import com.qmth.themis.business.bean.backend.InvigilateListWarningBean;
+import com.qmth.themis.business.bean.backend.*;
 import com.qmth.themis.business.entity.TOeExamRecord;
 import com.qmth.themis.business.enums.ExamTypeEnum;
 import com.qmth.themis.business.enums.LivenessTypeEnum;
@@ -103,7 +100,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param paperDownload
      * @param status
      * @param name
@@ -112,11 +109,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     public IPage<InvigilateListBean> invigilatePageList(IPage<Map> iPage, Long examId,
                                                         Long examActivityId,
-                                                        Set<String> roomCodes,
+                                                        String roomCode,
                                                         Integer paperDownload,
                                                         String status,
                                                         String name,
@@ -124,7 +122,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                         Integer minWarningCount,
                                                         Integer maxWarningCount,
                                                         String clientWebsocketStatus,
-                                                        String monitorStatusSource);
+                                                        String monitorStatusSource,
+                                                        Long userId);
 
     /**
      * 查询实时监控台列表
@@ -132,7 +131,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param paperDownload
      * @param status
      * @param name
@@ -141,11 +140,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId,
                                                                   Long examActivityId,
-                                                                  Set<String> roomCodes,
+                                                                  String roomCode,
                                                                   Integer paperDownload,
                                                                   String status,
                                                                   String name,
@@ -153,7 +153,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                   Integer minWarningCount,
                                                                   Integer maxWarningCount,
                                                                   String clientWebsocketStatus,
-                                                                  String monitorStatusSource);
+                                                                  String monitorStatusSource,
+                                                                  Long userId);
 
     /**
      * 查询在线巡考列表
@@ -161,7 +162,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param status
      * @param name
      * @param identity
@@ -173,11 +174,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId,
                                                                     Long examActivityId,
-                                                                    Set<String> roomCodes,
+                                                                    String roomCode,
                                                                     String status,
                                                                     String name,
                                                                     String identity,
@@ -188,7 +190,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                     Integer minWarningCount,
                                                                     Integer maxWarningCount,
                                                                     String clientWebsocketStatus,
-                                                                    String monitorStatusSource);
+                                                                    String monitorStatusSource,
+                                                                    Long userId);
 
     /**
      * 预警提醒列表
@@ -196,7 +199,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param approveStatus
      * @param name
      * @param identity
@@ -208,11 +211,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId,
                                                                       Long examActivityId,
-                                                                      Set<String> roomCodes,
+                                                                      String roomCode,
                                                                       Integer approveStatus,
                                                                       String name,
                                                                       String identity,
@@ -223,5 +227,27 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                       Integer minWarningCount,
                                                                       Integer maxWarningCount,
                                                                       String clientWebsocketStatus,
-                                                                      String monitorStatusSource);
+                                                                      String monitorStatusSource,
+                                                                      Long userId);
+
+    /**
+     * 进度查询列表
+     *
+     * @param iPage
+     * @param examId
+     * @param examActivityId
+     * @param roomCode
+     * @param courseCode
+     * @param name
+     * @param identity
+     * @param userId
+     * @return
+     */
+    public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId,
+                                                                        Long examActivityId,
+                                                                        String roomCode,
+                                                                        String courseCode,
+                                                                        String name,
+                                                                        String identity,
+                                                                        Long userId);
 }

+ 4 - 4
themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeInvigilateWarnInfoServiceImpl.java

@@ -7,7 +7,6 @@ import com.qmth.themis.business.service.TIeInvigilateWarnInfoService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.Set;
 
 /**
  * @Description: 监考预警信息 服务实现类
@@ -27,11 +26,12 @@ public class TIeInvigilateWarnInfoServiceImpl extends ServiceImpl<TIeInvigilateW
      *
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
+     * @param userId
      * @return
      */
     @Override
-    public Integer warningCount(Long examId, Long examActivityId, Set<String> roomCodes) {
-        return tIeInvigilateWarnInfoMapper.warningCount(examId, examActivityId, roomCodes);
+    public Integer warningCount(Long examId, Long examActivityId, String roomCode, Long userId) {
+        return tIeInvigilateWarnInfoMapper.warningCount(examId, examActivityId, roomCode, userId);
     }
 }

+ 37 - 17
themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java

@@ -3,10 +3,7 @@ package com.qmth.themis.business.service.impl;
 import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.qmth.themis.business.bean.backend.InvigilateListBean;
-import com.qmth.themis.business.bean.backend.InvigilateListPatrolBean;
-import com.qmth.themis.business.bean.backend.InvigilateListVideoBean;
-import com.qmth.themis.business.bean.backend.InvigilateListWarningBean;
+import com.qmth.themis.business.bean.backend.*;
 import com.qmth.themis.business.cache.ExamRecordCacheUtil;
 import com.qmth.themis.business.cache.RedisKeyHelper;
 import com.qmth.themis.business.cache.bean.*;
@@ -416,7 +413,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param paperDownload
      * @param status
      * @param name
@@ -425,12 +422,13 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     @Override
     public IPage<InvigilateListBean> invigilatePageList(IPage<Map> iPage, Long examId,
                                                         Long examActivityId,
-                                                        Set<String> roomCodes,
+                                                        String roomCode,
                                                         Integer paperDownload,
                                                         String status,
                                                         String name,
@@ -438,8 +436,9 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
                                                         Integer minWarningCount,
                                                         Integer maxWarningCount,
                                                         String clientWebsocketStatus,
-                                                        String monitorStatusSource) {
-        return tOeExamRecordMapper.invigilatePageList(iPage, examId, examActivityId, roomCodes, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
+                                                        String monitorStatusSource,
+                                                        Long userId) {
+        return tOeExamRecordMapper.invigilatePageList(iPage, examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId);
     }
 
     /**
@@ -448,7 +447,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param paperDownload
      * @param status
      * @param name
@@ -457,11 +456,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     @Override
-    public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId, Set<String> roomCodes, Integer paperDownload, String status, String name, String identity, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String monitorStatusSource) {
-        return tOeExamRecordMapper.invigilatePageListVideo(iPage, examId, examActivityId, roomCodes, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
+    public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, Integer paperDownload, String status, String name, String identity, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String monitorStatusSource, Long userId) {
+        return tOeExamRecordMapper.invigilatePageListVideo(iPage, examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId);
     }
 
     /**
@@ -470,7 +470,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param status
      * @param name
      * @param identity
@@ -482,11 +482,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     @Override
-    public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId, Long examActivityId, Set<String> roomCodes, String status, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String monitorStatusSource) {
-        return tOeExamRecordMapper.invigilatePagePatrolList(iPage, examId, examActivityId, roomCodes, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
+    public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String status, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String monitorStatusSource, Long userId) {
+        return tOeExamRecordMapper.invigilatePagePatrolList(iPage, examId, examActivityId, roomCode, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId);
     }
 
     /**
@@ -495,7 +496,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param examId
      * @param examActivityId
-     * @param roomCodes
+     * @param roomCode
      * @param approveStatus
      * @param name
      * @param identity
@@ -507,10 +508,29 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param monitorStatusSource
+     * @param userId
      * @return
      */
     @Override
-    public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId, Long examActivityId, Set<String> roomCodes, Integer approveStatus, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String monitorStatusSource) {
-        return tOeExamRecordMapper.invigilatePageWarningList(iPage, examId, examActivityId, roomCodes, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource);
+    public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, Integer approveStatus, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String monitorStatusSource, Long userId) {
+        return tOeExamRecordMapper.invigilatePageWarningList(iPage, examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, monitorStatusSource, userId);
+    }
+
+    /**
+     * 进度查询列表
+     *
+     * @param iPage
+     * @param examId
+     * @param examActivityId
+     * @param roomCode
+     * @param courseCode
+     * @param name
+     * @param identity
+     * @param userId
+     * @return
+     */
+    @Override
+    public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Long userId) {
+        return tOeExamRecordMapper.invigilatePageProgressList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, userId);
     }
 }

+ 11 - 5
themis-business/src/main/resources/mapper/TIeInvigilateWarnInfoMapper.xml

@@ -5,18 +5,24 @@
     <select id="warningCount" resultType="java.lang.Integer">
         select count(1) as count
         from t_ie_invigilate_warn_info tiiwi
-        left join t_e_exam_student tees on tiiwi.exam_id = tees.exam_id
+        left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
+        inner join (select toer.id from t_oe_exam_record toer where EXISTS(select tees.id from t_e_exam_student tees where EXISTS (select distinct tbeiu.room_code from t_b_exam_invigilate_user tbeiu
+        where
+        <if test="userId != null and userId != ''">
+            tbeiu.user_id = #{userId} and
+        </if>
+        tbeiu.room_code = tees.room_code and toer.exam_student_id = tees.id))) t on t.id = tiiwi.exam_record_id
         <where>
-            tees.room_code in
-            <foreach collection="roomCodes" item="roomCode" index="index" open="(" close=")" separator=",">
-                #{roomCode}
-            </foreach>
             <if test="examId != null and examId != ''">
                 and tiiwi.exam_id = #{examId}
             </if>
             <if test="examActivityId != null and examActivityId != ''">
                 and tiiwi.exam_activity_id = #{examActivityId}
             </if>
+            <if test="roomCode != null and roomCode != ''">
+                and tees.room_code = #{roomCode}
+            </if>
+            and tiiwi.approve_status = 0
         </where>
     </select>
 </mapper>

+ 77 - 11
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -88,6 +88,7 @@
             t.id examRecordId,
             s.identity identity,
             s.room_code roomCode,
+            s.room_name roomName,
             s.name name,
             s.course_name courseName,
             s.course_code courseCode,
@@ -104,20 +105,25 @@
     <sql id="invigilatePageMiddle">
         from t_oe_exam_record t
         left join t_e_exam_student s on t.exam_student_id = s.id
+        inner join (select toer.id from t_oe_exam_record toer where EXISTS(select tees.id from t_e_exam_student tees where EXISTS (select distinct tbeiu.room_code from t_b_exam_invigilate_user tbeiu
+        where
+        <if test="userId != null and userId != ''">
+            tbeiu.user_id = #{userId} and
+        </if>
+        tbeiu.room_code = tees.room_code and toer.exam_student_id = tees.id))) t1 on t1.id = t.id
     </sql>
 
     <sql id="invigilatePageFoot">
         <where>
-             s.room_code in
-            <foreach collection="roomCodes" item="roomCode" index="index" open="(" close=")" separator=",">
-                #{roomCode}
-            </foreach>
             <if test="examId != null and examId != ''">
                 and t.exam_id = #{examId}
             </if>
             <if test="examActivityId != null and examActivityId != ''">
                 and t.exam_activity_id = #{examActivityId}
             </if>
+            <if test="roomCode != null and roomCode != ''">
+                and s.room_code = #{roomCode}
+            </if>
             <if test="status != null and status != ''">
                 and t.status = #{status}
             </if>
@@ -139,6 +145,7 @@
             <if test="monitorStatusSource != null and monitorStatusSource != ''">
                 and t.monitor_status_source = #{monitorStatusSource}
             </if>
+                and s.enable = 1
         </where>
     </sql>
 
@@ -211,19 +218,24 @@
          from t_ie_invigilate_warn_info tiiwi
         left join t_e_exam tee on tee.id = tiiwi.exam_id
         left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
-        left join t_e_exam_student tees on tees.exam_id = tiiwi.exam_id
-        left join t_oe_exam_record toer on toer.exam_student_id = tees.id
-            <where>
-                tees.room_code in
-                <foreach collection="roomCodes" item="roomCode" index="index" open="(" close=")" separator=",">
-                    #{roomCode}
-                </foreach>
+        inner join (select toer.id from t_oe_exam_record toer where EXISTS(select tees.id from t_e_exam_student tees where EXISTS (select distinct tbeiu.room_code from t_b_exam_invigilate_user tbeiu
+        where
+        <if test="userId != null and userId != ''">
+            tbeiu.user_id = #{userId} and
+        </if>
+        tbeiu.room_code = tees.room_code and toer.exam_student_id = tees.id))) t on t.id = tiiwi.exam_record_id
+        left join t_oe_exam_record toer on toer.id  = t.id
+        left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
+        <where>
                 <if test="examId != null and examId != ''">
                     and tiiwi.exam_id = #{examId}
                 </if>
                 <if test="examActivityId != null and examActivityId != ''">
                     and tiiwi.exam_activity_id = #{examActivityId}
                 </if>
+                <if test="roomCode != null and roomCode != ''">
+                    and tees.room_code = #{roomCode}
+                </if>
                 <if test="approveStatus != null and approveStatus != ''">
                     and tiiwi.approve_status = #{approveStatus}
                 </if>
@@ -245,6 +257,9 @@
                 <if test="monitorStatusSource != null and monitorStatusSource != ''">
                     and toer.monitor_status_source = #{monitorStatusSource}
                 </if>
+                    and tee.enable = 1
+                    and teea.enable = 1
+                    and tees.enable = 1
             </where>
         ) t
         <where>
@@ -263,4 +278,55 @@
         </where>
         order by t.roomCode
     </select>
+
+    <select id="invigilatePageProgressList" resultType="com.qmth.themis.business.bean.backend.InvigilateListProgressBean">
+        select
+            distinct tee.id as examId,
+            tee.name as examName,
+            teea.id as examActivityId,
+            teea.code as examActivityCode,
+            tees.room_code as roomCode,
+            tees.room_name as roomName,
+            tees.`identity`,
+            tees.name,
+            tees.course_code as courseCode,
+            tees.course_name as courseName,
+            tees.left_exam_count as leftExamCount,
+            if((select count(1) from t_oe_exam_record toer where toer.exam_student_id = tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') > 0),'已完成','未完成') as status
+        from
+            t_e_exam_student tees
+        left join t_e_exam tee on
+            tee.id = tees.exam_id
+        left join t_e_exam_activity teea on
+            teea.id = tees.exam_activity_id
+        inner join (select distinct tbeiu.room_code from t_b_exam_invigilate_user tbeiu
+        <if test="userId != null and userId != ''">
+            where tbeiu.user_id = #{userId}
+        </if>
+        ) t on t.room_code = tees.room_code
+        <where>
+            <if test="examId != null and examId != ''">
+                and tees.exam_id = #{examId}
+            </if>
+            <if test="examActivityId != null and examActivityId != ''">
+                and tees.exam_activity_id = #{examActivityId}
+            </if>
+            <if test="roomCode != null and roomCode != ''">
+                and tees.room_code = #{roomCode}
+            </if>
+            <if test="courseCode != null and courseCode != ''">
+                and tees.course_code like CONCAT(#{courseCode},'%')
+            </if>
+            <if test="name != null and name !=''">
+                and tees.name like CONCAT(#{name},'%')
+            </if>
+            <if test="identity != null and identity !=''">
+                and tees.identity like CONCAT(#{identity},'%')
+            </if>
+            and tee.enable = 1
+            and teea.enable = 1
+            and tees.enable = 1
+        </where>
+            order by tees.room_code
+    </select>
 </mapper>