|
@@ -505,31 +505,31 @@ public class DataSyncServiceImpl implements DataSyncService {
|
|
|
ExamTask examTask = examTaskService.getByCourseCodeAndPaperNumber(examDetailCours.getSchoolId(), examDetailCours.getCourseCode(), examDetailCours.getPaperNumber());
|
|
|
if (examTask == null) {
|
|
|
log.info("[上传题卡格式]数据异常,通过学校:{},课程代码:{},试卷编号:{}查出命题任务为空", examDetailCours.getSchoolId(), examDetailCours.getCourseCode(), examDetailCours.getPaperNumber());
|
|
|
- return;
|
|
|
+ continue;
|
|
|
}
|
|
|
ExamTaskDetail examTaskDetail = examTaskDetailService.getByExamTaskId(examTask.getId());
|
|
|
List<JSONObject> paperAttachmentIds = JSON.parseArray(examTaskDetail.getPaperAttachmentIds(), JSONObject.class);
|
|
|
if (paperAttachmentIds.isEmpty()) {
|
|
|
log.info("[上传题卡格式]数据异常,通过命题任务ID:{}查询试卷信息为空", examTask.getId());
|
|
|
- return;
|
|
|
+ continue;
|
|
|
}
|
|
|
|
|
|
String paperType = examDetailCours.getPaperType();
|
|
|
if (StringUtils.isBlank(paperType)) {
|
|
|
log.info("[上传题卡格式]数据异常,通过学校:{},课程代码:{},试卷编号:{}查出考场科目信息中绑定卷型为空", examDetailCours.getSchoolId(), examDetailCours.getCourseCode(), examDetailCours.getPaperNumber());
|
|
|
- return;
|
|
|
+ continue;
|
|
|
}
|
|
|
for (String s : examDetailCours.getPaperType().split(",")) {
|
|
|
Optional<JSONObject> optional = paperAttachmentIds.stream().filter(m -> m.getString("name").equals(s)).findFirst();
|
|
|
if (!optional.isPresent()) {
|
|
|
log.info("[上传题卡格式]数据异常,未找到卷型{}绑定题卡ID", s);
|
|
|
- return;
|
|
|
+ continue;
|
|
|
}
|
|
|
Long cardId = optional.get().getLong("cardId");
|
|
|
CardDetailDto cardDetail = examCardService.getCardDetail(cardId);
|
|
|
if (cardDetail == null || StringUtils.isBlank(cardDetail.getContent())) {
|
|
|
log.info("[上传题卡格式]数据异常,通过题卡ID:{}未查到题卡格式信息", cardId);
|
|
|
- return;
|
|
|
+ continue;
|
|
|
}
|
|
|
|
|
|
//生成json文件
|