|
@@ -846,10 +846,10 @@ public abstract class ExportPaperAbstractService {
|
|
DocxProcessUtil.exportWord(paperExp,paperfileName,template);
|
|
DocxProcessUtil.exportWord(paperExp,paperfileName,template);
|
|
DocxProcessUtil.processImage(paperfileName,getPkgList(paperExp.getId()));
|
|
DocxProcessUtil.processImage(paperfileName,getPkgList(paperExp.getId()));
|
|
File file = new File(TEMP_FILE_EXP+paperfileName);
|
|
File file = new File(TEMP_FILE_EXP+paperfileName);
|
|
- String paperFilePath = uploadUrl+extractConfig.getOrgId()+File.separator+paperfileName;
|
|
|
|
|
|
+ String paperFilePath = uploadUrl+extractConfig.getOrgId()+"/"+paperfileName;
|
|
UpYun upyun = new UpYun(bucketName,userName,password);
|
|
UpYun upyun = new UpYun(bucketName,userName,password);
|
|
upyun.writeFile(paperFilePath,file,true);
|
|
upyun.writeFile(paperFilePath,file,true);
|
|
- examFileService.saveExamFile(new ExamFile(extractConfig,paperFilePath,examFileType,DOCX_SUFFIX),accessUser);
|
|
|
|
|
|
+ examFileService.saveExamFile(new ExamFile(paperExp.getId(),extractConfig,paperFilePath,examFileType,DOCX_SUFFIX),accessUser);
|
|
file.delete();
|
|
file.delete();
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -885,10 +885,10 @@ public abstract class ExportPaperAbstractService {
|
|
File file = new File(TEMP_FILE_EXP+objectiveFilename);
|
|
File file = new File(TEMP_FILE_EXP+objectiveFilename);
|
|
FileOutputStream out = new FileOutputStream(file);
|
|
FileOutputStream out = new FileOutputStream(file);
|
|
objectiveExcelExporter.write(objectiveFilename,objectiveQuestionStructureList,out);
|
|
objectiveExcelExporter.write(objectiveFilename,objectiveQuestionStructureList,out);
|
|
- String objectiveFilePath = uploadUrl+extractConfig.getOrgId()+File.separator+objectiveFilename;
|
|
|
|
|
|
+ String objectiveFilePath = uploadUrl+extractConfig.getOrgId()+"/"+objectiveFilename;
|
|
UpYun upyun = new UpYun(bucketName,userName,password);
|
|
UpYun upyun = new UpYun(bucketName,userName,password);
|
|
upyun.writeFile(objectiveFilePath,file,true);
|
|
upyun.writeFile(objectiveFilePath,file,true);
|
|
- examFileService.saveExamFile(new ExamFile(extractConfig,objectiveFilePath,ExamFileType.PAPER_STRUCTURE_OBJECTIVE,EXCEL_SUFFIX),accessUser);
|
|
|
|
|
|
+ examFileService.saveExamFile(new ExamFile(paperExp.getId(),extractConfig,objectiveFilePath,ExamFileType.PAPER_STRUCTURE_OBJECTIVE,EXCEL_SUFFIX),accessUser);
|
|
file.delete();
|
|
file.delete();
|
|
} catch (FileNotFoundException e) {
|
|
} catch (FileNotFoundException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -972,10 +972,10 @@ public abstract class ExportPaperAbstractService {
|
|
File file = new File(TEMP_FILE_EXP+subjectiveFileName);
|
|
File file = new File(TEMP_FILE_EXP+subjectiveFileName);
|
|
FileOutputStream out = new FileOutputStream(file);
|
|
FileOutputStream out = new FileOutputStream(file);
|
|
subjectiveExcelExporter.write(subjectiveFileName,subjectiveQuestionStructureList,out);
|
|
subjectiveExcelExporter.write(subjectiveFileName,subjectiveQuestionStructureList,out);
|
|
- String subjectiveFilePath = uploadUrl+extractConfig.getOrgId()+File.separator+subjectiveFileName;
|
|
|
|
|
|
+ String subjectiveFilePath = uploadUrl+extractConfig.getOrgId()+"/"+subjectiveFileName;
|
|
UpYun upyun = new UpYun(bucketName,userName,password);
|
|
UpYun upyun = new UpYun(bucketName,userName,password);
|
|
upyun.writeFile(subjectiveFilePath,file,true);
|
|
upyun.writeFile(subjectiveFilePath,file,true);
|
|
- examFileService.saveExamFile(new ExamFile(extractConfig,subjectiveFilePath,ExamFileType.PAPER_STRUCTURE_SUBJECTIVE,EXCEL_SUFFIX),accessUser);
|
|
|
|
|
|
+ examFileService.saveExamFile(new ExamFile(paperExp.getId(),extractConfig,subjectiveFilePath,ExamFileType.PAPER_STRUCTURE_SUBJECTIVE,EXCEL_SUFFIX),accessUser);
|
|
file.delete();
|
|
file.delete();
|
|
} catch (FileNotFoundException e) {
|
|
} catch (FileNotFoundException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|