|
@@ -1,6 +1,7 @@
|
|
package com.qmth.themis.business.service.impl;
|
|
package com.qmth.themis.business.service.impl;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.qmth.themis.business.bean.admin.*;
|
|
import com.qmth.themis.business.bean.admin.*;
|
|
@@ -9,10 +10,7 @@ import com.qmth.themis.business.bean.result.TimeScaleDataResult;
|
|
import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.dao.*;
|
|
import com.qmth.themis.business.dao.*;
|
|
-import com.qmth.themis.business.entity.SysConfig;
|
|
|
|
-import com.qmth.themis.business.entity.TBOrg;
|
|
|
|
-import com.qmth.themis.business.entity.TBUser;
|
|
|
|
-import com.qmth.themis.business.entity.TEExamActivity;
|
|
|
|
|
|
+import com.qmth.themis.business.entity.*;
|
|
import com.qmth.themis.business.enums.InvigilateMonitorStatusEnum;
|
|
import com.qmth.themis.business.enums.InvigilateMonitorStatusEnum;
|
|
import com.qmth.themis.business.service.*;
|
|
import com.qmth.themis.business.service.*;
|
|
import com.qmth.themis.business.util.ServletUtil;
|
|
import com.qmth.themis.business.util.ServletUtil;
|
|
@@ -74,6 +72,9 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
@Resource
|
|
@Resource
|
|
ThemisCacheService themisCacheService;
|
|
ThemisCacheService themisCacheService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ TEExamService teExamService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 考试概览
|
|
* 考试概览
|
|
*
|
|
*
|
|
@@ -424,21 +425,38 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
TBOrg tbOrg = themisCacheService.addOrgCache(tbUser.getOrgId());
|
|
TBOrg tbOrg = themisCacheService.addOrgCache(tbUser.getOrgId());
|
|
ret = new ExaminationMonitorCountBean(tbOrg.getId(), tbOrg.getName(), tbOrg.getCode());
|
|
ret = new ExaminationMonitorCountBean(tbOrg.getId(), tbOrg.getName(), tbOrg.getCode());
|
|
}
|
|
}
|
|
- List<Long> countList = tOeExamRecordService.findByOrgId(tbUser.getOrgId());
|
|
|
|
- //todo 这里需要修改预警
|
|
|
|
- if (Objects.nonNull(countList) && countList.size() > 0) {
|
|
|
|
|
|
+ List<TEExam> teExamList = teExamService.list(new QueryWrapper<TEExam>().lambda().eq(TEExam::getOrgId, tbUser.getOrgId()));
|
|
|
|
+ if (!CollectionUtils.isEmpty(teExamList)) {
|
|
|
|
+ List<TEExamSummary> teExamSummaryAllList = new ArrayList<>();
|
|
|
|
+ for (TEExam t : teExamList) {
|
|
|
|
+ List<ExamListBean> examListBeanList = themisCacheService.getTodayExamListCache(t.getId().toString());
|
|
|
|
+ if (!CollectionUtils.isEmpty(examListBeanList)) {
|
|
|
|
+ for (ExamListBean e : examListBeanList) {
|
|
|
|
+ Set<String> roomCodeSet = new HashSet<>(Arrays.asList(e.getRoomCode().split(", ")));
|
|
|
|
+ for (String s : roomCodeSet) {
|
|
|
|
+ teExamSummaryAllList.addAll(themisCacheService.getExamSummaryCache(t.getId(), e.getExamActivityId(), s));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Integer onlineCount = 0, waitingCount = 0, examingCount = 0, warnCount = 0;
|
|
|
|
+ for (TEExamSummary t : teExamSummaryAllList) {
|
|
|
|
+ onlineCount = onlineCount + t.getOnlineCount();
|
|
|
|
+ waitingCount = waitingCount + t.getPrepareCount();
|
|
|
|
+ examingCount = examingCount + t.getExamCount();
|
|
|
|
+ warnCount = warnCount + t.getWarningCount();
|
|
|
|
+ }
|
|
// 在线人数
|
|
// 在线人数
|
|
- ret.setOnlineCount(countList.get(0));
|
|
|
|
|
|
+ ret.setOnlineCount(Long.parseLong(onlineCount.toString()));
|
|
// 待考人数
|
|
// 待考人数
|
|
- ret.setWaitingCount(countList.get(1));
|
|
|
|
|
|
+ ret.setWaitingCount(Long.parseLong(waitingCount.toString()));
|
|
// 考试人数
|
|
// 考试人数
|
|
- ret.setExamingCount(countList.get(2));
|
|
|
|
|
|
+ ret.setExamingCount(Long.parseLong(examingCount.toString()));
|
|
|
|
+ // 预警人数
|
|
|
|
+ ret.setWarnCount(Long.parseLong(warnCount.toString()));
|
|
}
|
|
}
|
|
// 通讯故障人数
|
|
// 通讯故障人数
|
|
// ret.setExceptionCount(tOeExamRecordMapper.getExceptionCount(tbUser.getOrgId()));
|
|
// ret.setExceptionCount(tOeExamRecordMapper.getExceptionCount(tbUser.getOrgId()));
|
|
- // 预警人数
|
|
|
|
- //todo 这里需要修改预警
|
|
|
|
- ret.setWarnCount(tOeExamRecordMapper.getWarnCount(tbUser.getOrgId()));
|
|
|
|
// 机构在考人数
|
|
// 机构在考人数
|
|
// ret.setOrgExamingCount(tOeExamRecordMapper.getOrgExamingCount(tbUser.getOrgId()));
|
|
// ret.setOrgExamingCount(tOeExamRecordMapper.getOrgExamingCount(tbUser.getOrgId()));
|
|
//违纪人数
|
|
//违纪人数
|