浏览代码

监考老师逻辑代码和sql优化

wangliang 1 年之前
父节点
当前提交
2ccf14f1b3

+ 67 - 21
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateController.java

@@ -40,6 +40,7 @@ import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.Min;
 import java.io.File;
 import java.io.File;
 import java.util.*;
 import java.util.*;
+import java.util.stream.Collectors;
 
 
 /**
 /**
  * @Description: 监考信息 前端控制器
  * @Description: 监考信息 前端控制器
@@ -124,11 +125,18 @@ public class TIeInvigilateController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
+        }
+        if (Objects.nonNull(roomCode)) {
+            roomCodeList.clear();
+            roomCodeList.add(roomCode);
         }
         }
-        IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, cameraMonitorStatus, screenMonitorStatus, mobileFirstMonitorStatus, mobileSecondMonitorStatus, userId, tbUser.getOrgId());
+        IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, cameraMonitorStatus, screenMonitorStatus, mobileFirstMonitorStatus, mobileSecondMonitorStatus, tbUser.getOrgId());
         if (Objects.nonNull(invigilateListVideoBeanIPage)) {
         if (Objects.nonNull(invigilateListVideoBeanIPage)) {
             List<InvigilateListVideoBean> invigilateListVideoBeanList = invigilateListVideoBeanIPage.getRecords();
             List<InvigilateListVideoBean> invigilateListVideoBeanList = invigilateListVideoBeanIPage.getRecords();
             ExamCacheBean examCacheBean = null;
             ExamCacheBean examCacheBean = null;
@@ -200,11 +208,14 @@ public class TIeInvigilateController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
         }
         }
-        List<InvigilateListVideoBean> invigilateListVideoBeanList = tOeExamRecordService.invigilatePageListVideoRandom(examId, userId, randomNum, tbUser.getOrgId());
+        List<InvigilateListVideoBean> invigilateListVideoBeanList = tOeExamRecordService.invigilatePageListVideoRandom(examId, roomCodeList, randomNum, tbUser.getOrgId());
         if (Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
         if (Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
             invigilateListVideoBeanList.forEach(s -> {
             invigilateListVideoBeanList.forEach(s -> {
                 ExamCacheBean examCacheBean = teExamService.getExamCacheBean(s.getExamId());
                 ExamCacheBean examCacheBean = teExamService.getExamCacheBean(s.getExamId());
@@ -260,11 +271,18 @@ public class TIeInvigilateController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
         }
         }
-        return ResultUtil.ok(tOeExamRecordService.invigilatePageListHistory(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, status, breachStatus, finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId()));
+        if (Objects.nonNull(roomCode)) {
+            roomCodeList.clear();
+            roomCodeList.add(roomCode);
+        }
+        return ResultUtil.ok(tOeExamRecordService.invigilatePageListHistory(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, courseCode, status, breachStatus, finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId()));
     }
     }
 
 
     @ApiOperation(value = "监考明细管理列表导出接口")
     @ApiOperation(value = "监考明细管理列表导出接口")
@@ -288,11 +306,18 @@ public class TIeInvigilateController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
+        }
+        if (Objects.nonNull(roomCode)) {
+            roomCodeList.clear();
+            roomCodeList.add(roomCode);
         }
         }
-        List<InvigilateListHistoryBean> invigilateListHistoryBeanList = tOeExamRecordService.invigilatePageListHistoryExport(examId, examActivityId, roomCode, courseCode, status, breachStatus, finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId());
+        List<InvigilateListHistoryBean> invigilateListHistoryBeanList = tOeExamRecordService.invigilatePageListHistoryExport(examId, examActivityId, roomCodeList, courseCode, status, breachStatus, finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId());
         ExportUtils.exportEXCEL("监考明细", InvigilateListHistoryBean.class, invigilateListHistoryBeanList, ServletUtil.getResponse());
         ExportUtils.exportEXCEL("监考明细", InvigilateListHistoryBean.class, invigilateListHistoryBeanList, ServletUtil.getResponse());
     }
     }
 
 
@@ -467,11 +492,18 @@ public class TIeInvigilateController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
+        }
+        if (Objects.nonNull(roomCode)) {
+            roomCodeList.clear();
+            roomCodeList.add(roomCode);
         }
         }
-        IPage<InvigilateListPatrolBean> invigilateListPatrolBeanIPage = tOeExamRecordService.invigilatePagePatrolList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, userId, tbUser.getOrgId());
+        IPage<InvigilateListPatrolBean> invigilateListPatrolBeanIPage = tOeExamRecordService.invigilatePagePatrolList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, tbUser.getOrgId());
         if (Objects.nonNull(invigilateListPatrolBeanIPage)) {
         if (Objects.nonNull(invigilateListPatrolBeanIPage)) {
             List<InvigilateListPatrolBean> invigilateListPatrolBeanList = invigilateListPatrolBeanIPage.getRecords();
             List<InvigilateListPatrolBean> invigilateListPatrolBeanList = invigilateListPatrolBeanIPage.getRecords();
             if (Objects.nonNull(invigilateListPatrolBeanList) && invigilateListPatrolBeanList.size() > 0) {
             if (Objects.nonNull(invigilateListPatrolBeanList) && invigilateListPatrolBeanList.size() > 0) {
@@ -511,11 +543,18 @@ public class TIeInvigilateController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
         }
         }
-        return ResultUtil.ok(tOeExamRecordService.invigilatePageProgressList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, status, userId, tbUser.getOrgId(), breachStatus));
+        if (Objects.nonNull(roomCode)) {
+            roomCodeList.clear();
+            roomCodeList.add(roomCode);
+        }
+        return ResultUtil.ok(tOeExamRecordService.invigilatePageProgressList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, courseCode, name, identity, status, tbUser.getOrgId(), breachStatus));
     }
     }
 
 
     @ApiOperation(value = "进度查询列表导出接口")
     @ApiOperation(value = "进度查询列表导出接口")
@@ -532,11 +571,18 @@ public class TIeInvigilateController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
+        }
+        if (Objects.nonNull(roomCode)) {
+            roomCodeList.clear();
+            roomCodeList.add(roomCode);
         }
         }
-        List<InvigilateListProgressExcelBean> invigilateListProgressExcelBeanList = tOeExamRecordService.invigilatePageProgressListExport(examId, examActivityId, roomCode, courseCode, name, identity, status, userId, tbUser.getOrgId(), breachStatus);
+        List<InvigilateListProgressExcelBean> invigilateListProgressExcelBeanList = tOeExamRecordService.invigilatePageProgressListExport(examId, examActivityId, roomCodeList, courseCode, name, identity, status, tbUser.getOrgId(), breachStatus);
         if (!CollectionUtils.isEmpty(invigilateListProgressExcelBeanList)) {
         if (!CollectionUtils.isEmpty(invigilateListProgressExcelBeanList)) {
             for (InvigilateListProgressExcelBean i : invigilateListProgressExcelBeanList) {
             for (InvigilateListProgressExcelBean i : invigilateListProgressExcelBeanList) {
                 i.setCourseName(i.getCourseName() + "(" + i.getCourseCode() + ")");
                 i.setCourseName(i.getCourseName() + "(" + i.getCourseCode() + ")");

+ 21 - 7
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateWarnInfoController.java

@@ -129,11 +129,18 @@ public class TIeInvigilateWarnInfoController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
+        }
+        if (Objects.nonNull(roomCode)) {
+            roomCodeList.clear();
+            roomCodeList.add(roomCode);
         }
         }
-        return ResultUtil.ok(tOeExamRecordService.invigilatePageWarningList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId()));
+        return ResultUtil.ok(tOeExamRecordService.invigilatePageWarningList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId()));
     }
     }
 
 
     @ApiOperation(value = "预警消息接口")
     @ApiOperation(value = "预警消息接口")
@@ -197,13 +204,20 @@ public class TIeInvigilateWarnInfoController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
-        Long userId = null;
+        List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            userId = tbUser.getId();
+            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
+                roomCodeList = tbExamInvigilateUserList.stream().map(s -> s.getRoomCode()).collect(Collectors.toList());
+            }
+        }
+        if (Objects.nonNull(roomCode)) {
+            roomCodeList.clear();
+            roomCodeList.add(roomCode);
         }
         }
         //2020/11/24新增管理员不清除预警状态
         //2020/11/24新增管理员不清除预警状态
         if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
         if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
-            List<TOeExamRecord> tOeExamRecordList = tOeExamRecordService.findExamRecordByWarning(examId, examActivityId, roomCode, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId());
+            List<TOeExamRecord> tOeExamRecordList = tOeExamRecordService.findExamRecordByWarning(examId, examActivityId, roomCodeList, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId());
             for (TOeExamRecord t : tOeExamRecordList) {
             for (TOeExamRecord t : tOeExamRecordList) {
                 tOeExamRecordService.updateWarningUnreadCache(t.getId(), 0, true);
                 tOeExamRecordService.updateWarningUnreadCache(t.getId(), 0, true);
             }
             }
@@ -227,7 +241,7 @@ public class TIeInvigilateWarnInfoController {
                     themisCacheService.updateExamSummaryCache(examId, examActivityId);
                     themisCacheService.updateExamSummaryCache(examId, examActivityId);
                 }
                 }
             }
             }
-            tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId());
+            tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCodeList, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId());
         }
         }
         return ResultUtil.ok(true);
         return ResultUtil.ok(true);
     }
     }

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

@@ -30,7 +30,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param paperDownload
      * @param paperDownload
      * @param status
      * @param status
      * @param name
      * @param name
@@ -42,13 +42,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param screenMonitorStatus
      * @param screenMonitorStatus
      * @param mobileFirstMonitorStatus
      * @param mobileFirstMonitorStatus
      * @param mobileSecondMonitorStatus
      * @param mobileSecondMonitorStatus
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, @Param("examId") Long examId,
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, @Param("examId") Long examId,
                                                                   @Param("examActivityId") Long examActivityId,
                                                                   @Param("examActivityId") Long examActivityId,
-                                                                  @Param("roomCode") String roomCode,
+                                                                  @Param("roomCodeList") List<String> roomCodeList,
                                                                   @Param("paperDownload") Integer paperDownload,
                                                                   @Param("paperDownload") Integer paperDownload,
                                                                   @Param("status") String status,
                                                                   @Param("status") String status,
                                                                   @Param("name") String name,
                                                                   @Param("name") String name,
@@ -60,19 +59,18 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                   @Param("screenMonitorStatus") String screenMonitorStatus,
                                                                   @Param("screenMonitorStatus") String screenMonitorStatus,
                                                                   @Param("mobileFirstMonitorStatus") String mobileFirstMonitorStatus,
                                                                   @Param("mobileFirstMonitorStatus") String mobileFirstMonitorStatus,
                                                                   @Param("mobileSecondMonitorStatus") String mobileSecondMonitorStatus,
                                                                   @Param("mobileSecondMonitorStatus") String mobileSecondMonitorStatus,
-                                                                  @Param("userId") Long userId,
                                                                   @Param("orgId") Long orgId);
                                                                   @Param("orgId") Long orgId);
 
 
     /**
     /**
      * 实时监控台视频随机列表
      * 实时监控台视频随机列表
      *
      *
      * @param examId
      * @param examId
-     * @param userId
+     * @param roomCodeList
      * @param randomNum
      * @param randomNum
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
-    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(@Param("examId") Long examId, @Param("userId") Long userId, @Param("randomNum") Integer randomNum, @Param("orgId") Long orgId);
+    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(@Param("examId") Long examId, @Param("roomCodeList") List<String> roomCodeList, @Param("randomNum") Integer randomNum, @Param("orgId") Long orgId);
 
 
     /**
     /**
      * 查询在线巡考列表
      * 查询在线巡考列表
@@ -80,7 +78,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param status
      * @param status
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -91,13 +89,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param clientWebsocketStatus
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, @Param("examId") Long examId,
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, @Param("examId") Long examId,
                                                                     @Param("examActivityId") Long examActivityId,
                                                                     @Param("examActivityId") Long examActivityId,
-                                                                    @Param("roomCode") String roomCode,
+                                                                    @Param("roomCodeList") List<String> roomCodeList,
                                                                     @Param("status") String status,
                                                                     @Param("status") String status,
                                                                     @Param("name") String name,
                                                                     @Param("name") String name,
                                                                     @Param("identity") String identity,
                                                                     @Param("identity") String identity,
@@ -108,7 +105,6 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                     @Param("minWarningCount") Integer minWarningCount,
                                                                     @Param("minWarningCount") Integer minWarningCount,
                                                                     @Param("maxWarningCount") Integer maxWarningCount,
                                                                     @Param("maxWarningCount") Integer maxWarningCount,
                                                                     @Param("clientWebsocketStatus") String clientWebsocketStatus,
                                                                     @Param("clientWebsocketStatus") String clientWebsocketStatus,
-                                                                    @Param("userId") Long userId,
                                                                     @Param("orgId") Long orgId);
                                                                     @Param("orgId") Long orgId);
 
 
     /**
     /**
@@ -117,7 +113,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param approveStatus
      * @param approveStatus
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -127,13 +123,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, @Param("examId") Long examId,
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, @Param("examId") Long examId,
                                                                       @Param("examActivityId") Long examActivityId,
                                                                       @Param("examActivityId") Long examActivityId,
-                                                                      @Param("roomCode") String roomCode,
+                                                                      @Param("roomCodeList") List<String> roomCodeList,
                                                                       @Param("approveStatus") Integer approveStatus,
                                                                       @Param("approveStatus") Integer approveStatus,
                                                                       @Param("name") String name,
                                                                       @Param("name") String name,
                                                                       @Param("identity") String identity,
                                                                       @Param("identity") String identity,
@@ -143,7 +138,6 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                       @Param("maxExceptionCount") Integer maxExceptionCount,
                                                                       @Param("maxExceptionCount") Integer maxExceptionCount,
                                                                       @Param("minWarningCount") Integer minWarningCount,
                                                                       @Param("minWarningCount") Integer minWarningCount,
                                                                       @Param("maxWarningCount") Integer maxWarningCount,
                                                                       @Param("maxWarningCount") Integer maxWarningCount,
-                                                                      @Param("userId") Long userId,
                                                                       @Param("orgId") Long orgId);
                                                                       @Param("orgId") Long orgId);
 
 
     /**
     /**
@@ -151,7 +145,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param approveStatus
      * @param approveStatus
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -161,13 +155,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public Integer approveStatusListUpdate(@Param("examId") Long examId,
     public Integer approveStatusListUpdate(@Param("examId") Long examId,
                                            @Param("examActivityId") Long examActivityId,
                                            @Param("examActivityId") Long examActivityId,
-                                           @Param("roomCode") String roomCode,
+                                           @Param("roomCodeList") List<String> roomCodeList,
                                            @Param("approveStatus") Integer approveStatus,
                                            @Param("approveStatus") Integer approveStatus,
                                            @Param("name") String name,
                                            @Param("name") String name,
                                            @Param("identity") String identity,
                                            @Param("identity") String identity,
@@ -177,7 +170,6 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                            @Param("maxExceptionCount") Integer maxExceptionCount,
                                            @Param("maxExceptionCount") Integer maxExceptionCount,
                                            @Param("minWarningCount") Integer minWarningCount,
                                            @Param("minWarningCount") Integer minWarningCount,
                                            @Param("maxWarningCount") Integer maxWarningCount,
                                            @Param("maxWarningCount") Integer maxWarningCount,
-                                           @Param("userId") Long userId,
                                            @Param("orgId") Long orgId);
                                            @Param("orgId") Long orgId);
 
 
     /**
     /**
@@ -186,24 +178,22 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param status
      * @param status
-     * @param userId
      * @param orgId
      * @param orgId
      * @param breachStatus
      * @param breachStatus
      * @return
      * @return
      */
      */
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, @Param("examId") Long examId,
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, @Param("examId") Long examId,
                                                                         @Param("examActivityId") Long examActivityId,
                                                                         @Param("examActivityId") Long examActivityId,
