wangliang 4 роки тому
батько
коміт
a732035140
16 змінених файлів з 205 додано та 154 видалено
  1. 4 4
      themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamReexamController.java
  2. 6 6
      themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateController.java
  3. 3 3
      themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateWarnInfoController.java
  4. 8 8
      themis-backend/src/main/java/com/qmth/themis/backend/api/TIeReportController.java
  5. 11 4
      themis-business/src/main/java/com/qmth/themis/business/dao/TEExamReexamMapper.java
  6. 8 7
      themis-business/src/main/java/com/qmth/themis/business/dao/TIeInvigilateWarnInfoMapper.java
  7. 31 26
      themis-business/src/main/java/com/qmth/themis/business/dao/TOeExamRecordMapper.java
  8. 11 4
      themis-business/src/main/java/com/qmth/themis/business/service/TEExamReexamService.java
  9. 3 1
      themis-business/src/main/java/com/qmth/themis/business/service/TIeInvigilateWarnInfoService.java
  10. 25 10
      themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java
  11. 12 8
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamReexamServiceImpl.java
  12. 3 2
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeInvigilateWarnInfoServiceImpl.java
  13. 45 69
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java
  14. 13 2
      themis-business/src/main/resources/mapper/TEExamReexamMapper.xml
  15. 4 0
      themis-business/src/main/resources/mapper/TIeInvigilateWarnInfoMapper.xml
  16. 18 0
      themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

+ 4 - 4
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamReexamController.java

@@ -246,7 +246,7 @@ public class TEExamReexamController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        return ResultUtil.ok(teExamReexamService.reexamPageRequestList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, userId));
+        return ResultUtil.ok(teExamReexamService.reexamPageRequestList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, userId, tbUser.getOrgId()));
     }
 
     @ApiOperation(value = "重考待审列表接口")
@@ -265,7 +265,7 @@ public class TEExamReexamController {
                               @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
                               @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        return ResultUtil.ok(teExamReexamService.reexamPageNotDoneList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, reason, reasonStartTime, reasonEndTime, applyName, tbUser.getId()));
+        return ResultUtil.ok(teExamReexamService.reexamPageNotDoneList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, reason, reasonStartTime, reasonEndTime, applyName, tbUser.getId(), tbUser.getOrgId()));
     }
 
     @ApiOperation(value = "重考待审提醒接口")
@@ -273,7 +273,7 @@ public class TEExamReexamController {
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
     public Result listNotDoneNotify(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        Integer count = teExamReexamService.reexamPageNotDoneCount(examId, tbUser.getId());
+        Integer count = teExamReexamService.reexamPageNotDoneCount(examId, tbUser.getId(), tbUser.getOrgId());
         return ResultUtil.ok(Collections.singletonMap(SystemConstant.COUNT, count));
     }
 
@@ -293,6 +293,6 @@ public class TEExamReexamController {
                            @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
                            @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        return ResultUtil.ok(teExamReexamService.reexamPageDoneList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, auditingStatus, reasonStartTime, reasonEndTime, applyName, tbUser.getId()));
+        return ResultUtil.ok(teExamReexamService.reexamPageDoneList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, auditingStatus, reasonStartTime, reasonEndTime, applyName, tbUser.getId(), tbUser.getOrgId()));
     }
 }

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

@@ -119,7 +119,7 @@ public class TIeInvigilateController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, userId);
+        IPage<InvigilateListVideoBean> invigilateListVideoBeanIPage = tOeExamRecordService.invigilatePageListVideo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, userId, tbUser.getOrgId());
         if (Objects.nonNull(invigilateListVideoBeanIPage)) {
             List<InvigilateListVideoBean> invigilateListVideoBeanList = invigilateListVideoBeanIPage.getRecords();
             ExamCacheBean examCacheBean = teExamService.getExamCacheBean(examId);
@@ -185,7 +185,7 @@ public class TIeInvigilateController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        List<InvigilateListVideoBean> invigilateListVideoBeanList = tOeExamRecordService.invigilatePageListVideoRandom(examId, userId, randomNum);
+        List<InvigilateListVideoBean> invigilateListVideoBeanList = tOeExamRecordService.invigilatePageListVideoRandom(examId, userId, randomNum, tbUser.getOrgId());
         if (Objects.nonNull(invigilateListVideoBeanList) && invigilateListVideoBeanList.size() > 0) {
             invigilateListVideoBeanList.forEach(s -> {
                 String monitorLiveUrl = ExamRecordCacheUtil.getMonitorLiveUrl(s.getExamRecordId(), MonitorVideoSourceEnum.CLIENT_CAMERA.name());
@@ -232,7 +232,7 @@ public class TIeInvigilateController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        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));
+        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()));
     }
 
     @ApiOperation(value = "实时监控台列表明细接口")
@@ -378,7 +378,7 @@ public class TIeInvigilateController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        IPage<InvigilateListPatrolBean> invigilateListPatrolBeanIPage = tOeExamRecordService.invigilatePagePatrolList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, userId);
+        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());
         if (Objects.nonNull(invigilateListPatrolBeanIPage)) {
             List<InvigilateListPatrolBean> invigilateListPatrolBeanList = invigilateListPatrolBeanIPage.getRecords();
             if (Objects.nonNull(invigilateListPatrolBeanList) && invigilateListPatrolBeanList.size() > 0) {
@@ -411,7 +411,7 @@ public class TIeInvigilateController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        return ResultUtil.ok(tOeExamRecordService.invigilatePageProgressList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, userId));
+        return ResultUtil.ok(tOeExamRecordService.invigilatePageProgressList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode, name, identity, userId, tbUser.getOrgId()));
     }
 
     @ApiOperation(value = "进度查询列表导出接口")
