|
@@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
public class TIeReportServiceImpl implements TIeReportService {
|
|
public class TIeReportServiceImpl implements TIeReportService {
|
|
|
|
+
|
|
private final static Logger log = LoggerFactory.getLogger(TIeReportServiceImpl.class);
|
|
private final static Logger log = LoggerFactory.getLogger(TIeReportServiceImpl.class);
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
@@ -85,8 +86,8 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public Map<String, Object> examView(Long orgId, Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
|
- String name, String identity) {
|
|
|
|
|
|
+ public Map<String, Object> examView(Long orgId, Long examId, Long examActivityId, String roomCode,
|
|
|
|
+ String courseCode, String name, String identity) {
|
|
// 缺考人数
|
|
// 缺考人数
|
|
Integer examTotal = 0, actualExamTotal = 0, absentNum = 0;
|
|
Integer examTotal = 0, actualExamTotal = 0, absentNum = 0;
|
|
ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
@@ -104,7 +105,8 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
actualExamTotal = examTotal - absentNum;
|
|
actualExamTotal = examTotal - absentNum;
|
|
}
|
|
}
|
|
// 每日已考人数
|
|
// 每日已考人数
|
|
- List<Map<String, Object>> doneCountByDay = tOeExamRecordMapper.getDoneCountByDay(orgId, examId, examActivityId, roomCode, courseCode);
|
|
|
|
|
|
+ List<Map<String, Object>> doneCountByDay = tOeExamRecordMapper.getDoneCountByDay(orgId, examId, examActivityId,
|
|
|
|
+ roomCode, courseCode);
|
|
|
|
|
|
Map<String, Object> ret = new HashMap<String, Object>();
|
|
Map<String, Object> ret = new HashMap<String, Object>();
|
|
ret.put("monitorStatus", exam.getMonitorStatus());
|
|
ret.put("monitorStatus", exam.getMonitorStatus());
|
|
@@ -131,9 +133,10 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamViewCountListBean> examViewCount(Long orgId, Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
|
- String identity, int pageNumber, int pageSize) {
|
|
|
|
- return examStudentMapper.getTotalCountInfo(new Page<>(pageNumber, pageSize), orgId, examId, examActivityId, roomCode, courseCode);
|
|
|
|
|
|
+ public IPage<ExamViewCountListBean> examViewCount(Long orgId, Long examId, Long examActivityId, String roomCode,
|
|
|
|
+ String courseCode, String name, String identity, int pageNumber, int pageSize) {
|
|
|
|
+ return examStudentMapper.getTotalCountInfo(new Page<>(pageNumber, pageSize), orgId, examId, examActivityId,
|
|
|
|
+ roomCode, courseCode);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -149,7 +152,8 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<ExamViewCountListBean> examViewCountExport(Long orgId, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity) {
|
|
|
|
|
|
+ public List<ExamViewCountListBean> examViewCountExport(Long orgId, Long examId, Long examActivityId,
|
|
|
|
+ String roomCode, String courseCode, String name, String identity) {
|
|
return examStudentMapper.getTotalCountInfoExport(orgId, examId, examActivityId, roomCode, courseCode);
|
|
return examStudentMapper.getTotalCountInfoExport(orgId, examId, examActivityId, roomCode, courseCode);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -168,8 +172,8 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamDeficiencyListBean> examDeficiencyList(Long orgId, Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
|
- String name, String identity, int pageNumber, int pageSize) {
|
|
|
|
|
|
+ public IPage<ExamDeficiencyListBean> examDeficiencyList(Long orgId, Long examId, Long examActivityId,
|
|
|
|
+ String roomCode, String courseCode, String name, String identity, int pageNumber, int pageSize) {
|
|
List<TEExamActivity> acs = examActivityService.findByExamIdAndOrgId(examId, orgId);
|
|
List<TEExamActivity> acs = examActivityService.findByExamIdAndOrgId(examId, orgId);
|
|
List<Long> absentActivityIds = new ArrayList<>();
|
|
List<Long> absentActivityIds = new ArrayList<>();
|
|
for (TEExamActivity ac : acs) {
|
|
for (TEExamActivity ac : acs) {
|
|
@@ -198,7 +202,8 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<ExamDeficiencyListBean> examDeficiencyListExport(Long orgId, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity) {
|
|
|
|
|
|
+ public List<ExamDeficiencyListBean> examDeficiencyListExport(Long orgId, Long examId, Long examActivityId,
|
|
|
|
+ String roomCode, String courseCode, String name, String identity) {
|
|
List<TEExamActivity> acs = examActivityService.findByExamIdAndOrgId(examId, orgId);
|
|
List<TEExamActivity> acs = examActivityService.findByExamIdAndOrgId(examId, orgId);
|
|
List<Long> absentActivityIds = new ArrayList<>();
|
|
List<Long> absentActivityIds = new ArrayList<>();
|
|
for (TEExamActivity ac : acs) {
|
|
for (TEExamActivity ac : acs) {
|
|
@@ -207,7 +212,11 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
absentActivityIds.add(ac.getId());
|
|
absentActivityIds.add(ac.getId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return examStudentMapper.getExamDeficiencyPageExport(examId, examActivityId, roomCode, courseCode, name, identity, absentActivityIds);
|
|
|
|
|
|
+ if (absentActivityIds.size() == 0) {
|
|
|
|
+ return new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ return examStudentMapper.getExamDeficiencyPageExport(examId, examActivityId, roomCode, courseCode, name,
|
|
|
|
+ identity, absentActivityIds);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -224,11 +233,11 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamExceptionListBean> examExceptionList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
|
- String identity, int pageNumber, int pageSize) {
|
|
|
|
|
|
+ public IPage<ExamExceptionListBean> examExceptionList(Long examId, Long examActivityId, String roomCode,
|
|
|
|
+ String courseCode, String name, String identity, int pageNumber, int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- return invigilateExceptionInfoMapper.getExamExceptionPage(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId,
|
|
|
|
- examActivityId, roomCode, courseCode, name, identity);
|
|
|
|
|
|
+ return invigilateExceptionInfoMapper.getExamExceptionPage(new Page<>(pageNumber, pageSize), tbUser.getOrgId(),
|
|
|
|
+ examId, examActivityId, roomCode, courseCode, name, identity);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -240,8 +249,10 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamExceptionDetailListBean> examExceptionDetailList(Long examStudentId, int pageNumber, int pageSize) {
|
|
|
|
- return invigilateExceptionInfoMapper.getExamExceptionDetailList(new Page<>(pageNumber, pageSize), examStudentId);
|
|
|
|
|
|
+ public IPage<ExamExceptionDetailListBean> examExceptionDetailList(Long examStudentId, int pageNumber,
|
|
|
|
+ int pageSize) {
|
|
|
|
+ return invigilateExceptionInfoMapper.getExamExceptionDetailList(new Page<>(pageNumber, pageSize),
|
|
|
|
+ examStudentId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -258,11 +269,11 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamReexamListBean> examReexamList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
|
- String identity, int pageNumber, int pageSize) {
|
|
|
|
|
|
+ public IPage<ExamReexamListBean> examReexamList(Long examId, Long examActivityId, String roomCode,
|
|
|
|
+ String courseCode, String name, String identity, int pageNumber, int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- return examReexamMapper.getExamReexamPage(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId, examActivityId, roomCode,
|
|
|
|
- courseCode, name, identity);
|
|
|
|
|
|
+ return examReexamMapper.getExamReexamPage(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId,
|
|
|
|
+ examActivityId, roomCode, courseCode, name, identity);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -279,11 +290,11 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamBreachListBean> examBreachList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
|
- String identity, int pageNumber, int pageSize) {
|
|
|
|
|
|
+ public IPage<ExamBreachListBean> examBreachList(Long examId, Long examActivityId, String roomCode,
|
|
|
|
+ String courseCode, String name, String identity, int pageNumber, int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- return examBreachLogMapper.getExamBreachPage(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId, examActivityId, roomCode,
|
|
|
|
- courseCode, name, identity);
|
|
|
|
|
|
+ return examBreachLogMapper.getExamBreachPage(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId,
|
|
|
|
+ examActivityId, roomCode, courseCode, name, identity);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -298,9 +309,11 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<ExamBreachListExportBean> examBreachListExport(Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity) {
|
|
|
|
|
|
+ public List<ExamBreachListExportBean> examBreachListExport(Long examId, Long examActivityId, String roomCode,
|
|
|
|
+ String courseCode, String name, String identity) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- return examBreachLogMapper.getExamBreachPageExport(tbUser.getOrgId(), examId, examActivityId, roomCode, courseCode, name, identity);
|
|
|
|
|
|
+ return examBreachLogMapper.getExamBreachPageExport(tbUser.getOrgId(), examId, examActivityId, roomCode,
|
|
|
|
+ courseCode, name, identity);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -313,7 +326,8 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamBreachDetailListBean> examBreachListDetail(Long examStudentId, Integer status, int pageNumber, int pageSize) {
|
|
|
|
|
|
+ public IPage<ExamBreachDetailListBean> examBreachListDetail(Long examStudentId, Integer status, int pageNumber,
|
|
|
|
+ int pageSize) {
|
|
return examBreachLogMapper.getExamBreachDetailList(new Page<>(pageNumber, pageSize), examStudentId, status);
|
|
return examBreachLogMapper.getExamBreachDetailList(new Page<>(pageNumber, pageSize), examStudentId, status);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -331,11 +345,11 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamBreachListBean> examRevokeBreachList(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
|
- String name, String identity, int pageNumber, int pageSize) {
|
|
|
|
|
|
+ public IPage<ExamBreachListBean> examRevokeBreachList(Long examId, Long examActivityId, String roomCode,
|
|
|
|
+ String courseCode, String name, String identity, int pageNumber, int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- return examBreachLogMapper.getExamRevokeBreachPage(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId, examActivityId,
|
|
|
|
- roomCode, courseCode, name, identity);
|
|
|
|
|
|
+ return examBreachLogMapper.getExamRevokeBreachPage(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId,
|
|
|
|
+ examActivityId, roomCode, courseCode, name, identity);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -348,7 +362,8 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamBreachDetailListBean> examRevokeBreachListDetail(Long examStudentId, Integer status, int pageNumber, int pageSize) {
|
|
|
|
|
|
+ public IPage<ExamBreachDetailListBean> examRevokeBreachListDetail(Long examStudentId, Integer status,
|
|
|
|
+ int pageNumber, int pageSize) {
|
|
return examBreachLogMapper.getExamBreachDetailList(new Page<>(pageNumber, pageSize), examStudentId, status);
|
|
return examBreachLogMapper.getExamBreachDetailList(new Page<>(pageNumber, pageSize), examStudentId, status);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -366,11 +381,11 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamStudentLogListBean> examStudentLogList(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
|
- String name, String identity, int pageNumber, int pageSize) {
|
|
|
|
|
|
+ public IPage<ExamStudentLogListBean> examStudentLogList(Long examId, Long examActivityId, String roomCode,
|
|
|
|
+ String courseCode, String name, String identity, int pageNumber, int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- return examStudentMapper.getPageForStudentLog(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId, examActivityId,
|
|
|
|
- roomCode, courseCode, name, identity);
|
|
|
|
|
|
+ return examStudentMapper.getPageForStudentLog(new Page<>(pageNumber, pageSize), tbUser.getOrgId(), examId,
|
|
|
|
+ examActivityId, roomCode, courseCode, name, identity);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -382,13 +397,19 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExamStudentLogDetailListBean> examStudentLogListDetail(Long examStudentId, int pageNumber, int pageSize) {
|
|
|
|
- IPage<ExamStudentLogDetailListBean> examStudentLogDetailListBeanIPage = examStudentLogMapper.getExamStudentLogList(new Page<>(pageNumber, pageSize), examStudentId);
|
|
|
|
- if (Objects.nonNull(examStudentLogDetailListBeanIPage) && !CollectionUtils.isEmpty(examStudentLogDetailListBeanIPage.getRecords())) {
|
|
|
|
- IPage<ExamStudentLogDetailListBean> examStudentLogDetailListBeanIPageAll = examStudentLogMapper.getExamStudentLogList(new Page<>(SystemConstant.PAGE_NUMBER_MIN, SystemConstant.SELECT_PAGE_SIZE_MAX), examStudentId);
|
|
|
|
- examStudentLogDetailListBeanIPageAll = examStudentLogDetailListBeanIPageAll.getRecords().get(0).ipChange(examStudentLogDetailListBeanIPageAll);
|
|
|
|
- Map<Long, ExamStudentLogDetailListBean> examStudentLogDetailListBeanMap = examStudentLogDetailListBeanIPageAll.getRecords().stream()
|
|
|
|
- .collect(Collectors.toMap(ExamStudentLogDetailListBean::getId, Function.identity(), (dto1, dto2) -> dto1));
|
|
|
|
|
|
+ public IPage<ExamStudentLogDetailListBean> examStudentLogListDetail(Long examStudentId, int pageNumber,
|
|
|
|
+ int pageSize) {
|
|
|
|
+ IPage<ExamStudentLogDetailListBean> examStudentLogDetailListBeanIPage = examStudentLogMapper.getExamStudentLogList(
|
|
|
|
+ new Page<>(pageNumber, pageSize), examStudentId);
|
|
|
|
+ if (Objects.nonNull(examStudentLogDetailListBeanIPage) && !CollectionUtils.isEmpty(
|
|
|
|
+ examStudentLogDetailListBeanIPage.getRecords())) {
|
|
|
|
+ IPage<ExamStudentLogDetailListBean> examStudentLogDetailListBeanIPageAll = examStudentLogMapper.getExamStudentLogList(
|
|
|
|
+ new Page<>(SystemConstant.PAGE_NUMBER_MIN, SystemConstant.SELECT_PAGE_SIZE_MAX), examStudentId);
|
|
|
|
+ examStudentLogDetailListBeanIPageAll = examStudentLogDetailListBeanIPageAll.getRecords().get(0)
|
|
|
|
+ .ipChange(examStudentLogDetailListBeanIPageAll);
|
|
|
|
+ Map<Long, ExamStudentLogDetailListBean> examStudentLogDetailListBeanMap = examStudentLogDetailListBeanIPageAll.getRecords()
|
|
|
|
+ .stream().collect(Collectors.toMap(ExamStudentLogDetailListBean::getId, Function.identity(),
|
|
|
|
+ (dto1, dto2) -> dto1));
|
|
for (ExamStudentLogDetailListBean e : examStudentLogDetailListBeanIPage.getRecords()) {
|
|
for (ExamStudentLogDetailListBean e : examStudentLogDetailListBeanIPage.getRecords()) {
|
|
if (Objects.nonNull(examStudentLogDetailListBeanMap.containsKey(e.getId()))) {
|
|
if (Objects.nonNull(examStudentLogDetailListBeanMap.containsKey(e.getId()))) {
|
|
e.setIpChange(examStudentLogDetailListBeanMap.get(e.getId()).getIpChange());
|
|
e.setIpChange(examStudentLogDetailListBeanMap.get(e.getId()).getIpChange());
|
|
@@ -424,7 +445,8 @@ 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<TEExam> teExamList = teExamService.list(new QueryWrapper<TEExam>().lambda().eq(TEExam::getOrgId, tbUser.getOrgId()));
|
|
|
|
|
|
+ List<TEExam> teExamList = teExamService.list(
|
|
|
|
+ new QueryWrapper<TEExam>().lambda().eq(TEExam::getOrgId, tbUser.getOrgId()));
|
|
if (!CollectionUtils.isEmpty(teExamList)) {
|
|
if (!CollectionUtils.isEmpty(teExamList)) {
|
|
List<TEExamSummary> teExamSummaryAllList = new ArrayList<>();
|
|
List<TEExamSummary> teExamSummaryAllList = new ArrayList<>();
|
|
for (TEExam t : teExamList) {
|
|
for (TEExam t : teExamList) {
|
|
@@ -433,7 +455,8 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
for (ExamListBean e : examListBeanList) {
|
|
for (ExamListBean e : examListBeanList) {
|
|
Set<String> roomCodeSet = new HashSet<>(Arrays.asList(e.getRoomCode().split(", ")));
|
|
Set<String> roomCodeSet = new HashSet<>(Arrays.asList(e.getRoomCode().split(", ")));
|
|
for (String s : roomCodeSet) {
|
|
for (String s : roomCodeSet) {
|
|
- teExamSummaryAllList.addAll(themisCacheService.getExamSummaryCache(t.getId(), e.getExamActivityId(), s));
|
|
|
|
|
|
+ teExamSummaryAllList.addAll(
|
|
|
|
+ themisCacheService.getExamSummaryCache(t.getId(), e.getExamActivityId(), s));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -454,10 +477,10 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
// 预警人数
|
|
// 预警人数
|
|
ret.setWarnCount(Long.parseLong(warnCount.toString()));
|
|
ret.setWarnCount(Long.parseLong(warnCount.toString()));
|
|
}
|
|
}
|
|
-// 通讯故障人数
|
|
|
|
-// ret.setExceptionCount(tOeExamRecordMapper.getExceptionCount(tbUser.getOrgId()));
|
|
|
|
-// 机构在考人数
|
|
|
|
-// ret.setOrgExamingCount(tOeExamRecordMapper.getOrgExamingCount(tbUser.getOrgId()));
|
|
|
|
|
|
+ // 通讯故障人数
|
|
|
|
+ // ret.setExceptionCount(tOeExamRecordMapper.getExceptionCount(tbUser.getOrgId()));
|
|
|
|
+ // 机构在考人数
|
|
|
|
+ // ret.setOrgExamingCount(tOeExamRecordMapper.getOrgExamingCount(tbUser.getOrgId()));
|
|
//违纪人数
|
|
//违纪人数
|
|
ret.setBreachCount(tOeExamRecordMapper.getBreachCount(tbUser.getOrgId()));
|
|
ret.setBreachCount(tOeExamRecordMapper.getBreachCount(tbUser.getOrgId()));
|
|
return ret;
|
|
return ret;
|
|
@@ -481,15 +504,16 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
@Override
|
|
@Override
|
|
public List<TimeScaleDataResult> warnTrend() {
|
|
public List<TimeScaleDataResult> warnTrend() {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
-// TBUser tbUser = tbUserService.getById(321565832042266624L);//测试用
|
|
|
|
|
|
+ // TBUser tbUser = tbUserService.getById(321565832042266624L);//测试用
|
|
SysConfig onlineWarnScaleSize = themisCacheService.addSysConfigCache(SystemConstant.ONLINE_WARN_SCALESIZE);
|
|
SysConfig onlineWarnScaleSize = themisCacheService.addSysConfigCache(SystemConstant.ONLINE_WARN_SCALESIZE);
|
|
Optional.ofNullable(onlineWarnScaleSize).orElseThrow(() -> new BusinessException("在线人数/预警时间趋势统计格数未配置"));
|
|
Optional.ofNullable(onlineWarnScaleSize).orElseThrow(() -> new BusinessException("在线人数/预警时间趋势统计格数未配置"));
|
|
|
|
|
|
SysConfig onlineWarnInterval = themisCacheService.addSysConfigCache(SystemConstant.ONLINE_WARN_INTERVAL);
|
|
SysConfig onlineWarnInterval = themisCacheService.addSysConfigCache(SystemConstant.ONLINE_WARN_INTERVAL);
|
|
Optional.ofNullable(onlineWarnInterval).orElseThrow(() -> new BusinessException("在线人数/预警时间趋势统计间隔未配置"));
|
|
Optional.ofNullable(onlineWarnInterval).orElseThrow(() -> new BusinessException("在线人数/预警时间趋势统计间隔未配置"));
|
|
|
|
|
|
- int scaleSize = Integer.parseInt(onlineWarnScaleSize.getConfigValue()), interval = Integer.parseInt(onlineWarnInterval.getConfigValue());
|
|
|
|
-// scaleSize = 90;//测试用
|
|
|
|
|
|
+ int scaleSize = Integer.parseInt(onlineWarnScaleSize.getConfigValue()), interval = Integer.parseInt(
|
|
|
|
+ onlineWarnInterval.getConfigValue());
|
|
|
|
+ // scaleSize = 90;//测试用
|
|
List<Integer> timeSize = new ArrayList<>(scaleSize);
|
|
List<Integer> timeSize = new ArrayList<>(scaleSize);
|
|
for (int i = interval; i <= scaleSize * interval; i = i + interval) {
|
|
for (int i = interval; i <= scaleSize * interval; i = i + interval) {
|
|
timeSize.add(i);
|
|
timeSize.add(i);
|
|
@@ -500,7 +524,7 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
LocalDateTime minusMinutes = now.minusMinutes(scaleSize);
|
|
LocalDateTime minusMinutes = now.minusMinutes(scaleSize);
|
|
|
|
|
|
String currentDate = DateUtil.format(date, Constants.DEFAULT_DATE_PATTERN);
|
|
String currentDate = DateUtil.format(date, Constants.DEFAULT_DATE_PATTERN);
|
|
-// currentDate = "2022-11-06 16:31:00";//测试用
|
|
|
|
|
|
+ // currentDate = "2022-11-06 16:31:00";//测试用
|
|
Map<String, String> map = this.getTimeScale(timeSize, currentDate);
|
|
Map<String, String> map = this.getTimeScale(timeSize, currentDate);
|
|
|
|
|
|
Long longtimestamp = now.toInstant(ZoneOffset.ofHours(8)).toEpochMilli();
|
|
Long longtimestamp = now.toInstant(ZoneOffset.ofHours(8)).toEpochMilli();
|
|
@@ -508,8 +532,10 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
Long minusMinuteslongtimestamp = minusMinutes.toInstant(ZoneOffset.ofHours(8)).toEpochMilli();
|
|
Long minusMinuteslongtimestamp = minusMinutes.toInstant(ZoneOffset.ofHours(8)).toEpochMilli();
|
|
|
|
|
|
List<String> timeData = new ArrayList<>(map.values());
|
|
List<String> timeData = new ArrayList<>(map.values());
|
|
- List<TimeScaleDataResult> timeScaleDataResultList = tOeExamRecordMapper.getWarnTrend(tbUser.getOrgId(), timeData, longtimestamp, interval, minusMinuteslongtimestamp);
|
|
|
|
- List<TimeOnlineDataResult> timeOnlineDataResultList = tOeExamRecordMapper.getTimeOnlineData(tbUser.getOrgId(), timeData, longtimestamp, minusDayslongtimestamp);
|
|
|
|
|
|
+ List<TimeScaleDataResult> timeScaleDataResultList = tOeExamRecordMapper.getWarnTrend(tbUser.getOrgId(),
|
|
|
|
+ timeData, longtimestamp, interval, minusMinuteslongtimestamp);
|
|
|
|
+ List<TimeOnlineDataResult> timeOnlineDataResultList = tOeExamRecordMapper.getTimeOnlineData(tbUser.getOrgId(),
|
|
|
|
+ timeData, longtimestamp, minusDayslongtimestamp);
|
|
if (!CollectionUtils.isEmpty(timeOnlineDataResultList) && !CollectionUtils.isEmpty(timeScaleDataResultList)
|
|
if (!CollectionUtils.isEmpty(timeOnlineDataResultList) && !CollectionUtils.isEmpty(timeScaleDataResultList)
|
|
&& timeOnlineDataResultList.size() == timeScaleDataResultList.size()) {
|
|
&& timeOnlineDataResultList.size() == timeScaleDataResultList.size()) {
|
|
for (int i = 0; i < timeOnlineDataResultList.size(); i++) {
|
|
for (int i = 0; i < timeOnlineDataResultList.size(); i++) {
|