-                                                                        @Param("roomCode") String roomCode,
+                                                                        @Param("roomCodeList") List<String> roomCodeList,
                                                                         @Param("courseCode") String courseCode,
                                                                         @Param("courseCode") String courseCode,
                                                                         @Param("name") String name,
                                                                         @Param("name") String name,
                                                                         @Param("identity") String identity,
                                                                         @Param("identity") String identity,
                                                                         @Param("status") Integer status,
                                                                         @Param("status") Integer status,
-                                                                        @Param("userId") Long userId,
                                                                         @Param("orgId") Long orgId,
                                                                         @Param("orgId") Long orgId,
                                                                         @Param("breachStatus") Integer breachStatus);
                                                                         @Param("breachStatus") Integer breachStatus);
 
 
@@ -212,24 +202,22 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param status
      * @param status
-     * @param userId
      * @param orgId
      * @param orgId
      * @param breachStatus
      * @param breachStatus
      * @return
      * @return
      */
      */
     public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(@Param("examId") Long examId,
     public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(@Param("examId") Long examId,
                                                                                   @Param("examActivityId") Long examActivityId,
                                                                                   @Param("examActivityId") Long examActivityId,
-                                                                                  @Param("roomCode") String roomCode,
+                                                                                  @Param("roomCode") List<String> roomCodeList,
                                                                                   @Param("courseCode") String courseCode,
                                                                                   @Param("courseCode") String courseCode,
                                                                                   @Param("name") String name,
                                                                                   @Param("name") String name,
                                                                                   @Param("identity") String identity,
                                                                                   @Param("identity") String identity,
                                                                                   @Param("status") Integer status,
                                                                                   @Param("status") Integer status,
-                                                                                  @Param("userId") Long userId,
                                                                                   @Param("orgId") Long orgId,
                                                                                   @Param("orgId") Long orgId,
                                                                                   @Param("breachStatus") Integer breachStatus);
                                                                                   @Param("breachStatus") Integer breachStatus);
 
 
