|
@@ -47,10 +47,10 @@ public class FdsfExportPaperService extends ExportPaperAbstractService {
|
|
if (examType.equals("offLine")) {
|
|
if (examType.equals("offLine")) {
|
|
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
|
|
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
|
|
paperExp.setExamRemarkWord(DocxProcessUtil.html2Docx(wordMLPackage, CommonUtils.formatHtml(paperExp.getExamRemark())));
|
|
paperExp.setExamRemarkWord(DocxProcessUtil.html2Docx(wordMLPackage, CommonUtils.formatHtml(paperExp.getExamRemark())));
|
|
- DocxProcessUtil.exportWordNew(paperExp, file, FJSF_TMPLATE_PAPER);
|
|
|
|
|
|
+ DocxProcessUtil.exportWordNew(paperExp, file, FDSF_TMPLATE_PAPER);
|
|
} else {
|
|
} else {
|
|
long docxTime = System.currentTimeMillis();
|
|
long docxTime = System.currentTimeMillis();
|
|
- DocxProcessUtil.exportWordNew(paperExp, file, FJSF_TMPLATE_PAPER);
|
|
|
|
|
|
+ DocxProcessUtil.exportWordNew(paperExp, file, FDSF_TMPLATE_PAPER);
|
|
long docxEndTime = System.currentTimeMillis();
|
|
long docxEndTime = System.currentTimeMillis();
|
|
log.debug("处理word文字耗时:" + (docxEndTime - docxTime) + "ms");
|
|
log.debug("处理word文字耗时:" + (docxEndTime - docxTime) + "ms");
|
|
}
|
|
}
|
|
@@ -76,7 +76,7 @@ public class FdsfExportPaperService extends ExportPaperAbstractService {
|
|
String answerFileName = paperExp.getName() + "_" + paperExp.getCourseNo() + "_" + ExamFileType.ANSWER.getName() + DOCX_SUFFIX;
|
|
String answerFileName = paperExp.getName() + "_" + paperExp.getCourseNo() + "_" + ExamFileType.ANSWER.getName() + DOCX_SUFFIX;
|
|
File file = new File(TEMP_FILE_EXP + File.separator + zipFileName + File.separator + answerFileName);
|
|
File file = new File(TEMP_FILE_EXP + File.separator + zipFileName + File.separator + answerFileName);
|
|
long docxTime = System.currentTimeMillis();
|
|
long docxTime = System.currentTimeMillis();
|
|
- DocxProcessUtil.exportWordNew(paperExp, file, FJSF_TMPLATE_ANSWER);
|
|
|
|
|
|
+ DocxProcessUtil.exportWordNew(paperExp, file, FDSF_TMPLATE_ANSWER);
|
|
DocxProcessUtil.processImage(zipFileName + File.separator + answerFileName, getPkgList(paperId));
|
|
DocxProcessUtil.processImage(zipFileName + File.separator + answerFileName, getPkgList(paperId));
|
|
long docxEndTime = System.currentTimeMillis();
|
|
long docxEndTime = System.currentTimeMillis();
|
|
log.debug("处理word文字+图片耗时:" + (docxEndTime - docxTime) + "ms");
|
|
log.debug("处理word文字+图片耗时:" + (docxEndTime - docxTime) + "ms");
|
|
@@ -97,17 +97,17 @@ public class FdsfExportPaperService extends ExportPaperAbstractService {
|
|
//没有试卷结构导出设置
|
|
//没有试卷结构导出设置
|
|
if (exportStructure == null) {
|
|
if (exportStructure == null) {
|
|
//上传试卷
|
|
//上传试卷
|
|
- uploadPaperOrAnswerFile(paperExp, extractConfig, accessUser, currNum, FJSF_TMPLATE_PAPER, ExamFileType.PAPER, examPaper);
|
|
|
|
|
|
+ uploadPaperOrAnswerFile(paperExp, extractConfig, accessUser, currNum, FDSF_TMPLATE_PAPER, ExamFileType.PAPER, examPaper);
|
|
//上传答案
|
|
//上传答案
|
|
- uploadPaperOrAnswerFile(paperExp, extractConfig, accessUser, currNum, FJSF_TMPLATE_ANSWER, ExamFileType.ANSWER, examPaper);
|
|
|
|
|
|
+ uploadPaperOrAnswerFile(paperExp, extractConfig, accessUser, currNum, FDSF_TMPLATE_ANSWER, ExamFileType.ANSWER, examPaper);
|
|
} else if (exportStructure != null && exportStructure.getExportType() == ExportType.NORMAL) {
|
|
} else if (exportStructure != null && exportStructure.getExportType() == ExportType.NORMAL) {
|
|
List<QuestionTypeNum> questionTypeNums = exportStructure.getQuestionTypeNums();
|
|
List<QuestionTypeNum> questionTypeNums = exportStructure.getQuestionTypeNums();
|
|
//检查试卷中客观题的数量是否大于试卷导出设置中的设置的数量
|
|
//检查试卷中客观题的数量是否大于试卷导出设置中的设置的数量
|
|
checkObjectiveDetailsNum(paperExp, questionTypeNums);
|
|
checkObjectiveDetailsNum(paperExp, questionTypeNums);
|
|
//上传试卷
|
|
//上传试卷
|
|
- uploadPaperOrAnswerFile(paperExp, extractConfig, accessUser, currNum, FJSF_TMPLATE_PAPER, ExamFileType.PAPER, examPaper);
|
|
|
|
|
|
+ uploadPaperOrAnswerFile(paperExp, extractConfig, accessUser, currNum, FDSF_TMPLATE_PAPER, ExamFileType.PAPER, examPaper);
|
|
//上传答案
|
|
//上传答案
|
|
- uploadPaperOrAnswerFile(paperExp, extractConfig, accessUser, currNum, FJSF_TMPLATE_ANSWER, ExamFileType.ANSWER, examPaper);
|
|
|
|
|
|
+ uploadPaperOrAnswerFile(paperExp, extractConfig, accessUser, currNum, FDSF_TMPLATE_ANSWER, ExamFileType.ANSWER, examPaper);
|
|
//上传试卷结构 不能在上传试卷和答案之前
|
|
//上传试卷结构 不能在上传试卷和答案之前
|
|
uploadPaperStructure(paperExp, extractConfig, accessUser, currNum, questionTypeNums, examPaper);
|
|
uploadPaperStructure(paperExp, extractConfig, accessUser, currNum, questionTypeNums, examPaper);
|
|
} else if (exportStructure != null && exportStructure.getExportType() == ExportType.ONLINE) {
|
|
} else if (exportStructure != null && exportStructure.getExportType() == ExportType.ONLINE) {
|