|
@@ -10,6 +10,7 @@ import com.qmth.distributed.print.business.enums.CardTypeEnum;
|
|
|
import com.qmth.distributed.print.business.service.*;
|
|
|
import com.qmth.distributed.print.business.util.ExamTaskUtil;
|
|
|
import com.qmth.teachcloud.common.bean.tiku.paperData.answer.TikuAnswer;
|
|
|
+import com.qmth.teachcloud.common.bean.vo.FilePathVo;
|
|
|
import com.qmth.teachcloud.common.bean.vo.PaperInfoVo;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
import com.qmth.teachcloud.common.entity.BasicAttachment;
|
|
@@ -18,6 +19,7 @@ import com.qmth.teachcloud.common.enums.*;
|
|
|
import com.qmth.teachcloud.common.service.BasicAttachmentService;
|
|
|
import com.qmth.teachcloud.mark.bean.answercard.CardFile;
|
|
|
import com.qmth.teachcloud.mark.bean.vo.parseCard.Struct;
|
|
|
+import com.qmth.teachcloud.mark.dto.mark.MarkPaperFileDto;
|
|
|
import com.qmth.teachcloud.mark.entity.*;
|
|
|
import com.qmth.teachcloud.mark.enums.CardSource;
|
|
|
import com.qmth.teachcloud.mark.service.*;
|
|
@@ -91,14 +93,17 @@ public class PrintFinishServiceImpl implements PrintFinishService {
|
|
|
if (CollectionUtils.isNotEmpty(paperInfoVos)) {
|
|
|
// 按AB排序
|
|
|
paperInfoVos.sort(Comparator.comparing(PaperInfoVo::getName));
|
|
|
- List<String> urlList = new ArrayList<>();
|
|
|
+ List<MarkPaperFileDto> subjectiveAnswerFileDtoList = new ArrayList<>();
|
|
|
for (PaperInfoVo paperInfoVo : paperInfoVos) {
|
|
|
BasicAttachment basicAttachment = basicAttachmentService.getById(paperInfoVo.getAttachmentId());
|
|
|
if (basicAttachment != null) {
|
|
|
- urlList.add(basicAttachment.getPath());
|
|
|
+ MarkPaperFileDto subjectivePaperFileDto = new MarkPaperFileDto();
|
|
|
+ subjectivePaperFileDto.setPaperType(paperInfoVo.getName());
|
|
|
+ subjectivePaperFileDto.setFilePathVo(JSON.parseObject(basicAttachment.getPath(), FilePathVo.class));
|
|
|
+ subjectiveAnswerFileDtoList.add(subjectivePaperFileDto);
|
|
|
}
|
|
|
}
|
|
|
- insertMarkPaper.setPaperFilePath(JSON.toJSONString(urlList));
|
|
|
+ insertMarkPaper.setPaperFilePath(JSON.toJSONString(subjectiveAnswerFileDtoList));
|
|
|
}
|
|
|
markPaperService.save(insertMarkPaper);
|
|
|
}
|
|
@@ -309,16 +314,20 @@ public class PrintFinishServiceImpl implements PrintFinishService {
|
|
|
}
|
|
|
}
|
|
|
markQuestionService.saveBatch(markQuestions);
|
|
|
+ markQuestionAnswerService.saveBatch(markQuestionAnswers);
|
|
|
+
|
|
|
try {
|
|
|
- // 解析评卷区坐标
|
|
|
- markQuestionService.updatePic(content, markQuestions);
|
|
|
+ // 只更新主观题
|
|
|
+ List<MarkQuestion> questions = markQuestions.stream().filter(m -> !m.getObjective()).collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isNotEmpty(questions)) {
|
|
|
+ // 解析评卷区坐标
|
|
|
+ markQuestionService.updatePic(content, questions);
|
|
|
+ // 命题老师,任课老师,默认为评卷员
|
|
|
+ markUserQuestionService.saveDefaultMarker(examId, paperNumber, questions);
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
log.info("解析评卷区失败");
|
|
|
}
|
|
|
- markQuestionAnswerService.saveBatch(markQuestionAnswers);
|
|
|
-
|
|
|
- // 命题老师,任课老师,默认为评卷员
|
|
|
- markUserQuestionService.saveDefaultMarker(examId, paperNumber, markQuestions);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.info("同步结构失败");
|