@@ -239,7 +227,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param status
      * @param status
      * @param breachStatus
      * @param breachStatus
@@ -252,13 +240,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, @Param("examId") Long examId,
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, @Param("examId") Long examId,
                                                                       @Param("examActivityId") Long examActivityId,
                                                                       @Param("examActivityId") Long examActivityId,
-                                                                      @Param("roomCode") String roomCode,
+                                                                      @Param("roomCodeList") List<String> roomCodeList,
                                                                       @Param("courseCode") String courseCode,
                                                                       @Param("courseCode") String courseCode,
                                                                       @Param("status") String status,
                                                                       @Param("status") String status,
                                                                       @Param("breachStatus") Integer breachStatus,
                                                                       @Param("breachStatus") Integer breachStatus,
@@ -271,7 +258,6 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                       @Param("maxExceptionCount") Integer maxExceptionCount,
                                                                       @Param("maxExceptionCount") Integer maxExceptionCount,
                                                                       @Param("minWarningCount") Integer minWarningCount,
                                                                       @Param("minWarningCount") Integer minWarningCount,
                                                                       @Param("maxWarningCount") Integer maxWarningCount,
                                                                       @Param("maxWarningCount") Integer maxWarningCount,
-                                                                      @Param("userId") Long userId,
                                                                       @Param("orgId") Long orgId);
                                                                       @Param("orgId") Long orgId);
 
 
     /**
     /**
@@ -279,7 +265,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param status
      * @param status
      * @param breachStatus
      * @param breachStatus
@@ -292,27 +278,25 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
-    public List<InvigilateListHistoryBean> invigilatePageListHistoryExport(Long examId,
-                                                                           Long examActivityId,
-                                                                           String roomCode,
-                                                                           String courseCode,
-                                                                           String status,
-                                                                           Integer breachStatus,
-                                                                           String finishType,
-                                                                           String name,
-                                                                           String identity,
-                                                                           Integer minMultipleFaceCount,
-                                                                           Integer maxMultipleFaceCount,
-                                                                           Integer minExceptionCount,
-                                                                           Integer maxExceptionCount,
-                                                                           Integer minWarningCount,
-                                                                           Integer maxWarningCount,
-                                                                           Long userId,
-                                                                           Long orgId);
+    public List<InvigilateListHistoryBean> invigilatePageListHistoryExport(@Param("examId") Long examId,
+                                                                           @Param("examActivityId") Long examActivityId,
+                                                                           @Param("roomCodeList") List<String> roomCodeList,
+                                                                           @Param("courseCode") String courseCode,
+                                                                           @Param("status") String status,
+                                                                           @Param("breachStatus") Integer breachStatus,
+                                                                           @Param("finishType") String finishType,
+                                                                           @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("orgId") Long orgId);
 
 
     @SuppressWarnings("MybatisXMapperMethodInspection")
     @SuppressWarnings("MybatisXMapperMethodInspection")
     public List<Map<String, Object>> getDoneCountByDay(@Param("orgId") Long orgId, @Param("examId") Long examId, @Param("activityId") Long activityId,
     public List<Map<String, Object>> getDoneCountByDay(@Param("orgId") Long orgId, @Param("examId") Long examId, @Param("activityId") Long activityId,
@@ -607,7 +591,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param minMultipleFaceCount
      * @param minMultipleFaceCount
@@ -616,13 +600,12 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     List<TOeExamRecord> findExamRecordByWarning(@Param("examId") Long examId,
     List<TOeExamRecord> findExamRecordByWarning(@Param("examId") Long examId,
                                                 @Param("examActivityId") Long examActivityId,
                                                 @Param("examActivityId") Long examActivityId,
-                                                @Param("roomCode") String roomCode,
+                                                @Param("roomCodeList") List<String> roomCodeList,
                                                 @Param("name") String name,
                                                 @Param("name") String name,
                                                 @Param("identity") String identity,
                                                 @Param("identity") String identity,
                                                 @Param("minMultipleFaceCount") Integer minMultipleFaceCount,
                                                 @Param("minMultipleFaceCount") Integer minMultipleFaceCount,
@@ -631,7 +614,6 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                 @Param("maxExceptionCount") Integer maxExceptionCount,
                                                 @Param("maxExceptionCount") Integer maxExceptionCount,
                                                 @Param("minWarningCount") Integer minWarningCount,
                                                 @Param("minWarningCount") Integer minWarningCount,
                                                 @Param("maxWarningCount") Integer maxWarningCount,
                                                 @Param("maxWarningCount") Integer maxWarningCount,
-                                                @Param("userId") Long userId,
                                                 @Param("orgId") Long orgId);
                                                 @Param("orgId") Long orgId);
 
 
     /**
     /**

+ 20 - 38
themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java

@@ -90,7 +90,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param paperDownload
      * @param paperDownload
      * @param status
      * @param status
      * @param name
      * @param name
@@ -102,13 +102,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param screenMonitorStatus
      * @param screenMonitorStatus
      * @param mobileFirstMonitorStatus
      * @param mobileFirstMonitorStatus
      * @param mobileSecondMonitorStatus
      * @param mobileSecondMonitorStatus
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId,
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId,
                                                                   Long examActivityId,
                                                                   Long examActivityId,
-                                                                  String roomCode,
+                                                                  List<String> roomCodeList,
                                                                   Integer paperDownload,
                                                                   Integer paperDownload,
                                                                   String status,
                                                                   String status,
                                                                   String name,
                                                                   String name,
@@ -120,19 +119,18 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                   String screenMonitorStatus,
                                                                   String screenMonitorStatus,
                                                                   String mobileFirstMonitorStatus,
                                                                   String mobileFirstMonitorStatus,
                                                                   String mobileSecondMonitorStatus,
                                                                   String mobileSecondMonitorStatus,
-                                                                  Long userId,
                                                                   Long orgId);
                                                                   Long orgId);
 
 
     /**
     /**
      * 实时监控台视频随机列表
      * 实时监控台视频随机列表
      *
      *
      * @param examId
      * @param examId
-     * @param userId
+     * @param roomCodeList
      * @param randomNum
      * @param randomNum
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
-    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, Long userId, Integer randomNum, Long orgId);
+    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, List<String> roomCodeList, Integer randomNum, Long orgId);
 
 
     /**
     /**
      * 查询在线巡考列表
      * 查询在线巡考列表
@@ -140,7 +138,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param status
      * @param status
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -151,13 +149,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param clientWebsocketStatus
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId,
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId,
                                                                     Long examActivityId,
                                                                     Long examActivityId,
-                                                                    String roomCode,
+                                                                    List<String> roomCodeList,
                                                                     String status,
                                                                     String status,
                                                                     String name,
                                                                     String name,
                                                                     String identity,
                                                                     String identity,
@@ -168,7 +165,6 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                     Integer minWarningCount,
                                                                     Integer minWarningCount,
                                                                     Integer maxWarningCount,
                                                                     Integer maxWarningCount,
                                                                     String clientWebsocketStatus,
                                                                     String clientWebsocketStatus,
-                                                                    Long userId,
                                                                     Long orgId);
                                                                     Long orgId);
 
 
     /**
     /**
@@ -177,7 +173,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param approveStatus
      * @param approveStatus
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -187,13 +183,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId,
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId,
                                                                       Long examActivityId,
                                                                       Long examActivityId,
-                                                                      String roomCode,
+                                                                      List<String> roomCodeList,
                                                                       Integer approveStatus,
                                                                       Integer approveStatus,
                                                                       String name,
                                                                       String name,
                                                                       String identity,
                                                                       String identity,
@@ -203,7 +198,6 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                       Integer maxExceptionCount,
                                                                       Integer maxExceptionCount,
                                                                       Integer minWarningCount,
                                                                       Integer minWarningCount,
                                                                       Integer maxWarningCount,
                                                                       Integer maxWarningCount,
-                                                                      Long userId,
                                                                       Long orgId);
                                                                       Long orgId);
 
 
     /**
     /**
@@ -211,7 +205,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param approveStatus
      * @param approveStatus
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -221,13 +215,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public Integer approveStatusListUpdate(Long examId,
     public Integer approveStatusListUpdate(Long examId,
                                            Long examActivityId,
                                            Long examActivityId,
-                                           String roomCode,
+                                           List<String> roomCodeList,
                                            Integer approveStatus,
                                            Integer approveStatus,
                                            String name,
                                            String name,
                                            String identity,
                                            String identity,
@@ -237,7 +230,6 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                            Integer maxExceptionCount,
                                            Integer maxExceptionCount,
                                            Integer minWarningCount,
                                            Integer minWarningCount,
                                            Integer maxWarningCount,
                                            Integer maxWarningCount,
-                                           Long userId,
                                            Long orgId);
                                            Long orgId);
 
 
     /**
     /**
@@ -246,24 +238,22 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param status
      * @param status
-     * @param userId
      * @param orgId
      * @param orgId
      * @param breachStatus
      * @param breachStatus
      * @return
      * @return
      */
      */
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId,
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId,
                                                                         Long examActivityId,
                                                                         Long examActivityId,
