|
@@ -926,7 +926,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
if (Objects.nonNull(attachmentId)) {
|
|
if (Objects.nonNull(attachmentId)) {
|
|
BasicAttachment attachment = basicAttachmentService.getById(attachmentId);
|
|
BasicAttachment attachment = basicAttachmentService.getById(attachmentId);
|
|
Optional.ofNullable(attachment).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("附件数据异常"));
|
|
Optional.ofNullable(attachment).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("附件数据异常"));
|
|
- String fileName = dirPath + "试卷" + SystemConstant.HYPHEN + name + attachment.getType();
|
|
|
|
|
|
+ String fileName = dirPath + "试卷" + SystemConstant.HYPHEN + name + attachment.getType();
|
|
fileUploadService.downloadFile(attachment, fileName);
|
|
fileUploadService.downloadFile(attachment, fileName);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2317,7 +2317,8 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
examTaskPaperDataService.saveOrUpdateByMultiId(examTaskPaperData);
|
|
examTaskPaperDataService.saveOrUpdateByMultiId(examTaskPaperData);
|
|
return examTaskPaperData;
|
|
return examTaskPaperData;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- throw ExceptionResultEnum.ERROR.exception("获取试卷包数据失败");
|
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("解析试卷包数据失败");
|
|
} finally {
|
|
} finally {
|
|
if (zipFile.exists()) {
|
|
if (zipFile.exists()) {
|
|
FileUtil.deleteFile(zipFile);
|
|
FileUtil.deleteFile(zipFile);
|