@@ -430,7 +430,7 @@ public class TIeInvigilateController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        List<InvigilateListProgressExcelBean> invigilateListProgressExcelBeanList = tOeExamRecordService.invigilatePageProgressListExport(examId, examActivityId, roomCode, courseCode, name, identity, userId);
+        List<InvigilateListProgressExcelBean> invigilateListProgressExcelBeanList = tOeExamRecordService.invigilatePageProgressListExport(examId, examActivityId, roomCode, courseCode, name, identity, userId, tbUser.getOrgId());
         ExportUtils.exportEXCEL("进度信息", InvigilateListProgressExcelBean.class, invigilateListProgressExcelBeanList, ServletUtil.getResponse());
     }
 

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

@@ -59,7 +59,7 @@ public class TIeInvigilateWarnInfoController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        Integer count = tIeInvigilateWarnInfoService.warningCount(examId, examActivityId, roomCode, userId);
+        Integer count = tIeInvigilateWarnInfoService.warningCount(examId, examActivityId, roomCode, userId, tbUser.getOrgId());
         return ResultUtil.ok(Collections.singletonMap(SystemConstant.COUNT, count));
     }
 
@@ -87,7 +87,7 @@ public class TIeInvigilateWarnInfoController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        return ResultUtil.ok(tOeExamRecordService.invigilatePageWarningList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId));
+        return ResultUtil.ok(tOeExamRecordService.invigilatePageWarningList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId()));
     }
 
     @ApiOperation(value = "预警消息接口")
@@ -155,7 +155,7 @@ public class TIeInvigilateWarnInfoController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId);
+        tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId());
         return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
     }
 }

+ 8 - 8
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeReportController.java

