Parcourir la source

新增重点标记状态

wangliang il y a 11 mois
Parent
commit
01e62fd5d1

+ 81 - 52
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateWarnInfoController.java

@@ -10,6 +10,7 @@ import com.qmth.themis.business.dto.AuthDto;
 import com.qmth.themis.business.dto.params.WarnInfoParams;
 import com.qmth.themis.business.dto.response.TIeWarningNotifyDto;
 import com.qmth.themis.business.entity.*;
+import com.qmth.themis.business.enums.MarkEnum;
 import com.qmth.themis.business.enums.RoleEnum;
 import com.qmth.themis.business.service.*;
 import com.qmth.themis.business.util.ServletUtil;
@@ -65,11 +66,11 @@ public class TIeInvigilateWarnInfoController {
 
     @ApiOperation(value = "预警提醒接口")
     @RequestMapping(value = "/notify", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "{\"count\":1}", response = Result.class)})
-//    @RedisLimitAnnotation(key = "warnNotify", period = 1, count = 1)
+    @ApiResponses({ @ApiResponse(code = 200, message = "{\"count\":1}", response = Result.class) })
+    //    @RedisLimitAnnotation(key = "warnNotify", period = 1, count = 1)
     public Result notify(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId,
-                         @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
-                         @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode) {
+            @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
+            @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
@@ -82,8 +83,7 @@ public class TIeInvigilateWarnInfoController {
                 teExamSummaryAllList.addAll(themisCacheService.getExamSummaryCache(examId, examActivityId, roomCode));
             } else {
                 QueryWrapper<TBExamInvigilateUser> tbExamInvigilateUserQueryWrapper = new QueryWrapper<TBExamInvigilateUser>();
-                tbExamInvigilateUserQueryWrapper.lambda()
-                        .eq(TBExamInvigilateUser::getOrgId, tbUser.getOrgId())
+                tbExamInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getOrgId, tbUser.getOrgId())
                         .eq(TBExamInvigilateUser::getUserId, userId);
                 if (Objects.nonNull(examId)) {
                     tbExamInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getExamId, examId);
@@ -91,19 +91,23 @@ public class TIeInvigilateWarnInfoController {
                 if (Objects.nonNull(roomCode)) {
                     tbExamInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getRoomCode, roomCode);
                 }
-                List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(tbExamInvigilateUserQueryWrapper);
+                List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(
+                        tbExamInvigilateUserQueryWrapper);
                 if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
                     Map<Long, List<TEExamActivity>> examActivityMap = new HashMap<>();
                     for (TBExamInvigilateUser t : tbExamInvigilateUserList) {
                         List<TEExamActivity> teExamActivityList = null;
                         if (CollectionUtils.isEmpty(examActivityMap.get(t.getExamId()))) {
-                            teExamActivityList = teExamActivityService.list(new QueryWrapper<TEExamActivity>().lambda().eq(TEExamActivity::getExamId, t.getExamId()));
+                            teExamActivityList = teExamActivityService.list(new QueryWrapper<TEExamActivity>().lambda()
+                                    .eq(TEExamActivity::getExamId, t.getExamId()));
                             examActivityMap.put(t.getExamId(), teExamActivityList);
                         } else {
                             teExamActivityList = examActivityMap.get(t.getExamId());
                         }
                         for (TEExamActivity teExamActivity : teExamActivityList) {
-                            teExamSummaryAllList.addAll(themisCacheService.getExamSummaryCache(t.getExamId(), teExamActivity.getId(), t.getRoomCode()));
+                            teExamSummaryAllList.addAll(
+                                    themisCacheService.getExamSummaryCache(t.getExamId(), teExamActivity.getId(),
+                                            t.getRoomCode()));
                         }
                     }
                 }