-                                                                        String roomCode,
+                                                                        List<String> roomCodeList,
                                                                         String courseCode,
                                                                         String courseCode,
                                                                         String name,
                                                                         String name,
                                                                         String identity,
                                                                         String identity,
                                                                         Integer status,
                                                                         Integer status,
-                                                                        Long userId,
                                                                         Long orgId,
                                                                         Long orgId,
                                                                         Integer breachStatus);
                                                                         Integer breachStatus);
 
 
@@ -272,24 +262,22 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param status
      * @param status
-     * @param userId
      * @param orgId
      * @param orgId
      * @param breachStatus
      * @param breachStatus
      * @return
      * @return
      */
      */
     public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId,
     public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId,
                                                                                   Long examActivityId,
                                                                                   Long examActivityId,
-                                                                                  String roomCode,
+                                                                                  List<String> roomCodeList,
                                                                                   String courseCode,
                                                                                   String courseCode,
                                                                                   String name,
                                                                                   String name,
                                                                                   String identity,
                                                                                   String identity,
                                                                                   Integer status,
                                                                                   Integer status,
-                                                                                  Long userId,
                                                                                   Long orgId,
                                                                                   Long orgId,
                                                                                   Integer breachStatus);
                                                                                   Integer breachStatus);
 
 
@@ -299,7 +287,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param status
      * @param status
      * @param breachStatus
      * @param breachStatus
@@ -312,13 +300,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, Long examId,
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, Long examId,
                                                                       Long examActivityId,
                                                                       Long examActivityId,
-                                                                      String roomCode,
+                                                                      List<String> roomCodeList,
                                                                       String courseCode,
                                                                       String courseCode,
                                                                       String status,
                                                                       String status,
                                                                       Integer breachStatus,
                                                                       Integer breachStatus,
@@ -331,7 +318,6 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                       Integer maxExceptionCount,
                                                                       Integer maxExceptionCount,
                                                                       Integer minWarningCount,
                                                                       Integer minWarningCount,
                                                                       Integer maxWarningCount,
                                                                       Integer maxWarningCount,
