|
@@ -376,7 +376,23 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
fillStage(ret.getContent());
|
|
|
return ret;
|
|
|
}
|
|
|
-
|
|
|
+ private void fillStage(List<ExamRecordInfo> list,Long taskId) {
|
|
|
+ if (CollectionUtils.isEmpty(list)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (ExamRecordInfo info : list) {
|
|
|
+ exportTaskService.checkStopExportTaskById(taskId);
|
|
|
+ if (info.getExamStageId() != null) {
|
|
|
+ ExamStageCacheBean stage = CacheHelper.getExamStage(info.getExamId(), info.getExamStageId());
|
|
|
+ info.setExamStageOrder(stage.getStageOrder());
|
|
|
+ info.setStageStartTime(stage.getStartTime());
|
|
|
+ info.setStageEndTime(stage.getEndTime());
|
|
|
+ info.setExamStage(stage.getStageOrder() + "("
|
|
|
+ + DateUtil.format(stage.getStartTime(), DateUtil.DatePatterns.CHINA_DEFAULT) + "至"
|
|
|
+ + DateUtil.format(stage.getEndTime(), DateUtil.DatePatterns.CHINA_DEFAULT) + ")");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
private void fillStage(List<ExamRecordInfo> list) {
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return;
|
|
@@ -775,15 +791,16 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
return examRecordDataList;
|
|
|
}
|
|
|
for (ExamRecordInfo erInfo : examRecordDataList) {
|
|
|
+ exportTaskService.checkStopExportTaskById(query.getTaskId());
|
|
|
setInfo(erInfo, query.getExamId());
|
|
|
}
|
|
|
- setPhone(examRecordDataList, query.getRootOrgId());
|
|
|
+ setPhone(examRecordDataList, query.getRootOrgId(),query.getTaskId());
|
|
|
String examType = examRecordDataList.get(0).getExamType();
|
|
|
if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
|
|
|
- setVirtualCameraNames(examRecordDataList);
|
|
|
- setIps(examRecordDataList);
|
|
|
+ setVirtualCameraNames(examRecordDataList,query.getTaskId());
|
|
|
+ setIps(examRecordDataList,query.getTaskId());
|
|
|
}
|
|
|
- fillStage(examRecordDataList);
|
|
|
+ fillStage(examRecordDataList,query.getTaskId());
|
|
|
return examRecordDataList;
|
|
|
}
|
|
|
|
|
@@ -831,11 +848,12 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void setPhone(List<ExamRecordInfo> examRecordDataList, Long rootOrgId) {
|
|
|
+ private void setPhone(List<ExamRecordInfo> examRecordDataList, Long rootOrgId,Long taskId) {
|
|
|
GetStudentListByIdsReq req = new GetStudentListByIdsReq();
|
|
|
BatchSetDataUtil<ExamRecordInfo> tool = new BatchSetDataUtil<ExamRecordInfo>() {
|
|
|
@Override
|
|
|
public void setData(List<ExamRecordInfo> dataList) {
|
|
|
+ exportTaskService.checkStopExportTaskById(taskId);
|
|
|
req.setRootOrgId(rootOrgId);
|
|
|
List<Long> ids = dataList.stream().map(dto -> dto.getStudentId()).distinct().collect(Collectors.toList());
|
|
|
req.setStudentIdList(ids);
|
|
@@ -850,13 +868,14 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
}
|
|
|
|
|
|
};
|
|
|
- tool.setDataForBatch(examRecordDataList, 100);
|
|
|
+ tool.setDataForBatch(examRecordDataList, 1000);
|
|
|
}
|
|
|
|
|
|
- private void setVirtualCameraNames(List<ExamRecordInfo> examRecordDataList) {
|
|
|
+ private void setVirtualCameraNames(List<ExamRecordInfo> examRecordDataList,Long taskId) {
|
|
|
BatchSetDataUtil<ExamRecordInfo> tool = new BatchSetDataUtil<ExamRecordInfo>() {
|
|
|
@Override
|
|
|
public void setData(List<ExamRecordInfo> dataList) {
|
|
|
+ exportTaskService.checkStopExportTaskById(taskId);
|
|
|
List<Long> ids = dataList.stream().map(dto -> dto.getId()).distinct().collect(Collectors.toList());
|
|
|
Map<Long, Set<String>> map = new HashMap<>();
|
|
|
List<ExamCaptureCameraInfoEntity> examCaptureList = examCaptureCameraInfoRepo.findByExamRecordDataIdInAndVirtualCamera(ids, true);
|
|
@@ -879,13 +898,14 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
}
|
|
|
|
|
|
};
|
|
|
- tool.setDataForBatch(examRecordDataList, 100);
|
|
|
+ tool.setDataForBatch(examRecordDataList, 1000);
|
|
|
}
|
|
|
|
|
|
- private void setIps(List<ExamRecordInfo> examRecordDataList) {
|
|
|
+ private void setIps(List<ExamRecordInfo> examRecordDataList,Long taskId) {
|
|
|
BatchSetDataUtil<ExamRecordInfo> tool = new BatchSetDataUtil<ExamRecordInfo>() {
|
|
|
@Override
|
|
|
public void setData(List<ExamRecordInfo> dataList) {
|
|
|
+ exportTaskService.checkStopExportTaskById(taskId);
|
|
|
List<Long> ids = dataList.stream().map(dto -> dto.getId()).distinct().collect(Collectors.toList());
|
|
|
Map<Long, Set<String>> map = new HashMap<>();
|
|
|
List<ExamProcessRecordEntity> list = examProcessRecordRepo.findByExamRecordDataIdIn(ids);
|
|
@@ -908,7 +928,7 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
}
|
|
|
|
|
|
};
|
|
|
- tool.setDataForBatch(examRecordDataList, 100);
|
|
|
+ tool.setDataForBatch(examRecordDataList, 1000);
|
|
|
}
|
|
|
|
|
|
private String getStrFromSet(Set<String> set) {
|