@@ -115,13 +119,16 @@ public class TIeInvigilateWarnInfoController {
             if (Objects.nonNull(examId) && Objects.nonNull(examActivityId) && Objects.nonNull(roomCode)) {
                 teExamSummaryAllList.addAll(themisCacheService.getExamSummaryCache(examId, examActivityId, roomCode));
             } else {
-                List<ExamInfoBean> examInfoBeanList = teExamStudentService.getExamInfo(tbUser.getOrgId(), examId, roomCode);
+                List<ExamInfoBean> examInfoBeanList = teExamStudentService.getExamInfo(tbUser.getOrgId(), examId,
+                        roomCode);
                 if (!CollectionUtils.isEmpty(examInfoBeanList)) {
                     for (ExamInfoBean t : examInfoBeanList) {
                         if (Objects.nonNull(t.getRoomCodes())) {
                             Set<String> roomCodeSet = new HashSet<>(Arrays.asList(t.getRoomCodes().split(", ")));
                             for (String s : roomCodeSet) {
-                                teExamSummaryAllList.addAll(themisCacheService.getExamSummaryCache(t.getExamId(), t.getExamActivityId(), s));
+                                teExamSummaryAllList.addAll(
+                                        themisCacheService.getExamSummaryCache(t.getExamId(), t.getExamActivityId(),
+                                                s));
                             }
                         }
                     }
@@ -134,27 +141,31 @@ public class TIeInvigilateWarnInfoController {
 
     @ApiOperation(value = "预警提醒列表接口")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "监考预警信息", response = InvigilateListWarningBean.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "监考预警信息", response = InvigilateListWarningBean.class) })
     public Result list(@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) Integer approveStatus,
-                       @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
-                       @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
-                       @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
-                       @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
-                       @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
-                       @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
-                       @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
-                       @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
-                       @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
-                       @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
+            @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) Integer approveStatus,
+            @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
+            @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
+            @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
+            @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
+            @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
+            @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
+            @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
+            @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount,
+            @ApiParam(value = "标记状态,MARK:标记,UN_MARK:撤销") @RequestParam(required = false) MarkEnum markStatus,
+            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
+            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            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());
             }
@@ -163,14 +174,19 @@ public class TIeInvigilateWarnInfoController {
             roomCodeList.clear();
             roomCodeList.add(roomCode);
         }
-        return ResultUtil.ok(tOeExamRecordService.invigilatePageWarningList(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCodeList, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId()));
+        return ResultUtil.ok(
+                tOeExamRecordService.invigilatePageWarningList(new Page<>(pageNumber, pageSize), examId, examActivityId,
+                        roomCodeList, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount,
+                        minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, markStatus,
+                        tbUser.getOrgId()));
     }
 
     @ApiOperation(value = "预警消息接口")
     @RequestMapping(value = "/message", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "预警通知信息", response = TIeWarningNotifyDto.class)})