-                                                                      Long userId,
                                                                       Long orgId);
                                                                       Long orgId);
 
 
     /**
     /**
@@ -339,7 +325,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param status
      * @param status
      * @param breachStatus
      * @param breachStatus
@@ -352,13 +338,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     public List<InvigilateListHistoryBean> invigilatePageListHistoryExport(Long examId,
     public List<InvigilateListHistoryBean> invigilatePageListHistoryExport(Long examId,
                                                                            Long examActivityId,
                                                                            Long examActivityId,
-                                                                           String roomCode,
+                                                                           List<String> roomCodeList,
                                                                            String courseCode,
                                                                            String courseCode,
                                                                            String status,
                                                                            String status,
                                                                            Integer breachStatus,
                                                                            Integer breachStatus,
@@ -371,7 +356,6 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                            Integer maxExceptionCount,
                                                                            Integer maxExceptionCount,
                                                                            Integer minWarningCount,
                                                                            Integer minWarningCount,
                                                                            Integer maxWarningCount,
                                                                            Integer maxWarningCount,
-                                                                           Long userId,
                                                                            Long orgId);
                                                                            Long orgId);
 
 
 
 
@@ -678,7 +662,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param minMultipleFaceCount
      * @param minMultipleFaceCount
@@ -687,13 +671,12 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     List<TOeExamRecord> findExamRecordByWarning(Long examId,
     List<TOeExamRecord> findExamRecordByWarning(Long examId,
                                                 Long examActivityId,
                                                 Long examActivityId,
-                                                String roomCode,
+                                                List<String> roomCodeList,
                                                 String name,
                                                 String name,
                                                 String identity,
                                                 String identity,
                                                 Integer minMultipleFaceCount,
                                                 Integer minMultipleFaceCount,
@@ -702,7 +685,6 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                 Integer maxExceptionCount,
                                                 Integer maxExceptionCount,
                                                 Integer minWarningCount,
                                                 Integer minWarningCount,
                                                 Integer maxWarningCount,
                                                 Integer maxWarningCount,
-                                                Long userId,
                                                 Long orgId);
                                                 Long orgId);
 
 
     /**
     /**

+ 43 - 53
themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java

@@ -651,7 +651,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param minMultipleFaceCount
      * @param minMultipleFaceCount
@@ -660,13 +660,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public List<TOeExamRecord> findExamRecordByWarning(Long examId, Long examActivityId, String roomCode, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long userId, Long orgId) {
-        return this.baseMapper.findExamRecordByWarning(examId, examActivityId, roomCode, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, orgId);
+    public List<TOeExamRecord> findExamRecordByWarning(Long examId, Long examActivityId, List<String> roomCodeList, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long orgId) {
+        return this.baseMapper.findExamRecordByWarning(examId, examActivityId, roomCodeList, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, orgId);
     }
     }
 
 
     /**
     /**
@@ -791,7 +790,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param paperDownload
      * @param paperDownload
      * @param status
      * @param status
      * @param name
      * @param name
@@ -803,36 +802,35 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param screenMonitorStatus
      * @param screenMonitorStatus
      * @param mobileFirstMonitorStatus
      * @param mobileFirstMonitorStatus
      * @param mobileSecondMonitorStatus
      * @param mobileSecondMonitorStatus
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     @SuppressWarnings("rawtypes")
     @SuppressWarnings("rawtypes")
     @Override
     @Override
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId,
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId,
-                                                                  String roomCode, Integer paperDownload, String status, String name, String identity,
+                                                                  List<String> roomCodeList, Integer paperDownload, String status, String name, String identity,
                                                                   Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String cameraMonitorStatus,
                                                                   Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String cameraMonitorStatus,
                                                                   String screenMonitorStatus,
                                                                   String screenMonitorStatus,
                                                                   String mobileFirstMonitorStatus,
                                                                   String mobileFirstMonitorStatus,
-                                                                  String mobileSecondMonitorStatus, Long userId, Long orgId) {
+                                                                  String mobileSecondMonitorStatus, Long orgId) {
         return tOeExamRecordMapper
         return tOeExamRecordMapper
-                .invigilatePageListVideo(iPage, examId, examActivityId, roomCode, paperDownload, status, name, identity,
-                        minWarningCount, maxWarningCount, clientWebsocketStatus, cameraMonitorStatus, screenMonitorStatus, mobileFirstMonitorStatus, mobileSecondMonitorStatus, userId, orgId);
+                .invigilatePageListVideo(iPage, examId, examActivityId, roomCodeList, paperDownload, status, name, identity,
+                        minWarningCount, maxWarningCount, clientWebsocketStatus, cameraMonitorStatus, screenMonitorStatus, mobileFirstMonitorStatus, mobileSecondMonitorStatus, orgId);
     }
     }
 
 
     /**
     /**
      * 实时监控台视频随机列表
      * 实时监控台视频随机列表
      *
      *
      * @param examId
      * @param examId
-     * @param userId
+     * @param roomCodeList
      * @param randomNum
      * @param randomNum
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, Long userId, Integer randomNum,
+    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, List<String> roomCodeList, Integer randomNum,
                                                                        Long orgId) {
                                                                        Long orgId) {
-        return tOeExamRecordMapper.invigilatePageListVideoRandom(examId, userId, randomNum, orgId);
+        return tOeExamRecordMapper.invigilatePageListVideoRandom(examId, roomCodeList, randomNum, orgId);
     }
     }
 
 
     /**
     /**
@@ -841,7 +839,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param status
      * @param status
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -852,20 +850,19 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param clientWebsocketStatus
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     @SuppressWarnings("rawtypes")
     @SuppressWarnings("rawtypes")
     @Override
     @Override
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId, Long examActivityId,
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId, Long examActivityId,
-                                                                    String roomCode, String status, String name, String identity, Integer minMultipleFaceCount,
+                                                                    List<String> roomCodeList, String status, String name, String identity, Integer minMultipleFaceCount,
                                                                     Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount,
                                                                     Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount,
-                                                                    Integer maxWarningCount, String clientWebsocketStatus, Long userId, Long orgId) {
+                                                                    Integer maxWarningCount, String clientWebsocketStatus, Long orgId) {
         return tOeExamRecordMapper
         return tOeExamRecordMapper
-                .invigilatePagePatrolList(iPage, examId, examActivityId, roomCode, status, name, identity,
+                .invigilatePagePatrolList(iPage, examId, examActivityId, roomCodeList, status, name, identity,
                         minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
                         minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
-                        minWarningCount, maxWarningCount, clientWebsocketStatus, userId, orgId);
+                        minWarningCount, maxWarningCount, clientWebsocketStatus, orgId);
     }
     }
 
 
     /**
     /**
@@ -874,7 +871,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param approveStatus
      * @param approveStatus
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -884,20 +881,19 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     @SuppressWarnings("rawtypes")
     @SuppressWarnings("rawtypes")
     @Override
     @Override
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId,
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId,
-                                                                      Long examActivityId, String roomCode, Integer approveStatus, String name, String identity,
+                                                                      Long examActivityId, List<String> roomCodeList, Integer approveStatus, String name, String identity,
                                                                       Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount,
                                                                       Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount,
-                                                                      Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long userId, Long orgId) {
+                                                                      Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long orgId) {
         return tOeExamRecordMapper
         return tOeExamRecordMapper
-                .invigilatePageWarningList(iPage, examId, examActivityId, roomCode, approveStatus, name, identity,
+                .invigilatePageWarningList(iPage, examId, examActivityId, roomCodeList, approveStatus, name, identity,
                         minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
                         minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
-                        minWarningCount, maxWarningCount, userId, orgId);
+                        minWarningCount, maxWarningCount, orgId);
     }
     }
 
 
     /**
     /**
@@ -905,7 +901,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param approveStatus
      * @param approveStatus
      * @param name
      * @param name
      * @param identity
      * @param identity
@@ -915,19 +911,18 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public Integer approveStatusListUpdate(Long examId, Long examActivityId, String roomCode, Integer approveStatus,
+    public Integer approveStatusListUpdate(Long examId, Long examActivityId, List<String> roomCodeList, Integer approveStatus,
                                            String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount,
                                            String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount,
                                            Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount,
                                            Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount,
-                                           Long userId, Long orgId) {
+                                           Long orgId) {
         return tOeExamRecordMapper
         return tOeExamRecordMapper
-                .approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity,
+                .approveStatusListUpdate(examId, examActivityId, roomCodeList, approveStatus, name, identity,
                         minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
                         minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
-                        minWarningCount, maxWarningCount, userId, orgId);
+                        minWarningCount, maxWarningCount, orgId);
     }
     }
 
 
     /**
     /**
@@ -936,12 +931,11 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param status
      * @param status
-     * @param userId
      * @param orgId
      * @param orgId
      * @param breachStatus
      * @param breachStatus
      * @return
      * @return
@@ -949,10 +943,10 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
     @SuppressWarnings("rawtypes")
     @SuppressWarnings("rawtypes")
     @Override
     @Override
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId,
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId,
-                                                                        Long examActivityId, String roomCode, String courseCode, String name, String identity,
-                                                                        Integer status, Long userId,
+                                                                        Long examActivityId, List<String> roomCodeList, String courseCode, String name, String identity,
+                                                                        Integer status,
                                                                         Long orgId, Integer breachStatus) {
                                                                         Long orgId, Integer breachStatus) {
-        IPage<InvigilateListProgressBean> invigilateListProgressBeanIPage = tOeExamRecordMapper.invigilatePageProgressList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, status, userId, orgId, breachStatus);
+        IPage<InvigilateListProgressBean> invigilateListProgressBeanIPage = tOeExamRecordMapper.invigilatePageProgressList(iPage, examId, examActivityId, roomCodeList, courseCode, name, identity, status, orgId, breachStatus);
         for (InvigilateListProgressBean t : invigilateListProgressBeanIPage.getRecords()) {
         for (InvigilateListProgressBean t : invigilateListProgressBeanIPage.getRecords()) {
             if (Objects.isNull(t.getTencentVideoUrl())) {
             if (Objects.isNull(t.getTencentVideoUrl())) {
                 String videoSource = tmTencentVideoMessageService.videoSourceQuery(t.getExamRecordId());
                 String videoSource = tmTencentVideoMessageService.videoSourceQuery(t.getExamRecordId());
@@ -989,21 +983,20 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param name
      * @param name
      * @param identity
      * @param identity
      * @param status
      * @param status
-     * @param userId
      * @param orgId
      * @param orgId
      * @param breachStatus
      * @param breachStatus
      * @return
      * @return
      */
      */
     @Override
     @Override
     public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId, Long examActivityId,
     public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId, Long examActivityId,
