wangliang 1 год назад
Родитель
Сommit
f74e416b77

+ 1 - 0
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateController.java

@@ -370,6 +370,7 @@ public class TIeInvigilateController {
         Collections.sort(teExamStudentLogList);
         invigilateListDetailBean.setExamStudentLogList(teExamStudentLogList);
         //预警、异常、人脸
+        //todo 这里需要修改预警
         List<Integer> list = tIeInvigilateWarnInfoService.findWarnAndExceptionInfo(examRecordId, VerifyExceptionEnum.FACE_COUNT_ERROR, WarningLevelEnum.D8);
         if (Objects.nonNull(list) && list.size() > 0) {
             invigilateListDetailBean.setWarningCount(list.get(0));

+ 2 - 18
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateWarnInfoController.java

@@ -147,32 +147,16 @@ 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 (org.apache.commons.collections.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());
-            if (!CollectionUtils.isEmpty(warnInfoParams.getWarningIds())) {
+            if (!org.apache.commons.collections.CollectionUtils.isEmpty(warnInfoParams.getWarningIds())) {
                 List<Long> warningTranIds = warnInfoParams.getWarningIds().stream().map(x -> Long.parseLong(x)).collect(Collectors.toList());
-                List<TIeInvigilateWarnInfo> tIeInvigilateWarnInfoList = tIeInvigilateWarnInfoService.listByIds(warningTranIds);
-                if (!CollectionUtils.isEmpty(tIeInvigilateWarnInfoList)) {
-                    Map<Long, Integer> map = new HashMap<>();
-                    for (TIeInvigilateWarnInfo t : tIeInvigilateWarnInfoList) {
-                        if (map.containsKey(t.getExamRecordId())) {
-                            Integer number = map.get(t.getExamRecordId());
-                            map.put(t.getExamRecordId(), number + 1);
-                        } else {
-                            map.put(t.getExamRecordId(), 1);
-                        }
-                    }
-                    map.forEach((k, v) -> {
-                        tOeExamRecordService.updateWarningUnreadCache(k, v);
-                    });
-                }
                 tIeInvigilateWarnInfoUpdateWrapper.lambda().in(TIeInvigilateWarnInfo::getId, warningTranIds);
             } else if (Objects.nonNull(warnInfoParams.getExamRecordId())) {
                 tIeInvigilateWarnInfoUpdateWrapper.lambda().eq(TIeInvigilateWarnInfo::getExamRecordId, warnInfoParams.getExamRecordId());
-                tOeExamRecordService.updateWarningUnreadCache(warnInfoParams.getExamRecordId(), 0);
             }
             tIeInvigilateWarnInfoService.update(tIeInvigilateWarnInfoUpdateWrapper);
         }

+ 2 - 0
themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java

@@ -425,6 +425,7 @@ public class TIeReportServiceImpl implements TIeReportService {
             ret = new ExaminationMonitorCountBean(tbOrg.getId(), tbOrg.getName(), tbOrg.getCode());
         }
         List<Long> countList = tOeExamRecordService.findByOrgId(tbUser.getOrgId());
+        //todo 这里需要修改预警
         if (Objects.nonNull(countList) && countList.size() > 0) {
             // 在线人数
             ret.setOnlineCount(countList.get(0));
@@ -436,6 +437,7 @@ public class TIeReportServiceImpl implements TIeReportService {
 //         通讯故障人数
 //        ret.setExceptionCount(tOeExamRecordMapper.getExceptionCount(tbUser.getOrgId()));
         // 预警人数
+        //todo 这里需要修改预警
         ret.setWarnCount(tOeExamRecordMapper.getWarnCount(tbUser.getOrgId()));
 //         机构在考人数
 //        ret.setOrgExamingCount(tOeExamRecordMapper.getOrgExamingCount(tbUser.getOrgId()));