-//    @RedisLimitAnnotation(key = "warnMessage", period = 1, count = 1)
-    public Result warningMessage(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId) {
+    @ApiResponses({ @ApiResponse(code = 200, message = "预警通知信息", response = TIeWarningNotifyDto.class) })
+    //    @RedisLimitAnnotation(key = "warnMessage", period = 1, count = 1)
+    public Result warningMessage(
+            @ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
@@ -183,7 +199,7 @@ public class TIeInvigilateWarnInfoController {
 
     @ApiOperation(value = "预警修改阅读状态接口")
     @RequestMapping(value = "/save/status", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class) })
     @Transactional
     public Result saveWarnStatus(@Validated @RequestBody WarnInfoParams warnInfoParams, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
@@ -193,16 +209,20 @@ public class TIeInvigilateWarnInfoController {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
-            if (CollectionUtils.isEmpty(warnInfoParams.getWarningIds()) && Objects.isNull(warnInfoParams.getExamRecordId())) {
+            if (CollectionUtils.isEmpty(warnInfoParams.getWarningIds()) && Objects.isNull(
+                    warnInfoParams.getExamRecordId())) {
                 throw new BusinessException("预警id数组或考试记录id不能同时为空");
             }
             UpdateWrapper<TIeInvigilateWarnInfo> tIeInvigilateWarnInfoUpdateWrapper = new UpdateWrapper<>();
-            tIeInvigilateWarnInfoUpdateWrapper.lambda().set(TIeInvigilateWarnInfo::getApproveStatus, warnInfoParams.getApproveStatus());
+            tIeInvigilateWarnInfoUpdateWrapper.lambda()
+                    .set(TIeInvigilateWarnInfo::getApproveStatus, warnInfoParams.getApproveStatus());
             if (!CollectionUtils.isEmpty(warnInfoParams.getWarningIds())) {
-                List<Long> warningTranIds = warnInfoParams.getWarningIds().stream().map(x -> Long.parseLong(x)).collect(Collectors.toList());
+                List<Long> warningTranIds = warnInfoParams.getWarningIds().stream().map(x -> Long.parseLong(x))
+                        .collect(Collectors.toList());
                 tIeInvigilateWarnInfoUpdateWrapper.lambda().in(TIeInvigilateWarnInfo::getId, warningTranIds);
             } else if (Objects.nonNull(warnInfoParams.getExamRecordId())) {
-                tIeInvigilateWarnInfoUpdateWrapper.lambda().eq(TIeInvigilateWarnInfo::getExamRecordId, warnInfoParams.getExamRecordId());
+                tIeInvigilateWarnInfoUpdateWrapper.lambda()
+                        .eq(TIeInvigilateWarnInfo::getExamRecordId, warnInfoParams.getExamRecordId());
             }
             tIeInvigilateWarnInfoService.update(tIeInvigilateWarnInfoUpdateWrapper);
         }
@@ -211,25 +231,29 @@ public class TIeInvigilateWarnInfoController {
 
     @ApiOperation(value = "预警提醒清除未阅列表接口")
     @RequestMapping(value = "/approveStatus/list/update", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "监考预警信息", response = InvigilateListWarningBean.class)})
-    public Result approveStatusListUpdate(@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) Integer approveStatus,
-                                          @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
-                                          @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
-                                          @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
-                                          @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
-                                          @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
-                                          @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
-                                          @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
-                                          @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount) {
+    @ApiResponses({ @ApiResponse(code = 200, message = "监考预警信息", response = InvigilateListWarningBean.class) })
+    public Result approveStatusListUpdate(
+            @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) Integer approveStatus,
+            @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
+            @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
+            @ApiParam(value = "陌生人脸min", required = false) @RequestParam(required = false) Integer minMultipleFaceCount,
+            @ApiParam(value = "陌生人脸max", required = false) @RequestParam(required = false) Integer maxMultipleFaceCount,
+            @ApiParam(value = "异常处理min", required = false) @RequestParam(required = false) Integer minExceptionCount,
+            @ApiParam(value = "异常处理max", required = false) @RequestParam(required = false) Integer maxExceptionCount,
+            @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
+            @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         List<String> roomCodeList = new ArrayList<>();
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
-            List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId()).eq(TBExamInvigilateUser::getExamId, examId));
+            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());
             }
@@ -240,7 +264,9 @@ public class TIeInvigilateWarnInfoController {
         }
         //2020/11/24新增管理员不清除预警状态
         if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
-            List<TOeExamRecord> tOeExamRecordList = tOeExamRecordService.findExamRecordByWarning(examId, examActivityId, roomCodeList, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId());
+            List<TOeExamRecord> tOeExamRecordList = tOeExamRecordService.findExamRecordByWarning(examId, examActivityId,
+                    roomCodeList, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount,
+                    maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId());
             for (TOeExamRecord t : tOeExamRecordList) {
                 tOeExamRecordService.updateWarningUnreadCache(t.getId(), 0, true);
             }
@@ -255,7 +281,8 @@ public class TIeInvigilateWarnInfoController {
                 }
                 List<TEExamStudent> teExamStudentList = teExamStudentService.list(teExamStudentQueryWrapper);
                 if (!CollectionUtils.isEmpty(teExamStudentList)) {
-                    Set<String> roomCodeSet = teExamStudentList.stream().map(s -> s.getRoomCode()).collect(Collectors.toSet());
+                    Set<String> roomCodeSet = teExamStudentList.stream().map(s -> s.getRoomCode())
+                            .collect(Collectors.toSet());
                     for (String s : roomCodeSet) {
                         teExamSummaryService.updateExamSummaryWarningUnread(examId, examActivityId, s);
                         themisCacheService.updateExamSummaryCache(examId, examActivityId, s);
@@ -264,7 +291,9 @@ public class TIeInvigilateWarnInfoController {
                     themisCacheService.updateExamSummaryCache(examId, examActivityId);
                 }
             }
-            tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCodeList, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, tbUser.getOrgId());
+            tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCodeList, approveStatus, name,
+                    identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
+                    minWarningCount, maxWarningCount, tbUser.getOrgId());
         }
         return ResultUtil.ok(true);
     }

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

@@ -42,6 +42,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param screenMonitorStatus
      * @param mobileFirstMonitorStatus
      * @param mobileSecondMonitorStatus