-                                                                                  String roomCode, String courseCode, String name, String identity,
-                                                                                  Integer status, Long userId, Long orgId, Integer breachStatus) {
-        return tOeExamRecordMapper.invigilatePageProgressListExport(examId, examActivityId, roomCode, courseCode, name, identity, status, userId, orgId, breachStatus);
+                                                                                  List<String> roomCodeList, String courseCode, String name, String identity,
+                                                                                  Integer status, Long orgId, Integer breachStatus) {
+        return tOeExamRecordMapper.invigilatePageProgressListExport(examId, examActivityId, roomCodeList, courseCode, name, identity, status, orgId, breachStatus);
     }
     }
 
 
     /**
     /**
@@ -1012,7 +1005,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param status
      * @param status
      * @param breachStatus
      * @param breachStatus
@@ -1025,21 +1018,20 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     @SuppressWarnings("rawtypes")
     @SuppressWarnings("rawtypes")
     @Override
     @Override
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, Long examId,
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, Long examId,
-                                                                      Long examActivityId, String roomCode, String courseCode, String status, Integer breachStatus,
+                                                                      Long examActivityId, List<String> roomCodeList, String courseCode, String status, Integer breachStatus,
                                                                       String finishType, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount,
                                                                       String finishType, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount,
                                                                       Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount,
                                                                       Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount,
-                                                                      Long userId, Long orgId) {
+                                                                      Long orgId) {
         return tOeExamRecordMapper
         return tOeExamRecordMapper
-                .invigilatePageListHistory(iPage, examId, examActivityId, roomCode, courseCode, status, breachStatus,
+                .invigilatePageListHistory(iPage, examId, examActivityId, roomCodeList, courseCode, status, breachStatus,
                         finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount,
                         finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount,
-                        maxExceptionCount, minWarningCount, maxWarningCount, userId, orgId);
+                        maxExceptionCount, minWarningCount, maxWarningCount, orgId);
     }
     }
 
 
     /**
     /**
@@ -1047,7 +1039,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      *
      *
      * @param examId
      * @param examId
      * @param examActivityId
      * @param examActivityId
-     * @param roomCode
+     * @param roomCodeList
      * @param courseCode
      * @param courseCode
      * @param status
      * @param status
      * @param breachStatus
      * @param breachStatus
@@ -1060,14 +1052,13 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxExceptionCount
      * @param maxExceptionCount
      * @param minWarningCount
      * @param minWarningCount
      * @param maxWarningCount
      * @param maxWarningCount
-     * @param userId
      * @param orgId
      * @param orgId
      * @return
      * @return
      */
      */
     @Override
     @Override
     public List<InvigilateListHistoryBean> invigilatePageListHistoryExport(Long examId,
     public List<InvigilateListHistoryBean> invigilatePageListHistoryExport(Long examId,
                                                                            Long examActivityId,
                                                                            Long examActivityId,
-                                                                           String roomCode,
+                                                                           List<String> roomCodeList,
                                                                            String courseCode,
                                                                            String courseCode,
                                                                            String status,
                                                                            String status,
                                                                            Integer breachStatus,
                                                                            Integer breachStatus,
@@ -1080,12 +1071,11 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
                                                                            Integer maxExceptionCount,
                                                                            Integer maxExceptionCount,
                                                                            Integer minWarningCount,
                                                                            Integer minWarningCount,
                                                                            Integer maxWarningCount,
                                                                            Integer maxWarningCount,
-                                                                           Long userId,
                                                                            Long orgId) {
                                                                            Long orgId) {
         return tOeExamRecordMapper
         return tOeExamRecordMapper
-                .invigilatePageListHistoryExport(examId, examActivityId, roomCode, courseCode, status, breachStatus,
+                .invigilatePageListHistoryExport(examId, examActivityId, roomCodeList, courseCode, status, breachStatus,
                         finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount,
                         finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount,
-                        maxExceptionCount, minWarningCount, maxWarningCount, userId, orgId);
+                        maxExceptionCount, minWarningCount, maxWarningCount, orgId);
     }
     }
 
 
     /**
     /**

+ 110 - 133
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -29,10 +29,10 @@
     </sql>
     </sql>
 
 
     <sql id="invigilatePageMiddle">
     <sql id="invigilatePageMiddle">
-        from t_oe_exam_record t
-		left join t_e_exam_student s on t.id = s.current_record_id
+        from t_e_exam_student s
 		left join t_e_exam tee on tee.id = t.exam_id
 		left join t_e_exam tee on tee.id = t.exam_id
 		left join t_e_exam_activity teea on teea.id = t.exam_activity_id
 		left join t_e_exam_activity teea on teea.id = t.exam_activity_id
+        left join t_oe_exam_record t on t.id = s.current_record_id
     </sql>
     </sql>
 
 
     <select id="invigilatePageListVideo" resultType="com.qmth.themis.business.bean.admin.InvigilateListVideoBean">
     <select id="invigilatePageListVideo" resultType="com.qmth.themis.business.bean.admin.InvigilateListVideoBean">
@@ -67,20 +67,8 @@
         left join t_e_exam tee on tee.id = s.exam_id
         left join t_e_exam tee on tee.id = s.exam_id
         left join t_e_exam_activity teea on teea.id = s.exam_activity_id
         left join t_e_exam_activity teea on teea.id = s.exam_activity_id
         left join t_e_student tes on s.student_id = tes.id
         left join t_e_student tes on s.student_id = tes.id
-        <if test="userId != null and userId != ''">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = s.exam_id
-        </if>
         left join t_oe_exam_record toer on toer.id = s.current_record_id
         left join t_oe_exam_record toer on toer.id = s.current_record_id
         WHERE 1 = 1
         WHERE 1 = 1
-        <if test="examId != null and examId != ''">
-            and s.exam_id = #{examId}
-        </if>
-        <if test="userId != null and userId != ''">
-            and tbeiu.user_id = #{userId}
-        </if>
-        <if test="orgId != null and orgId != ''">
-            and tee.org_id = #{orgId}
-        </if>
         <choose>
         <choose>
             <when test="status != null and status != '' and status == 'UN_FINISH'">
             <when test="status != null and status != '' and status == 'UN_FINISH'">
                 and toer.id is null
                 and toer.id is null
@@ -89,11 +77,20 @@
                 and toer.id is not null
                 and toer.id is not null
             </otherwise>
             </otherwise>
         </choose>
         </choose>
+        <if test="orgId != null and orgId != ''">
+            and tee.org_id = #{orgId}
+        </if>
+        <if test="examId != null and examId != ''">
+            and s.exam_id = #{examId}
+        </if>
         <if test="examActivityId != null and examActivityId != ''">
         <if test="examActivityId != null and examActivityId != ''">
             and s.exam_activity_id = #{examActivityId}
             and s.exam_activity_id = #{examActivityId}
         </if>
         </if>
-        <if test="roomCode != null and roomCode != ''">
-            and s.room_code = #{roomCode}
+        <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+            and s.room_code in
+            <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                #{roomCode}
+            </foreach>
         </if>
         </if>
         <if test="name != null and name !=''">
         <if test="name != null and name !=''">
             and s.name like CONCAT('%', #{name},'%')
             and s.name like CONCAT('%', #{name},'%')
@@ -148,13 +145,19 @@
         <!--,t.monitor_live_url as monitorLiveUrl-->
         <!--,t.monitor_live_url as monitorLiveUrl-->
         ,IFNULL(t.warning_count,0) as warningNew
         ,IFNULL(t.warning_count,0) as warningNew
         <include refid="invigilatePageMiddle"/>
         <include refid="invigilatePageMiddle"/>
-        <where>1 = 1
-            <if test="examId != null and examId != ''">
-                and t.exam_id = #{examId}
-            </if>
+        <where> 1 = 1
             <if test="orgId != null and orgId != ''">
             <if test="orgId != null and orgId != ''">
                 and tee.org_id = #{orgId}
                 and tee.org_id = #{orgId}
             </if>
             </if>
+            <if test="examId != null and examId != ''">
+                and s.exam_id = #{examId}
+            </if>
+            <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+                and s.room_code in
+                <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                    #{roomCode}
+                </foreach>
+            </if>
             and ((t.status = 'FIRST_PREPARE' and t.client_websocket_status = 'ON_LINE') or t.status in ('ANSWERING',
             and ((t.status = 'FIRST_PREPARE' and t.client_websocket_status = 'ON_LINE') or t.status in ('ANSWERING',
             'BREAK_OFF', 'RESUME_PREPARE'))
             'BREAK_OFF', 'RESUME_PREPARE'))
         </where>
         </where>
@@ -188,21 +191,14 @@
         toer.finish_type as finishType,
         toer.finish_type as finishType,
         IFNULL(toer.exception_count,0) as exceptionCount,
         IFNULL(toer.exception_count,0) as exceptionCount,
         IFNULL(toer.warning_multiple_face_count,0) as multipleFaceCount
         IFNULL(toer.warning_multiple_face_count,0) as multipleFaceCount
-        from
-        t_e_exam_student s
+        from t_e_exam_student s
         left join t_e_exam tee on tee.id = s.exam_id
         left join t_e_exam tee on tee.id = s.exam_id
         left join t_e_exam_activity teea on teea.id = s.exam_activity_id
         left join t_e_exam_activity teea on teea.id = s.exam_activity_id
         left join t_e_student tes on s.student_id = tes.id
         left join t_e_student tes on s.student_id = tes.id
-        LEFT JOIN t_oe_exam_record toer on toer.exam_student_id = s.id
-        <if test="userId != null and userId != ''">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = s.exam_id
-        </if>
+        left join t_oe_exam_record toer on toer.exam_student_id = s.id
         <where> 1 = 1
         <where> 1 = 1
-            <if test="examId != null and examId != ''">
-                and s.exam_id = #{examId}
-            </if>
-            <if test="userId != null and userId != ''">
-                and tbeiu.user_id = #{userId}
+            <if test="orgId != null and orgId != ''">
+                and tee.org_id = #{orgId}
             </if>
             </if>
             <choose>
             <choose>
                 <when test="status != null and status != '' and status == 'UN_FINISH'">
                 <when test="status != null and status != '' and status == 'UN_FINISH'">
@@ -212,14 +208,17 @@
                     and toer.id is not null
                     and toer.id is not null
                 </otherwise>
                 </otherwise>
             </choose>
             </choose>
-            <if test="orgId != null and orgId != ''">
-                and tee.org_id = #{orgId}
+            <if test="examId != null and examId != ''">
+                and s.exam_id = #{examId}
             </if>
             </if>
             <if test="examActivityId != null and examActivityId != ''">
             <if test="examActivityId != null and examActivityId != ''">
-                and toer.exam_activity_id = #{examActivityId}
+                and s.exam_activity_id = #{examActivityId}
             </if>
             </if>
-            <if test="roomCode != null and roomCode != ''">
-                and s.room_code = #{roomCode}
+            <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+                and s.room_code in
+                <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                    #{roomCode}
+                </foreach>
             </if>
             </if>
             <if test="name != null and name !=''">
             <if test="name != null and name !=''">
                 and s.name like CONCAT('%', #{name},'%')
                 and s.name like CONCAT('%', #{name},'%')
@@ -263,6 +262,9 @@
                 and toer.exception_count &lt;= #{maxExceptionCount}
                 and toer.exception_count &lt;= #{maxExceptionCount}
             </if>
             </if>
         </where>
         </where>
+        <if test="(examActivityId != null and examActivityId != '') or (roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0)">
+            order by CAST(teea.code AS UNSIGNED),CAST(s.room_code AS UNSIGNED)
+        </if>
     </select>
     </select>
 
 
     <select id="invigilatePageWarningList" resultType="com.qmth.themis.business.bean.admin.InvigilateListWarningBean">
     <select id="invigilatePageWarningList" resultType="com.qmth.themis.business.bean.admin.InvigilateListWarningBean">
@@ -291,24 +293,21 @@
         left join t_e_exam tee on tee.id = tiiwi.exam_id
         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_activity teea on teea.id = tiiwi.exam_activity_id
         left join t_oe_exam_record toer on toer.id = tiiwi.exam_record_id
         left join t_oe_exam_record toer on toer.id = tiiwi.exam_record_id
-        <if test="userId != null and userId != ''">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = tees.exam_id
-        </if>
         <where> 1 = 1
         <where> 1 = 1
-            <if test="examId != null and examId != ''">
-                and tees.exam_id = #{examId}
-            </if>
-            <if test="userId != null and userId != ''">
-                and tbeiu.user_id = #{userId}
-            </if>
             <if test="orgId != null and orgId != ''">
             <if test="orgId != null and orgId != ''">
                 and tee.org_id = #{orgId}
                 and tee.org_id = #{orgId}
             </if>
             </if>
+            <if test="examId != null and examId != ''">
+                and tees.exam_id = #{examId}
+            </if>
             <if test="examActivityId != null and examActivityId != ''">
             <if test="examActivityId != null and examActivityId != ''">
-                and toer.exam_activity_id = #{examActivityId}
+                and tees.exam_activity_id = #{examActivityId}
             </if>
             </if>
-            <if test="roomCode != null and roomCode != ''">
-                and tees.room_code = #{roomCode}
+            <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+                and tees.room_code in
+                <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                    #{roomCode}
+                </foreach>
             </if>
             </if>
             <if test="approveStatus != null and approveStatus != '' or approveStatus == 0">
             <if test="approveStatus != null and approveStatus != '' or approveStatus == 0">
                 and tiiwi.approve_status = #{approveStatus}
                 and tiiwi.approve_status = #{approveStatus}
@@ -339,7 +338,10 @@
             </if>
             </if>
             and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
             and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
         </where>
         </where>
-        order by tiiwi.approve_status,CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
+        order by tiiwi.approve_status
+        <if test="(examActivityId != null and examActivityId != '') or (roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0)">
+            ,CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
+        </if>
     </select>
     </select>
 
 
     <update id="approveStatusListUpdate">
     <update id="approveStatusListUpdate">
@@ -352,24 +354,21 @@
         left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
         left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
         left join t_oe_exam_record toer on toer.id = tiiwi.exam_record_id
         left join t_oe_exam_record toer on toer.id = tiiwi.exam_record_id
         left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
         left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
-        <if test="userId != null and userId != ''">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = tee.id
-        </if>
-        <where>1 = 1
-            <if test="examId != null and examId != ''">
-                and tee.id = #{examId}
-            </if>
-            <if test="userId != null and userId != ''">
-                and tbeiu.user_id = #{userId}
-            </if>
+        <where> 1 = 1
             <if test="orgId != null and orgId != ''">
             <if test="orgId != null and orgId != ''">
                 and tee.org_id = #{orgId}
                 and tee.org_id = #{orgId}
             </if>
             </if>
+            <if test="examId != null and examId != ''">
+                and toer.exam_id = #{examId}
+            </if>
             <if test="examActivityId != null and examActivityId != ''">
             <if test="examActivityId != null and examActivityId != ''">
-                and teea.id = #{examActivityId}
+                and toer.exam_activity_id = #{examActivityId}
             </if>
             </if>
-            <if test="roomCode != null and roomCode != ''">
-                and tees.room_code = #{roomCode}
+            <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+                and tees.room_code in
+                <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                    #{roomCode}
+                </foreach>
             </if>
             </if>
             <if test="approveStatus != null and approveStatus != '' or approveStatus == 0">
             <if test="approveStatus != null and approveStatus != '' or approveStatus == 0">
                 and tiiwi.approve_status = #{approveStatus}
                 and tiiwi.approve_status = #{approveStatus}
@@ -430,26 +429,22 @@
         t_e_exam_student tees
         t_e_exam_student tees
         left join t_e_exam tee on tee.id = tees.exam_id
         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
         left join t_e_exam_activity teea on teea.id = tees.exam_activity_id
-        left join t_e_student tes on tees.student_id = tes.id
         left join t_oe_exam_record t on t.exam_student_id = tees.id
         left join t_oe_exam_record t on t.exam_student_id = tees.id
-        <if test="userId != null and userId != ''">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = tees.exam_id
-        </if>
-        <where>1 = 1
-            <if test="examId != null and examId != ''">
-                and tees.exam_id = #{examId}
-            </if>
-            <if test="userId != null and userId != ''">
-                and tbeiu.user_id = #{userId}
-            </if>
+        <where> 1 = 1
             <if test="orgId != null and orgId != ''">
             <if test="orgId != null and orgId != ''">
                 and tee.org_id = #{orgId}
                 and tee.org_id = #{orgId}
             </if>
             </if>
+            <if test="examId != null and examId != ''">
+                and tees.exam_id = #{examId}
+            </if>
             <if test="examActivityId != null and examActivityId != ''">
             <if test="examActivityId != null and examActivityId != ''">
-                and t.exam_activity_id = #{examActivityId}
+                and tees.exam_activity_id = #{examActivityId}
             </if>
             </if>
-            <if test="roomCode != null and roomCode != ''">
-                and tees.room_code = #{roomCode}
+            <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+                and tees.room_code in
+                <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                    #{roomCode}
+                </foreach>
             </if>
             </if>
             <if test="courseCode != null and courseCode != ''">
             <if test="courseCode != null and courseCode != ''">
                 and tees.course_code = #{courseCode}
                 and tees.course_code = #{courseCode}
@@ -480,7 +475,7 @@
             </if>
             </if>
             and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
             and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
         </where>
         </where>
-        <if test="(examActivityId != null and examActivityId != '') or (roomCode != null and roomCode != '')">
+        <if test="(examActivityId != null and examActivityId != '') or (roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0)">
             order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
             order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
         </if>
         </if>
     </select>
     </select>
@@ -504,33 +499,25 @@
         if(tees.already_exam_count > 0,'已完成','未完成') as status,
         if(tees.already_exam_count > 0,'已完成','未完成') as status,
         if(t.breach_status = 0,'违纪','正常') as breachStatus,
         if(t.breach_status = 0,'违纪','正常') as breachStatus,
         tees.class_no as classNo
         tees.class_no as classNo
-        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
-        left join t_e_student tes on tees.student_id = tes.id
+        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
         left join t_oe_exam_record t on t.exam_student_id = tees.id
         left join t_oe_exam_record t on t.exam_student_id = tees.id
-        t.exam_student_id = tees.id
-        <if test="userId != null and userId != ''">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = tees.exam_id
-        </if>
-        <where>1 = 1
-            <if test="examId != null and examId != ''">
-                and tees.exam_id = #{examId}
-            </if>
-            <if test="userId != null and userId != ''">
-                and tbeiu.user_id = #{userId}
-            </if>
+        <where> 1 = 1
             <if test="orgId != null and orgId != ''">
             <if test="orgId != null and orgId != ''">
                 and tee.org_id = #{orgId}
                 and tee.org_id = #{orgId}
             </if>
             </if>
+            <if test="examId != null and examId != ''">
+                and tees.exam_id = #{examId}
+            </if>
             <if test="examActivityId != null and examActivityId != ''">
             <if test="examActivityId != null and examActivityId != ''">
-                and t.exam_activity_id = #{examActivityId}
+                and tees.exam_activity_id = #{examActivityId}
             </if>
             </if>
-            <if test="roomCode != null and roomCode != ''">
-                and tees.room_code = #{roomCode}
+            <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+                and s.room_code in
+                <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                    #{roomCode}
+                </foreach>
             </if>
             </if>
             <if test="courseCode != null and courseCode != ''">
             <if test="courseCode != null and courseCode != ''">
                 and tees.course_code = #{courseCode}
                 and tees.course_code = #{courseCode}
@@ -561,14 +548,14 @@
             </if>
             </if>
             and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
             and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
         </where>
         </where>
-        <if test="(examActivityId != null and examActivityId != '') or (roomCode != null and roomCode != '')">
+        <if test="(examActivityId != null and examActivityId != '') or (roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0)">
             order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
             order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
         </if>
         </if>
     </select>
     </select>
 
 
     <select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
     <select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
         <include refid="invigilatePageListHistorySql"/>
         <include refid="invigilatePageListHistorySql"/>
-        <if test="(examActivityId != null and examActivityId != '') or (roomCode != null and roomCode != '')">
+        <if test="(examActivityId != null and examActivityId != '') or (roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0)">
             order by CAST(teea.code AS UNSIGNED),CAST(s.room_code AS UNSIGNED)
             order by CAST(teea.code AS UNSIGNED),CAST(s.room_code AS UNSIGNED)
         </if>
         </if>
     </select>
     </select>
@@ -601,18 +588,11 @@
         s.class_no as classNo,
         s.class_no as classNo,
         IFNULL(toer.exception_count,0) as exceptionCount,
         IFNULL(toer.exception_count,0) as exceptionCount,
         IFNULL(toer.warning_multiple_face_count,0) as multipleFaceCount
         IFNULL(toer.warning_multiple_face_count,0) as multipleFaceCount
-        from
-        t_e_exam_student s
-        left join t_e_exam tee on
-        tee.id = s.exam_id
-        left join t_e_exam_activity teea on
-        teea.id = s.exam_activity_id
-        left join t_e_student tes on
-        s.student_id = tes.id
+        from t_e_exam_student s
+        left join t_e_exam tee on tee.id = s.exam_id
+        left join t_e_exam_activity teea on teea.id = s.exam_activity_id
+        left join t_e_student tes on s.student_id = tes.id
         left join t_oe_exam_record toer on toer.exam_student_id = s.id
         left join t_oe_exam_record toer on toer.exam_student_id = s.id
-        <if test="userId != null and userId != ''">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = s.exam_id
-        </if>
         <where> 1 = 1
         <where> 1 = 1
             <choose>
             <choose>
                 <when test="status != null and status != '' and status == 'UN_FINISH'">
                 <when test="status != null and status != '' and status == 'UN_FINISH'">
@@ -622,20 +602,20 @@
                     and toer.id is not null
                     and toer.id is not null
                 </otherwise>
                 </otherwise>
             </choose>
             </choose>
-            <if test="examId != null and examId != ''">
-                and s.exam_id = #{examId}
-            </if>
-            <if test="userId != null and userId != ''">
-                and tbeiu.user_id = #{userId}
-            </if>
             <if test="orgId != null and orgId != ''">
             <if test="orgId != null and orgId != ''">
                 and tee.org_id = #{orgId}
                 and tee.org_id = #{orgId}
             </if>
             </if>
+            <if test="examId != null and examId != ''">
+                and s.exam_id = #{examId}
+            </if>
             <if test="examActivityId != null and examActivityId != ''">
             <if test="examActivityId != null and examActivityId != ''">
                 and s.exam_activity_id = #{examActivityId}
                 and s.exam_activity_id = #{examActivityId}
             </if>
             </if>
-            <if test="roomCode != null and roomCode != ''">
-                and s.room_code = #{roomCode}
+            <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+                and s.room_code in
+                <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                    #{roomCode}
+                </foreach>
             </if>
             </if>
             <if test="name != null and name !=''">
             <if test="name != null and name !=''">
                 and s.name like CONCAT('%', #{name},'%')
                 and s.name like CONCAT('%', #{name},'%')
@@ -703,7 +683,7 @@
     <select id="invigilatePageListHistoryExport"
     <select id="invigilatePageListHistoryExport"
             resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
             resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
         <include refid="invigilatePageListHistorySql"/>
         <include refid="invigilatePageListHistorySql"/>
-        <if test="(examActivityId != null and examActivityId != '') or (roomCode != null and roomCode != '')">
+        <if test="(examActivityId != null and examActivityId != '') or (roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0)">
             order by CAST(teea.code AS UNSIGNED),CAST(s.room_code AS UNSIGNED)
             order by CAST(teea.code AS UNSIGNED),CAST(s.room_code AS UNSIGNED)
         </if>
         </if>
     </select>
     </select>
@@ -1701,24 +1681,21 @@
         left join t_e_exam tee on tee.id = toer.exam_id
         left join t_e_exam tee on tee.id = toer.exam_id
         left join t_e_exam_activity teea on teea.id = toer.exam_activity_id
         left join t_e_exam_activity teea on teea.id = toer.exam_activity_id
         left join t_e_exam_student tees on tees.id = toer.exam_student_id
         left join t_e_exam_student tees on tees.id = toer.exam_student_id
-        <if test="userId != null and userId != ''">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = tee.id
-        </if>
-        <where>1 = 1
-            <if test="examId != null and examId != ''">
-                and tee.id = #{examId}
-            </if>
-            <if test="userId != null and userId != ''">
-                and tbeiu.user_id = #{userId}
-            </if>
+        <where> 1 = 1
             <if test="orgId != null and orgId != ''">
             <if test="orgId != null and orgId != ''">
                 and tee.org_id = #{orgId}
                 and tee.org_id = #{orgId}
             </if>
             </if>
+            <if test="examId != null and examId != ''">
+                and toer.exam_id = #{examId}
+            </if>
             <if test="examActivityId != null and examActivityId != ''">
             <if test="examActivityId != null and examActivityId != ''">
-                and teea.id = #{examActivityId}
+                and toer.exam_activity_id = #{examActivityId}
             </if>
             </if>
-            <if test="roomCode != null and roomCode != ''">
-                and tees.room_code = #{roomCode}
+            <if test="roomCodeList != null and roomCodeList != '' and roomCodeList.size > 0">
+                and tees.room_code in
+                <foreach collection="roomCodeList" item="roomCode" index="index" open="(" close=")" separator=",">
+                    #{roomCode}
+                </foreach>
             </if>
             </if>
             <if test="name != null and name !=''">
             <if test="name != null and name !=''">
                 and tees.name like CONCAT('%', #{name},'%')
                 and tees.name like CONCAT('%', #{name},'%')