@@ -34,7 +34,7 @@ public class TIeReportController {
     @ApiOperation(value = "考试概览")
     @RequestMapping(value = "/exam_view", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
-    public Result examView(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+    public Result examView(@ApiParam(value = "考试id", required = false) @RequestParam(required = false) Long examId,
                            @ApiParam(value = "考场场次id", required = false) @RequestParam(required = false) Long examActivityId,
                            @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
                            @ApiParam(value = "科目编码", required = false) @RequestParam(required = false) String courseCode,
@@ -46,7 +46,7 @@ public class TIeReportController {
     @ApiOperation(value = "情况统计")
     @RequestMapping(value = "/exam_view_count", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
-    public Result examViewCount(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+    public Result examViewCount(@ApiParam(value = "考试id", required = false) @RequestParam(required = false) Long examId,
                                 @ApiParam(value = "考场场次id", required = false) @RequestParam(required = false) Long examActivityId,
                                 @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
                                 @ApiParam(value = "科目编码", required = false) @RequestParam(required = false) String courseCode,
@@ -60,7 +60,7 @@ public class TIeReportController {
     @ApiOperation(value = "缺考名单")
     @RequestMapping(value = "/exam_deficiency_list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
-    public Result examDeficiencyList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+    public Result examDeficiencyList(@ApiParam(value = "考试id", required = false) @RequestParam(required = false) Long examId,
                                      @ApiParam(value = "考场场次id", required = false) @RequestParam(required = false) Long examActivityId,
                                      @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
                                      @ApiParam(value = "科目编码", required = false) @RequestParam(required = false) String courseCode,
@@ -74,7 +74,7 @@ public class TIeReportController {
     @ApiOperation(value = "异常处理")
     @RequestMapping(value = "/exam_exception_list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
-    public Result examExceptionList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+    public Result examExceptionList(@ApiParam(value = "考试id", required = false) @RequestParam(required = false) Long examId,
                                     @ApiParam(value = "考场场次id", required = false) @RequestParam(required = false) Long examActivityId,
                                     @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
                                     @ApiParam(value = "科目编码", required = false) @RequestParam(required = false) String courseCode,
@@ -96,7 +96,7 @@ public class TIeReportController {
     @ApiOperation(value = "重考处理")
     @RequestMapping(value = "/exam_reexam_list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
-    public Result examReexamList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+    public Result examReexamList(@ApiParam(value = "考试id", required = false) @RequestParam(required = false) Long examId,
                                  @ApiParam(value = "考场场次id", required = false) @RequestParam(required = false) Long examActivityId,
                                  @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
                                  @ApiParam(value = "科目编码", required = false) @RequestParam(required = false) String courseCode,
@@ -110,7 +110,7 @@ public class TIeReportController {
     @ApiOperation(value = "违纪名单")
     @RequestMapping(value = "/exam_breach_list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
-    public Result examBreachList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+    public Result examBreachList(@ApiParam(value = "考试id", required = false) @RequestParam(required = false) Long examId,
                                  @ApiParam(value = "考场场次id", required = false) @RequestParam(required = false) Long examActivityId,
                                  @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
                                  @ApiParam(value = "科目编码", required = false) @RequestParam(required = false) String courseCode,
@@ -132,7 +132,7 @@ public class TIeReportController {
     @ApiOperation(value = "撤销违纪名单")
     @RequestMapping(value = "/exam_revoke_breach_list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
-    public Result examRevokeBreachList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+    public Result examRevokeBreachList(@ApiParam(value = "考试id", required = false) @RequestParam(required = false) Long examId,
                                        @ApiParam(value = "考场场次id", required = false) @RequestParam(required = false) Long examActivityId,
                                        @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
                                        @ApiParam(value = "科目编码", required = false) @RequestParam(required = false) String courseCode,
@@ -154,7 +154,7 @@ public class TIeReportController {
     @ApiOperation(value = "考生日志")
     @RequestMapping(value = "/exam_student_log_list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
-    public Result examStudentLogList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+    public Result examStudentLogList(@ApiParam(value = "考试id", required = false) @RequestParam(required = false) Long examId,
                                      @ApiParam(value = "考场场次id", required = false) @RequestParam(required = false) Long examActivityId,
                                      @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode,
                                      @ApiParam(value = "科目编码", required = false) @RequestParam(required = false) String courseCode,

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

@@ -33,6 +33,7 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
      * @param name
      * @param identity
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<ReexamListRequestBean> reexamPageRequestList(IPage<Map> iPage, @Param("examId") Long examId,
@@ -41,7 +42,8 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
                                                               @Param("courseCode") String courseCode,
                                                               @Param("name") String name,
                                                               @Param("identity") String identity,
-                                                              @Param("userId") Long userId);
+                                                              @Param("userId") Long userId,
+                                                              @Param("orgId") Long orgId);
 
     /**
      * 重考待审列表
@@ -58,6 +60,7 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
      * @param reasonEndTime
      * @param applyName
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<ReexamListNotDoneBean> reexamPageNotDoneList(IPage<Map> iPage, @Param("examId") Long examId,
@@ -70,16 +73,18 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
                                                               @Param("reasonStartTime") Long reasonStartTime,
                                                               @Param("reasonEndTime") Long reasonEndTime,
                                                               @Param("applyName") String applyName,
-                                                              @Param("userId") Long userId);
+                                                              @Param("userId") Long userId,
+                                                              @Param("orgId") Long orgId);
 
     /**
      * 重考待审提醒
      *
      * @param examId
      * @param userId
+     * @param orgId
      * @return
      */
-    public Integer reexamPageNotDoneCount(@Param("examId") Long examId, @Param("userId") Long userId);
+    public Integer reexamPageNotDoneCount(@Param("examId") Long examId, @Param("userId") Long userId, @Param("orgId") Long orgId);
 
     /**
      * 重考已审列表
@@ -96,6 +101,7 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
      * @param reasonEndTime
      * @param applyName
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<ReexamListDoneBean> reexamPageDoneList(IPage<Map> iPage, @Param("examId") Long examId,
@@ -108,7 +114,8 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
                                                         @Param("reasonStartTime") Long reasonStartTime,
                                                         @Param("reasonEndTime") Long reasonEndTime,
                                                         @Param("applyName") String applyName,
-                                                        @Param("userId") Long userId);
+                                                        @Param("userId") Long userId,
+                                                        @Param("orgId") Long orgId);
 
     public IPage<ExamReexamListBean> getExamReexamPage(IPage<ExamReexamListBean> iPage, @Param("examId") Long examId,
                                                        @Param("activityId") Long activityId, @Param("roomCode") String roomCode,

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

@@ -1,14 +1,13 @@
 package com.qmth.themis.business.dao;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.qmth.themis.business.bean.backend.WarningNotifyBean;
 import com.qmth.themis.business.dto.response.TIeWarningNotifyDto;
 import com.qmth.themis.business.entity.TIeInvigilateWarnInfo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * @Description: 监考预警信息 Mapper 接口
@@ -27,12 +26,14 @@ public interface TIeInvigilateWarnInfoMapper extends BaseMapper<TIeInvigilateWar
      * @param examActivityId
      * @param roomCode
      * @param userId
+     * @param orgId
      * @return
      */
     public Integer warningCount(@Param("examId") Long examId,
                                 @Param("examActivityId") Long examActivityId,
                                 @Param("roomCode") String roomCode,
-                                @Param("userId") Long userId);
+                                @Param("userId") Long userId,
+                                @Param("orgId") Long orgId);
 
     /**
      * 预警通知
@@ -44,5 +45,5 @@ public interface TIeInvigilateWarnInfoMapper extends BaseMapper<TIeInvigilateWar
      */
     public List<TIeWarningNotifyDto> warningMessage(@Param("examId") Long examId, @Param("userId") Long userId, @Param("orgId") Long orgId);
 
-	public List<WarningNotifyBean> findLastMsg(@Param("conut")Integer conut);
+    public List<WarningNotifyBean> findLastMsg(@Param("conut") Integer conut);
 }

+ 31 - 26
themis-business/src/main/java/com/qmth/themis/business/dao/TOeExamRecordMapper.java

@@ -1,25 +1,15 @@
 package com.qmth.themis.business.dao;
 
-import java.util.List;
-import java.util.Map;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.qmth.themis.business.bean.backend.ExaminationMonitorHourWarnCountBean;
-import com.qmth.themis.business.bean.backend.InvigilateListBean;
-import com.qmth.themis.business.bean.backend.InvigilateListHistoryBean;
-import com.qmth.themis.business.bean.backend.InvigilateListPatrolBean;
-import com.qmth.themis.business.bean.backend.InvigilateListPatrolReportBean;
-import com.qmth.themis.business.bean.backend.InvigilateListProgressBean;
-import com.qmth.themis.business.bean.backend.InvigilateListProgressExcelBean;
-import com.qmth.themis.business.bean.backend.InvigilateListVideoBean;
-import com.qmth.themis.business.bean.backend.InvigilateListWarningBean;
-import com.qmth.themis.business.bean.backend.OpenRecordNeedMarkBean;
+import com.qmth.themis.business.bean.backend.*;
 import com.qmth.themis.business.dto.response.TEExamUnFinishDto;
 import com.qmth.themis.business.entity.TOeExamRecord;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 考试记录 Mapper 接口
@@ -96,6 +86,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, @Param("examId") Long examId,
@@ -108,7 +99,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                   @Param("minWarningCount") Integer minWarningCount,
                                                                   @Param("maxWarningCount") Integer maxWarningCount,
                                                                   @Param("clientWebsocketStatus") String clientWebsocketStatus,
-                                                                  @Param("userId") Long userId);
+                                                                  @Param("userId") Long userId,
+                                                                  @Param("orgId") Long orgId);
 
     /**
      * 实时监控台视频随机列表
@@ -116,9 +108,10 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param examId
      * @param userId
      * @param randomNum
+     * @param orgId
      * @return
      */
-    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(@Param("examId") Long examId, @Param("userId") Long userId, @Param("randomNum") Integer randomNum);
+    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(@Param("examId") Long examId, @Param("userId") Long userId, @Param("randomNum") Integer randomNum, @Param("orgId") Long orgId);
 
     /**
      * 查询在线巡考列表
@@ -138,6 +131,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, @Param("examId") Long examId,
@@ -153,7 +147,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                     @Param("minWarningCount") Integer minWarningCount,
                                                                     @Param("maxWarningCount") Integer maxWarningCount,
                                                                     @Param("clientWebsocketStatus") String clientWebsocketStatus,
-                                                                    @Param("userId") Long userId);
+                                                                    @Param("userId") Long userId,
+                                                                    @Param("orgId") Long orgId);
 
     /**
      * 预警提醒列表
@@ -172,6 +167,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, @Param("examId") Long examId,
@@ -186,7 +182,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                       @Param("maxExceptionCount") Integer maxExceptionCount,
                                                                       @Param("minWarningCount") Integer minWarningCount,
                                                                       @Param("maxWarningCount") Integer maxWarningCount,
-                                                                      @Param("userId") Long userId);
+                                                                      @Param("userId") Long userId,
+                                                                      @Param("orgId") Long orgId);
 
     /**
      * 预警提醒清除未阅列表
@@ -204,6 +201,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     public Integer approveStatusListUpdate(@Param("examId") Long examId,
@@ -218,7 +216,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                            @Param("maxExceptionCount") Integer maxExceptionCount,
                                            @Param("minWarningCount") Integer minWarningCount,
                                            @Param("maxWarningCount") Integer maxWarningCount,
-                                           @Param("userId") Long userId);
+                                           @Param("userId") Long userId,
+                                           @Param("orgId") Long orgId);
 
     /**
      * 进度查询列表
@@ -231,6 +230,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param name
      * @param identity
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, @Param("examId") Long examId,
@@ -239,7 +239,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                         @Param("courseCode") String courseCode,
                                                                         @Param("name") String name,
                                                                         @Param("identity") String identity,
-                                                                        @Param("userId") Long userId);
+                                                                        @Param("userId") Long userId,
+                                                                        @Param("orgId") Long orgId);
 
     /**
      * 进度查询列表导出
@@ -251,6 +252,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param name
      * @param identity
      * @param userId
+     * @param orgId
      * @return
      */
     public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(@Param("examId") Long examId,
@@ -259,7 +261,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                                   @Param("courseCode") String courseCode,
                                                                                   @Param("name") String name,
                                                                                   @Param("identity") String identity,
-                                                                                  @Param("userId") Long userId);
+                                                                                  @Param("userId") Long userId,
+                                                                                  @Param("orgId") Long orgId);
 
     /**
      * 监考明细管理列表
@@ -281,6 +284,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, @Param("examId") Long examId,
@@ -298,7 +302,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
                                                                       @Param("maxExceptionCount") Integer maxExceptionCount,
                                                                       @Param("minWarningCount") Integer minWarningCount,
                                                                       @Param("maxWarningCount") Integer maxWarningCount,
-                                                                      @Param("userId") Long userId);
+                                                                      @Param("userId") Long userId,
+                                                                      @Param("orgId") Long orgId);
 
     public List<Map<String, Object>> getDoneCount(@Param("examId") Long examId, @Param("activityId") Long activityId,
                                                   @Param("roomCode") String roomCode, @Param("courseCode") String courseCode);
@@ -343,6 +348,6 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
 
     public void updateHasAnswerFile(@Param("recordId") Long recordId, @Param("hasAnswerFile") Integer hasAnswerFile);
 
-	public List<OpenRecordNeedMarkBean> findExamRecordNeedMark(@Param("examId") Long examId,@Param("courseCode") String courseCode,
-			@Param("idGt")Integer idGt,@Param("count")Integer count);
+    public List<OpenRecordNeedMarkBean> findExamRecordNeedMark(@Param("examId") Long examId, @Param("courseCode") String courseCode,
+                                                               @Param("idGt") Integer idGt, @Param("count") Integer count);
 }

+ 11 - 4
themis-business/src/main/java/com/qmth/themis/business/service/TEExamReexamService.java

@@ -29,6 +29,7 @@ public interface TEExamReexamService extends IService<TEExamReexam> {
      * @param name
      * @param identity
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<ReexamListRequestBean> reexamPageRequestList(IPage<Map> iPage, Long examId,
@@ -37,7 +38,8 @@ public interface TEExamReexamService extends IService<TEExamReexam> {
                                                               String courseCode,
                                                               String name,
                                                               String identity,
-                                                              Long userId);
+                                                              Long userId,
+                                                              Long orgId);
 
     /**
      * 重考待审列表
@@ -54,6 +56,7 @@ public interface TEExamReexamService extends IService<TEExamReexam> {
      * @param reasonEndTime
      * @param applyName
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<ReexamListNotDoneBean> reexamPageNotDoneList(IPage<Map> iPage, Long examId,
@@ -66,16 +69,18 @@ public interface TEExamReexamService extends IService<TEExamReexam> {
                                                               Long reasonStartTime,
                                                               Long reasonEndTime,
                                                               String applyName,
-                                                              Long userId);
+                                                              Long userId,
+                                                              Long orgId);
 
     /**
      * 重考待审提醒
      *
      * @param examId
      * @param userId
+     * @param orgId
      * @return
      */
-    public Integer reexamPageNotDoneCount(Long examId, Long userId);
+    public Integer reexamPageNotDoneCount(Long examId, Long userId, Long orgId);
 
     /**
      * 重考已审列表
@@ -92,6 +97,7 @@ public interface TEExamReexamService extends IService<TEExamReexam> {
      * @param reasonEndTime
      * @param applyName
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<ReexamListDoneBean> reexamPageDoneList(IPage<Map> iPage, Long examId,
@@ -104,5 +110,6 @@ public interface TEExamReexamService extends IService<TEExamReexam> {
                                                         Long reasonStartTime,
                                                         Long reasonEndTime,
                                                         String applyName,
-                                                        Long userId);
+                                                        Long userId,
+                                                        Long orgId);
 }

+ 3 - 1
themis-business/src/main/java/com/qmth/themis/business/service/TIeInvigilateWarnInfoService.java

@@ -22,12 +22,14 @@ public interface TIeInvigilateWarnInfoService extends IService<TIeInvigilateWarn
      * @param examActivityId
      * @param roomCode
      * @param userId
+     * @param orgId
      * @return
      */
     public Integer warningCount(Long examId,
                                 Long examActivityId,
                                 String roomCode,
-                                Long userId);
+                                Long userId,
+                                Long orgId);
 
     /**
      * 预警通知

+ 25 - 10
themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java

@@ -140,6 +140,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId,
@@ -152,7 +153,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                   Integer minWarningCount,
                                                                   Integer maxWarningCount,
                                                                   String clientWebsocketStatus,
-                                                                  Long userId);
+                                                                  Long userId,
+                                                                  Long orgId);
 
     /**
      * 实时监控台视频随机列表
@@ -160,9 +162,10 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param examId
      * @param userId
      * @param randomNum
+     * @param orgId
      * @return
      */
-    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, Long userId, Integer randomNum);
+    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, Long userId, Integer randomNum, Long orgId);
 
     /**
      * 查询在线巡考列表
@@ -182,6 +185,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId,
@@ -197,7 +201,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                     Integer minWarningCount,
                                                                     Integer maxWarningCount,
                                                                     String clientWebsocketStatus,
-                                                                    Long userId);
+                                                                    Long userId,
+                                                                    Long orgId);
 
     /**
      * 预警提醒列表
@@ -216,6 +221,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId,
@@ -230,7 +236,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                       Integer maxExceptionCount,
                                                                       Integer minWarningCount,
                                                                       Integer maxWarningCount,
-                                                                      Long userId);
+                                                                      Long userId,
+                                                                      Long orgId);
 
     /**
      * 预警提醒清除未阅列表
@@ -248,6 +255,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     public Integer approveStatusListUpdate(Long examId,
@@ -262,7 +270,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                            Integer maxExceptionCount,
                                            Integer minWarningCount,
                                            Integer maxWarningCount,
-                                           Long userId);
+                                           Long userId,
+                                           Long orgId);
 
     /**
      * 进度查询列表
@@ -275,6 +284,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param name
      * @param identity
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId,
@@ -283,7 +293,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                         String courseCode,
                                                                         String name,
                                                                         String identity,
-                                                                        Long userId);
+                                                                        Long userId,
+                                                                        Long orgId);
 
     /**
      * 进度查询列表导出
@@ -295,6 +306,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param name
      * @param identity
      * @param userId
+     * @param orgId
      * @return
      */
     public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId,
@@ -303,7 +315,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                                   String courseCode,
                                                                                   String name,
                                                                                   String identity,
-                                                                                  Long userId);
+                                                                                  Long userId,
+                                                                                  Long orgId);
 
     /**
      * 监考明细管理列表
@@ -325,6 +338,7 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, Long examId,
@@ -342,7 +356,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
                                                                       Integer maxExceptionCount,
                                                                       Integer minWarningCount,
                                                                       Integer maxWarningCount,
-                                                                      Long userId);
+                                                                      Long userId,
+                                                                      Long orgId);
 
 
     /**
@@ -371,6 +386,6 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
 
     TOeExamRecord findOneByExamId(Long examId, ExamRecordStatusEnum status);
 
-	public List<OpenRecordNeedMarkBean> findExamRecordNeedMark(Long examId, String courseCode, Integer idGt,
-			Integer count);
+    public List<OpenRecordNeedMarkBean> findExamRecordNeedMark(Long examId, String courseCode, Integer idGt,
+                                                               Integer count);
 }

+ 12 - 8
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamReexamServiceImpl.java

@@ -37,11 +37,12 @@ public class TEExamReexamServiceImpl extends ServiceImpl<TEExamReexamMapper, TEE
      * @param name
      * @param identity
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<ReexamListRequestBean> reexamPageRequestList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Long userId) {
-        return teExamReexamMapper.reexamPageRequestList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, userId);
+    public IPage<ReexamListRequestBean> reexamPageRequestList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Long userId, Long orgId) {
+        return teExamReexamMapper.reexamPageRequestList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, userId, orgId);
     }
 
     /**
@@ -59,11 +60,12 @@ public class TEExamReexamServiceImpl extends ServiceImpl<TEExamReexamMapper, TEE
      * @param reasonEndTime
      * @param applyName
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<ReexamListNotDoneBean> reexamPageNotDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, String reason, Long reasonStartTime, Long reasonEndTime, String applyName, Long userId) {
-        return teExamReexamMapper.reexamPageNotDoneList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, reason, reasonStartTime, reasonEndTime, applyName, userId);
+    public IPage<ReexamListNotDoneBean> reexamPageNotDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, String reason, Long reasonStartTime, Long reasonEndTime, String applyName, Long userId, Long orgId) {
+        return teExamReexamMapper.reexamPageNotDoneList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, reason, reasonStartTime, reasonEndTime, applyName, userId, orgId);
     }
 
     /**
@@ -71,11 +73,12 @@ public class TEExamReexamServiceImpl extends ServiceImpl<TEExamReexamMapper, TEE
      *
      * @param examId
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public Integer reexamPageNotDoneCount(Long examId, Long userId) {
-        return teExamReexamMapper.reexamPageNotDoneCount(examId, userId);
+    public Integer reexamPageNotDoneCount(Long examId, Long userId, Long orgId) {
+        return teExamReexamMapper.reexamPageNotDoneCount(examId, userId, orgId);
     }
 
     /**
@@ -93,10 +96,11 @@ public class TEExamReexamServiceImpl extends ServiceImpl<TEExamReexamMapper, TEE
      * @param reasonEndTime
      * @param applyName
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<ReexamListDoneBean> reexamPageDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Integer auditingStatus, Long reasonStartTime, Long reasonEndTime, String applyName, Long userId) {
-        return teExamReexamMapper.reexamPageDoneList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, auditingStatus, reasonStartTime, reasonEndTime, applyName, userId);
+    public IPage<ReexamListDoneBean> reexamPageDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Integer auditingStatus, Long reasonStartTime, Long reasonEndTime, String applyName, Long userId, Long orgId) {
+        return teExamReexamMapper.reexamPageDoneList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, auditingStatus, reasonStartTime, reasonEndTime, applyName, userId, orgId);
     }
 }

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

@@ -30,11 +30,12 @@ public class TIeInvigilateWarnInfoServiceImpl extends ServiceImpl<TIeInvigilateW
      * @param examActivityId
      * @param roomCode
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public Integer warningCount(Long examId, Long examActivityId, String roomCode, Long userId) {
-        return tIeInvigilateWarnInfoMapper.warningCount(examId, examActivityId, roomCode, userId);
+    public Integer warningCount(Long examId, Long examActivityId, String roomCode, Long userId, Long orgId) {
+        return tIeInvigilateWarnInfoMapper.warningCount(examId, examActivityId, roomCode, userId, orgId);
     }
 
     /**

+ 45 - 69
themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java

@@ -1,44 +1,13 @@
 package com.qmth.themis.business.service.impl;
 
-import java.io.File;
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.UUID;
-
-import javax.annotation.Resource;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeanUtils;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
 import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.qmth.themis.business.bean.backend.InvigilateListBean;
-import com.qmth.themis.business.bean.backend.InvigilateListHistoryBean;
-import com.qmth.themis.business.bean.backend.InvigilateListPatrolBean;
-import com.qmth.themis.business.bean.backend.InvigilateListProgressBean;
-import com.qmth.themis.business.bean.backend.InvigilateListProgressExcelBean;
-import com.qmth.themis.business.bean.backend.InvigilateListVideoBean;
-import com.qmth.themis.business.bean.backend.InvigilateListWarningBean;
-import com.qmth.themis.business.bean.backend.OpenRecordNeedMarkBean;
+import com.qmth.themis.business.bean.backend.*;
 import com.qmth.themis.business.cache.ExamRecordCacheUtil;
 import com.qmth.themis.business.cache.RedisKeyHelper;
-import com.qmth.themis.business.cache.bean.ExamActivityCacheBean;
-import com.qmth.themis.business.cache.bean.ExamCacheBean;
-import com.qmth.themis.business.cache.bean.ExamPaperCacheBean;
-import com.qmth.themis.business.cache.bean.ExamStudentAnswerCacheBean;
-import com.qmth.themis.business.cache.bean.ExamStudentPaperStructCacheBean;
-import com.qmth.themis.business.cache.bean.ObjectiveAnswerCacheBean;
+import com.qmth.themis.business.cache.bean.*;
 import com.qmth.themis.business.config.SystemConfig;
 import com.qmth.themis.business.constant.SpringContextHolder;
 import com.qmth.themis.business.constant.SystemConstant;
@@ -47,25 +16,25 @@ import com.qmth.themis.business.dto.MqDto;
 import com.qmth.themis.business.dto.response.TEExamUnFinishDto;
 import com.qmth.themis.business.entity.TOeExamAnswer;
 import com.qmth.themis.business.entity.TOeExamRecord;
-import com.qmth.themis.business.enums.ExamRecordFieldEnum;
-import com.qmth.themis.business.enums.ExamRecordStatusEnum;
-import com.qmth.themis.business.enums.ExamTypeEnum;
-import com.qmth.themis.business.enums.LivenessTypeEnum;
-import com.qmth.themis.business.enums.MqTagEnum;
-import com.qmth.themis.business.enums.MqTopicEnum;
-import com.qmth.themis.business.enums.ObjectiveScorePolicyEnum;
-import com.qmth.themis.business.enums.VerifyExceptionEnum;
-import com.qmth.themis.business.service.MqDtoService;
-import com.qmth.themis.business.service.TEExamActivityService;
-import com.qmth.themis.business.service.TEExamPaperService;
-import com.qmth.themis.business.service.TEExamService;
-import com.qmth.themis.business.service.TOeExamAnswerService;
-import com.qmth.themis.business.service.TOeExamRecordService;
+import com.qmth.themis.business.enums.*;
+import com.qmth.themis.business.service.*;
 import com.qmth.themis.business.util.OssUtil;
 import com.qmth.themis.business.util.RedisUtil;
 import com.qmth.themis.common.contanst.Constants;
 import com.qmth.themis.common.util.FileUtil;
 import com.qmth.themis.common.util.SimpleBeanUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * @Description: 考试记录 服务实现类
@@ -562,11 +531,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, Integer paperDownload, String status, String name, String identity, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, Long userId) {
-        return tOeExamRecordMapper.invigilatePageListVideo(iPage, examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, userId);
+    public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, Integer paperDownload, String status, String name, String identity, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, Long userId, Long orgId) {
+        return tOeExamRecordMapper.invigilatePageListVideo(iPage, examId, examActivityId, roomCode, paperDownload, status, name, identity, minWarningCount, maxWarningCount, clientWebsocketStatus, userId, orgId);
     }
 
     /**
@@ -575,11 +545,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param examId
      * @param userId
      * @param randomNum
+     * @param orgId
      * @return
      */
     @Override
-    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, Long userId, Integer randomNum) {
-        return tOeExamRecordMapper.invigilatePageListVideoRandom(examId, userId, randomNum);
+    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, Long userId, Integer randomNum, Long orgId) {
+        return tOeExamRecordMapper.invigilatePageListVideoRandom(examId, userId, randomNum, orgId);
     }
 
     /**
@@ -600,11 +571,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxWarningCount
      * @param clientWebsocketStatus
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String status, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, Long userId) {
-        return tOeExamRecordMapper.invigilatePagePatrolList(iPage, examId, examActivityId, roomCode, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, userId);
+    public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String status, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, Long userId, Long orgId) {
+        return tOeExamRecordMapper.invigilatePagePatrolList(iPage, examId, examActivityId, roomCode, status, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, clientWebsocketStatus, userId, orgId);
     }
 
     /**
@@ -624,11 +596,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, Integer approveStatus, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long userId) {
-        return tOeExamRecordMapper.invigilatePageWarningList(iPage, examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId);
+    public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, Integer approveStatus, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long userId, Long orgId) {
+        return tOeExamRecordMapper.invigilatePageWarningList(iPage, examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, orgId);
     }
 
     /**
@@ -647,11 +620,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public Integer approveStatusListUpdate(Long examId, Long examActivityId, String roomCode, Integer approveStatus, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long userId) {
-        return tOeExamRecordMapper.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId);
+    public Integer approveStatusListUpdate(Long examId, Long examActivityId, String roomCode, Integer approveStatus, String name, String identity, Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long userId, Long orgId) {
+        return tOeExamRecordMapper.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, orgId);
     }
 
     /**
@@ -668,8 +642,8 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @return
      */
     @Override
-    public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Long userId) {
-        return tOeExamRecordMapper.invigilatePageProgressList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, userId);
+    public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Long userId, Long orgId) {
+        return tOeExamRecordMapper.invigilatePageProgressList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, userId, orgId);
     }
 
     /**
@@ -682,11 +656,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param name
      * @param identity
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Long userId) {
-        return tOeExamRecordMapper.invigilatePageProgressListExport(examId, examActivityId, roomCode, courseCode, name, identity, userId);
+    public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Long userId, Long orgId) {
+        return tOeExamRecordMapper.invigilatePageProgressListExport(examId, examActivityId, roomCode, courseCode, name, identity, userId, orgId);
     }
 
     /**
@@ -709,11 +684,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param minWarningCount
      * @param maxWarningCount
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, 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) {
-        return tOeExamRecordMapper.invigilatePageListHistory(iPage, examId, examActivityId, roomCode, courseCode, status, breachStatus, finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId);
+    public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, 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) {
+        return tOeExamRecordMapper.invigilatePageListHistory(iPage, examId, examActivityId, roomCode, courseCode, status, breachStatus, finishType, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, orgId);
     }
 
     /**
@@ -837,12 +813,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
 
     @Override
     public TOeExamRecord findOneByExamId(Long examId, ExamRecordStatusEnum status) {
-        return tOeExamRecordMapper.findOneByExamId(examId, status==null?null:status.name());
+        return tOeExamRecordMapper.findOneByExamId(examId, status == null ? null : status.name());
     }
 
-	@Override
-	public List<OpenRecordNeedMarkBean> findExamRecordNeedMark(Long examId, String courseCode, Integer idGt,
-			Integer count) {
-		return tOeExamRecordMapper.findExamRecordNeedMark(examId,courseCode,idGt,count);
-	}
+    @Override
+    public List<OpenRecordNeedMarkBean> findExamRecordNeedMark(Long examId, String courseCode, Integer idGt,
+                                                               Integer count) {
+        return tOeExamRecordMapper.findExamRecordNeedMark(examId, courseCode, idGt, count);
+    }
 }

+ 13 - 2
themis-business/src/main/resources/mapper/TEExamReexamMapper.xml

@@ -29,6 +29,9 @@
                 <if test="examId != null and examId != ''">
                     and tees.exam_id = #{examId}
                 </if>
+                <if test="orgId != null and orgId != ''">
+                    and tee.org_id = #{orgId}
+                </if>
                 <if test="examActivityId != null and examActivityId != ''">
                     and tees.exam_activity_id = #{examActivityId}
                 </if>
@@ -85,6 +88,9 @@
              <if test="examId != null and examId != ''">
                  and teer.exam_id = #{examId}
              </if>
+             <if test="orgId != null and orgId != ''">
+                 and tee.org_id = #{orgId}
+             </if>
              <if test="examActivityId != null and examActivityId != ''">
                  and teer.exam_activity_id = #{examActivityId}
              </if>
@@ -141,6 +147,9 @@
             <if test="examId != null and examId != ''">
                 and teer.exam_id = #{examId}
             </if>
+            <if test="orgId != null and orgId != ''">
+                and tee.org_id = #{orgId}
+            </if>
             and tee.enable = 1
             and teea.enable = 1
             and tees.enable = 1
@@ -187,6 +196,9 @@
             <if test="examId != null and examId != ''">
                 and teer.exam_id = #{examId}
             </if>
+            <if test="orgId != null and orgId != ''">
+                and tee.org_id = #{orgId}
+            </if>
             <if test="examActivityId != null and examActivityId != ''">
                 and teer.exam_activity_id = #{examActivityId}
             </if>
@@ -222,8 +234,7 @@
         order by tees.room_code
     </select>
     
-    <select id="getExamReexamPage"
-		resultType="com.qmth.themis.business.bean.backend.ExamReexamListBean">
+    <select id="getExamReexamPage" resultType="com.qmth.themis.business.bean.backend.ExamReexamListBean">
 		SELECT
 		f.exam_student_id examStudentId,
 		t.exam_id examId,

+ 4 - 0
themis-business/src/main/resources/mapper/TIeInvigilateWarnInfoMapper.xml

@@ -6,6 +6,7 @@
         select count(1) as count
         from t_ie_invigilate_warn_info tiiwi
         left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
+        left join t_e_exam tee on tee.id = tees.exam_id
         inner join (select toer.id from t_oe_exam_record toer where EXISTS(select tees.id from t_e_exam_student tees where EXISTS (select distinct tbeiu.room_code from t_b_exam_invigilate_user tbeiu
         where
         <if test="userId != null and userId != ''">
@@ -16,6 +17,9 @@
             <if test="examId != null and examId != ''">
                 and tiiwi.exam_id = #{examId}
             </if>
+            <if test="orgId != null and orgId != ''">
+                and tee.org_id = #{orgId}
+            </if>
             <if test="examActivityId != null and examActivityId != ''">
                 and tiiwi.exam_activity_id = #{examActivityId}
             </if>

+ 18 - 0
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -126,6 +126,9 @@
 			<if test="examId != null and examId != ''">
 				and t.exam_id = #{examId}
 			</if>
+			<if test="orgId != null and orgId != ''">
+				and tee.org_id = #{orgId}
+			</if>
 			<if test="examActivityId != null and examActivityId != ''">
 				and t.exam_activity_id = #{examActivityId}
 			</if>
@@ -169,6 +172,9 @@
 			<if test="examId != null and examId != ''">
 				and t.exam_id = #{examId}
 			</if>
+			<if test="orgId != null and orgId != ''">
+				and tee.org_id = #{orgId}
+			</if>
 			<if test="examActivityId != null and examActivityId != ''">
 				and t.exam_activity_id = #{examActivityId}
 			</if>
@@ -352,6 +358,9 @@
 			<if test="examId != null and examId != ''">
 				and tiiwi.exam_id = #{examId}
 			</if>
+			<if test="orgId != null and orgId != ''">
+				and tee.org_id = #{orgId}
+			</if>
 			<if test="examActivityId != null and examActivityId != ''">
 				and tiiwi.exam_activity_id = #{examActivityId}
 			</if>
@@ -439,6 +448,9 @@
 			<if test="examId != null and examId != ''">
 				and tiiwi.exam_id = #{examId}
 			</if>
+			<if test="orgId != null and orgId != ''">
+				and tee.org_id = #{orgId}
+			</if>
 			<if test="examActivityId != null and examActivityId != ''">
 				and tiiwi.exam_activity_id = #{examActivityId}
 			</if>
@@ -515,6 +527,9 @@
 			<if test="examId != null and examId != ''">
 				and tees.exam_id = #{examId}
 			</if>
+			<if test="orgId != null and orgId != ''">
+				and tee.org_id = #{orgId}
+			</if>
 			<if test="examActivityId != null and examActivityId != ''">
 				and tees.exam_activity_id = #{examActivityId}
 			</if>
@@ -569,6 +584,9 @@
 			<if test="examId != null and examId != ''">
 				and tees.exam_id = #{examId}
 			</if>
+			<if test="orgId != null and orgId != ''">
+				and tee.org_id = #{orgId}
+			</if>
 			<if test="examActivityId != null and examActivityId != ''">
 				and tees.exam_activity_id = #{examActivityId}
 			</if>