+     * @param markStatus
      * @param orgId
      * @return
      */
@@ -116,6 +117,7 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
      * @param maxExceptionCount
      * @param minWarningCount
      * @param maxWarningCount
+     * @param markStatus
      * @param orgId
      * @return
      */
@@ -126,7 +128,8 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
             @Param("maxMultipleFaceCount") Integer maxMultipleFaceCount,
             @Param("minExceptionCount") Integer minExceptionCount,
             @Param("maxExceptionCount") Integer maxExceptionCount, @Param("minWarningCount") Integer minWarningCount,
-            @Param("maxWarningCount") Integer maxWarningCount, @Param("orgId") Long orgId);
+            @Param("maxWarningCount") Integer maxWarningCount, @Param("markStatus") String markStatus,
+            @Param("orgId") Long orgId);
 
     /**
      * 预警提醒清除未阅列表

+ 51 - 132
themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java

@@ -24,14 +24,15 @@ import java.util.Set;
  */
 public interface TOeExamRecordService extends IService<TOeExamRecord> {
 
-    TOeExamRecord saveByPrepare(Long examId, Long examActivityId, Long examStudentId, Long paperId, Integer serialNumber, Long studentId, Integer mobilePhotoUpload);
+    TOeExamRecord saveByPrepare(Long examId, Long examActivityId, Long examStudentId, Long paperId,
+            Integer serialNumber, Long studentId, Integer mobilePhotoUpload);
 
     /**
      * 计算客观分
      *
      * @param param
      */
-//    void calculateObjectiveScore(Map<String, Object> param);
+    //    void calculateObjectiveScore(Map<String, Object> param);
 
     /**
      * 考试记录数据持久化
@@ -41,10 +42,10 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
     public void saveDataByCache(Long recordId);
 
     void saveFaceVerify(ExamTypeEnum type, Long recordId, Long entryAuthenticationId,
-                        VerifyExceptionEnum entryAuthenticationResult);
+            VerifyExceptionEnum entryAuthenticationResult);
 
     void saveLivenessVerify(LivenessTypeEnum type, Long recordId, Long entryAuthenticationId,
-                            VerifyExceptionEnum entryAuthenticationResult);
+            VerifyExceptionEnum entryAuthenticationResult);
 
     /**
      * 保存考试记录数据
@@ -106,22 +107,11 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param orgId
      * @return
      */
-    public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId,
-                                                                  Long examActivityId,
-                                                                  List<String> roomCodeList,
-                                                                  Integer paperDownload,
-                                                                  String status,
-                                                                  String name,
-                                                                  String identity,
-                                                                  Integer minWarningCount,
-                                                                  Integer maxWarningCount,
-                                                                  String clientWebsocketStatus,
-                                                                  String cameraMonitorStatus,
-                                                                  String screenMonitorStatus,
-                                                                  String mobileFirstMonitorStatus,
-                                                                  String mobileSecondMonitorStatus,
-                                                                  MarkEnum markStatus,
-                                                                  Long orgId);
+    public IPage<InvigilateListVideoBean> invigilatePageListVideo(IPage<Map> iPage, Long examId, Long examActivityId,
+            List<String> roomCodeList, Integer paperDownload, String status, String name, String identity,
+            Integer minWarningCount, Integer maxWarningCount, String clientWebsocketStatus, String cameraMonitorStatus,
+            String screenMonitorStatus, String mobileFirstMonitorStatus, String mobileSecondMonitorStatus,
+            MarkEnum markStatus, Long orgId);
 
     /**
      * 实时监控台视频随机列表
@@ -132,7 +122,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param orgId
      * @return
      */
-    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, List<String> roomCodeList, Integer randomNum, Long orgId);
+    public List<InvigilateListVideoBean> invigilatePageListVideoRandom(Long examId, List<String> roomCodeList,
+            Integer randomNum, Long orgId);
 
     /**
      * 查询在线巡考列表
@@ -154,20 +145,10 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param orgId
      * @return
      */
