|
@@ -67,8 +67,10 @@ import java.util.stream.Collectors;
|
|
|
*/
|
|
|
@Service
|
|
|
public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
+
|
|
|
@Autowired
|
|
|
private ExportTaskService exportTaskService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ExamScoreRepo examScoreRepo;
|
|
|
|
|
@@ -376,12 +378,13 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
fillStage(ret.getContent());
|
|
|
return ret;
|
|
|
}
|
|
|
- private void fillStage(List<ExamRecordInfo> list,Long taskId) {
|
|
|
+
|
|
|
+ private void fillStage(List<ExamRecordInfo> list, Long taskId) {
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return;
|
|
|
}
|
|
|
for (ExamRecordInfo info : list) {
|
|
|
- exportTaskService.checkStopExportTaskById(taskId);
|
|
|
+ exportTaskService.checkStopExportTaskById(taskId);
|
|
|
if (info.getExamStageId() != null) {
|
|
|
ExamStageCacheBean stage = CacheHelper.getExamStage(info.getExamId(), info.getExamStageId());
|
|
|
info.setExamStageOrder(stage.getStageOrder());
|
|
@@ -393,6 +396,7 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
private void fillStage(List<ExamRecordInfo> list) {
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return;
|
|
@@ -778,7 +782,7 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
int pageNo = 1;
|
|
|
int pageSize = 5000;
|
|
|
for (; ; ) {
|
|
|
- exportTaskService.checkStopExportTaskById(query.getTaskId());
|
|
|
+ exportTaskService.checkStopExportTaskById(query.getTaskId());
|
|
|
List<ExamRecordInfo> tem = getExamRecordDetailPageForExport(uds, query, pageNo, pageSize);
|
|
|
if (tem == null || tem.size() == 0) {
|
|
|
break;
|
|
@@ -791,16 +795,16 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
return examRecordDataList;
|
|
|
}
|
|
|
for (ExamRecordInfo erInfo : examRecordDataList) {
|
|
|
- exportTaskService.checkStopExportTaskById(query.getTaskId());
|
|
|
+ exportTaskService.checkStopExportTaskById(query.getTaskId());
|
|
|
setInfo(erInfo, query.getExamId());
|
|
|
}
|
|
|
- setPhone(examRecordDataList, query.getRootOrgId(),query.getTaskId());
|
|
|
+ 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,query.getTaskId());
|
|
|
- setIps(examRecordDataList,query.getTaskId());
|
|
|
+ setVirtualCameraNames(examRecordDataList, query.getTaskId());
|
|
|
+ setIps(examRecordDataList, query.getTaskId());
|
|
|
}
|
|
|
- fillStage(examRecordDataList,query.getTaskId());
|
|
|
+ fillStage(examRecordDataList, query.getTaskId());
|
|
|
return examRecordDataList;
|
|
|
}
|
|
|
|
|
@@ -848,12 +852,12 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void setPhone(List<ExamRecordInfo> examRecordDataList, Long rootOrgId,Long taskId) {
|
|
|
+ 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);
|
|
|
+ exportTaskService.checkStopExportTaskById(taskId);
|
|
|
req.setRootOrgId(rootOrgId);
|
|
|
List<Long> ids = dataList.stream().map(dto -> dto.getStudentId()).distinct().collect(Collectors.toList());
|
|
|
req.setStudentIdList(ids);
|
|
@@ -871,11 +875,11 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
tool.setDataForBatch(examRecordDataList, 1000);
|
|
|
}
|
|
|
|
|
|
- private void setVirtualCameraNames(List<ExamRecordInfo> examRecordDataList,Long taskId) {
|
|
|
+ private void setVirtualCameraNames(List<ExamRecordInfo> examRecordDataList, Long taskId) {
|
|
|
BatchSetDataUtil<ExamRecordInfo> tool = new BatchSetDataUtil<ExamRecordInfo>() {
|
|
|
@Override
|
|
|
public void setData(List<ExamRecordInfo> dataList) {
|
|
|
- exportTaskService.checkStopExportTaskById(taskId);
|
|
|
+ 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);
|
|
@@ -901,11 +905,11 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
tool.setDataForBatch(examRecordDataList, 1000);
|
|
|
}
|
|
|
|
|
|
- private void setIps(List<ExamRecordInfo> examRecordDataList,Long taskId) {
|
|
|
+ private void setIps(List<ExamRecordInfo> examRecordDataList, Long taskId) {
|
|
|
BatchSetDataUtil<ExamRecordInfo> tool = new BatchSetDataUtil<ExamRecordInfo>() {
|
|
|
@Override
|
|
|
public void setData(List<ExamRecordInfo> dataList) {
|
|
|
- exportTaskService.checkStopExportTaskById(taskId);
|
|
|
+ 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);
|