-    public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId,
-                                                                    Long examActivityId,
-                                                                    List<String> roomCodeList,
-                                                                    String status,
-                                                                    String name,
-                                                                    String identity,
-                                                                    Integer minMultipleFaceCount,
-                                                                    Integer maxMultipleFaceCount,
-                                                                    Integer minExceptionCount,
-                                                                    Integer maxExceptionCount,
-                                                                    Integer minWarningCount,
-                                                                    Integer maxWarningCount,
-                                                                    String clientWebsocketStatus,
-                                                                    Long orgId);
+    public IPage<InvigilateListPatrolBean> invigilatePagePatrolList(IPage<Map> iPage, Long examId, Long examActivityId,
+            List<String> roomCodeList, String status, String name, String identity, Integer minMultipleFaceCount,
+            Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount,
+            Integer maxWarningCount, String clientWebsocketStatus, Long orgId);
 
     /**
      * 预警提醒列表
@@ -185,22 +166,15 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param maxExceptionCount
      * @param minWarningCount
      * @param maxWarningCount
+     * @param markStatus
      * @param orgId
      * @return
      */
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId,
-                                                                      Long examActivityId,
-                                                                      List<String> roomCodeList,
-                                                                      Integer approveStatus,
-                                                                      String name,
-                                                                      String identity,
-                                                                      Integer minMultipleFaceCount,
-                                                                      Integer maxMultipleFaceCount,
-                                                                      Integer minExceptionCount,
-                                                                      Integer maxExceptionCount,
-                                                                      Integer minWarningCount,
-                                                                      Integer maxWarningCount,
-                                                                      Long orgId);
+            Long examActivityId, List<String> roomCodeList, Integer approveStatus, String name, String identity,
+            Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount,
+            Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, MarkEnum markStatus,
+            Long orgId);
 
     /**
      * 预警提醒清除未阅列表
@@ -220,19 +194,10 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param orgId
      * @return
      */
-    public Integer approveStatusListUpdate(Long examId,
-                                           Long examActivityId,
-                                           List<String> roomCodeList,
-                                           Integer approveStatus,
-                                           String name,
-                                           String identity,
-                                           Integer minMultipleFaceCount,
-                                           Integer maxMultipleFaceCount,
-                                           Integer minExceptionCount,
-                                           Integer maxExceptionCount,
-                                           Integer minWarningCount,
-                                           Integer maxWarningCount,
-                                           Long orgId);
+    public Integer approveStatusListUpdate(Long examId, Long examActivityId, List<String> roomCodeList,
+            Integer approveStatus, String name, String identity, Integer minMultipleFaceCount,
+            Integer maxMultipleFaceCount, Integer minExceptionCount, Integer maxExceptionCount, Integer minWarningCount,
+            Integer maxWarningCount, Long orgId);
 
     /**
      * 进度查询列表
@@ -250,14 +215,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @return
      */
     public IPage<InvigilateListProgressBean> invigilatePageProgressList(IPage<Map> iPage, Long examId,
-                                                                        Long examActivityId,
-                                                                        List<String> roomCodeList,
-                                                                        String courseCode,
-                                                                        String name,
-                                                                        String identity,
-                                                                        Integer status,
-                                                                        Long orgId,
-                                                                        Integer breachStatus);
+            Long examActivityId, List<String> roomCodeList, String courseCode, String name, String identity,
+            Integer status, Long orgId, Integer breachStatus);
 
     /**
      * 进度查询列表导出
@@ -273,15 +232,9 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param breachStatus
      * @return
      */
-    public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId,
-                                                                                  Long examActivityId,
-                                                                                  List<String> roomCodeList,
-                                                                                  String courseCode,
-                                                                                  String name,
-                                                                                  String identity,
-                                                                                  Integer status,
-                                                                                  Long orgId,
-                                                                                  Integer breachStatus);
+    public List<InvigilateListProgressExcelBean> invigilatePageProgressListExport(Long examId, Long examActivityId,
+            List<String> roomCodeList, String courseCode, String name, String identity, Integer status, Long orgId,
+            Integer breachStatus);
 
     /**
      * 监考明细管理列表
@@ -306,21 +259,10 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @return
      */
     public IPage<InvigilateListHistoryBean> invigilatePageListHistory(IPage<Map> iPage, Long examId,
-                                                                      Long examActivityId,
-                                                                      List<String> roomCodeList,
-                                                                      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 orgId);
+            Long examActivityId, List<String> roomCodeList, 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 orgId);
 
     /**
      * 监考明细管理列表导出
@@ -343,23 +285,11 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param orgId
      * @return
      */
-    public List<InvigilateListHistoryBean> invigilatePageListHistoryExport(Long examId,
-                                                                           Long examActivityId,
-                                                                           List<String> roomCodeList,
-                                                                           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 orgId);
-
+    public List<InvigilateListHistoryBean> invigilatePageListHistoryExport(Long examId, Long examActivityId,
+            List<String> roomCodeList, 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 orgId);
 
     /**
      * 重新算分
@@ -462,7 +392,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param monitorStatus
      * @return
      */
-    List<Integer> findByViewAdmin(Long orgId, Long examId, Long examActivityId, String roomCode, String courseCode, InvigilateMonitorStatusEnum monitorStatus);
+    List<Integer> findByViewAdmin(Long orgId, Long examId, Long examActivityId, String roomCode, String courseCode,
+            InvigilateMonitorStatusEnum monitorStatus);
 
     /**
      * 考试明细查询接口
@@ -477,14 +408,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param identity
      * @return
      */
-    public IPage<ExamRecordDetailBean> examRecordDetailQuery(IPage<Map> iPage,
-                                                             Long examId,
-                                                             Long examActivityId,
-                                                             String courseCode,
-                                                             String roomCode,
-                                                             String finishType,
-                                                             String name,
-                                                             String identity);
+    public IPage<ExamRecordDetailBean> examRecordDetailQuery(IPage<Map> iPage, Long examId, Long examActivityId,
+            String courseCode, String roomCode, String finishType, String name, String identity);
 
     /**
      * 考试明细查询接口
@@ -539,7 +464,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param examStudentBreachPush
      * @return
      */
-    public List<TOeExamRecord> findExamRecordNeedMarkAll(Long examId, Set<Long> examPaperIdSet, Boolean many, Boolean examStudentBreachPush);
+    public List<TOeExamRecord> findExamRecordNeedMarkAll(Long examId, Set<Long> examPaperIdSet, Boolean many,
+            Boolean examStudentBreachPush);
 
     /**
      * 修正作答记录缓存到数据库
@@ -611,7 +537,8 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param examRecordStatusEnum
      * @return
      */
-    TOeExamRecord getExamRecordForDb(Long examId, Long activityId, Long examStudentId, ExamRecordStatusEnum examRecordStatusEnum);
+    TOeExamRecord getExamRecordForDb(Long examId, Long activityId, Long examStudentId,
+            ExamRecordStatusEnum examRecordStatusEnum);
 
     /**
      * 根据id更新预警数量
@@ -676,18 +603,10 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      * @param orgId
      * @return
      */
-    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);
+    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);
 
     /**
      * 查找完成人数

+ 5 - 2
themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java

@@ -823,6 +823,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param screenMonitorStatus
      * @param mobileFirstMonitorStatus
      * @param mobileSecondMonitorStatus
+     * @param markStatus
      * @param orgId
      * @return
      */
@@ -901,6 +902,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
      * @param maxExceptionCount
      * @param minWarningCount
      * @param maxWarningCount
+     * @param markStatus
      * @param orgId
      * @return
      */
@@ -909,10 +911,11 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
     public IPage<InvigilateListWarningBean> invigilatePageWarningList(IPage<Map> iPage, Long examId,
             Long examActivityId, List<String> roomCodeList, Integer approveStatus, String name, String identity,
             Integer minMultipleFaceCount, Integer maxMultipleFaceCount, Integer minExceptionCount,
-            Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, Long orgId) {
+            Integer maxExceptionCount, Integer minWarningCount, Integer maxWarningCount, MarkEnum markStatus,
+            Long orgId) {
         return tOeExamRecordMapper.invigilatePageWarningList(iPage, examId, examActivityId, roomCodeList, approveStatus,
                 name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount,
-                minWarningCount, maxWarningCount, orgId);
+                minWarningCount, maxWarningCount, Objects.nonNull(markStatus) ? markStatus.name() : null, orgId);
     }
 
     /**

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

@@ -296,6 +296,9 @@
         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_oe_exam_record toer on toer.id = tiiwi.exam_record_id
+        <if test="markStatus != null and markStatus != '' and markStatus == 'MARK'">
+            join t_e_exam_mark_log teeml on teeml.exam_record_id = toer.id and teeml.status = #{markStatus}
+        </if>
         <where> 1 = 1
             <if test="orgId != null and orgId != ''">
                 and tee.org_id = #{orgId}