Selaa lähdekoodia

导出试卷名称修改为 试卷名称+课程代码

weiwenhai 7 vuotta sitten
vanhempi
commit
50ebe60baa

+ 2 - 2
cqb-paper/src/main/java/com/qmth/cqb/paper/service/export/DzkdExportPaperService.java

@@ -42,7 +42,7 @@ public class DzkdExportPaperService extends ExportPaperAbstractService {
 		//电子科大独有
 		setSplitPaperDetailExp(paperExp,paperExp.getPaperDetails());
 		if(paperExp!=null){
-			String paperfileName = paperExp.getCourseNo()+"_"+ExamFileType.PAPER.getName()+DOCX_SUFFIX;
+			String paperfileName = paperExp.getName()+"_"+paperExp.getCourseNo()+"_"+ExamFileType.PAPER.getName()+DOCX_SUFFIX;
 			File file = new File(TEMP_FILE_EXP+File.separator+zipFileName+File.separator+paperfileName);
 			DocxProcessUtil.exportWordNew(paperExp, file,DZKD_TEMPLATE_PAPER);
 			DocxProcessUtil.processImage(zipFileName+File.separator+paperfileName,getPkgList(paperId));
@@ -54,7 +54,7 @@ public class DzkdExportPaperService extends ExportPaperAbstractService {
 		//电子科大独有
 		setSplitPaperDetailExp(paperExp,paperExp.getPaperDetails());
 		if(paperExp!=null){
-			String answerFileName = 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);
 			DocxProcessUtil.exportWordNew(paperExp,file,DZKD_TEMPLATE_ANSWER);
 			DocxProcessUtil.processImage(zipFileName+File.separator+answerFileName,getPkgList(paperId));

+ 2 - 2
cqb-paper/src/main/java/com/qmth/cqb/paper/service/export/SddxExportPaperService.java

@@ -31,7 +31,7 @@ public class SddxExportPaperService extends ExportPaperAbstractService{
     public void downloadPaper(String paperId,String zipFileName) throws Exception {
 		PaperExp paperExp = initPaperExp(paperId);
 		if(paperExp!=null){
-			String paperfileName = paperExp.getCourseNo()+"_"+ExamFileType.PAPER.getName()+DOCX_SUFFIX;
+			String paperfileName = paperExp.getName()+"_"+paperExp.getCourseNo()+"_"+ExamFileType.PAPER.getName()+DOCX_SUFFIX;
 			File file = new File(TEMP_FILE_EXP+File.separator+zipFileName+File.separator+paperfileName);
 			DocxProcessUtil.exportWordNew(paperExp, file,SDDX_TEMPLATE_PAPER);
 			DocxProcessUtil.processImage(zipFileName+File.separator+paperfileName,getPkgList(paperId));
@@ -42,7 +42,7 @@ public class SddxExportPaperService extends ExportPaperAbstractService{
 	public void downloadPaperAnswer(String paperId, String zipFileName)throws Exception {
 		PaperExp paperExp = initPaperExp(paperId);
 		if(paperExp!=null){
-			String answerFileName = 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);
 			DocxProcessUtil.exportWordNew(paperExp,file,SDDX_TEMPLATE_ANSWER);
 			DocxProcessUtil.processImage(zipFileName+File.separator+answerFileName,getPkgList(paperId));

+ 2 - 2
cqb-paper/src/main/java/com/qmth/cqb/paper/service/export/SxsfExportPaperService.java

@@ -30,7 +30,7 @@ public class SxsfExportPaperService extends ExportPaperAbstractService {
     public void downloadPaper(String paperId,String zipFileName) throws Exception {
 		PaperExp paperExp = initPaperExp(paperId);
 		if(paperExp!=null){
-			String paperfileName = paperExp.getCourseNo()+"_"+ExamFileType.PAPER.getName()+DOCX_SUFFIX;
+			String paperfileName = paperExp.getName()+"_"+paperExp.getCourseNo()+"_"+ExamFileType.PAPER.getName()+DOCX_SUFFIX;
 			File file = new File(TEMP_FILE_EXP+File.separator+zipFileName+File.separator+paperfileName);
 			DocxProcessUtil.exportWordNew(paperExp, file,SXSF_TEMPLATE_PAPER);
 			DocxProcessUtil.processImage(zipFileName+File.separator+paperfileName,getPkgList(paperId));
@@ -41,7 +41,7 @@ public class SxsfExportPaperService extends ExportPaperAbstractService {
 	public void downloadPaperAnswer(String paperId, String zipFileName)throws Exception {
 		PaperExp paperExp = initPaperExp(paperId);
 		if(paperExp!=null){
-			String answerFileName = 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);
 			DocxProcessUtil.exportWordNew(paperExp,file,SXSF_TEMPLATE_ANSWER);
 			DocxProcessUtil.processImage(zipFileName+File.separator+answerFileName,getPkgList(paperId));

+ 2 - 2
cqb-paper/src/main/java/com/qmth/cqb/paper/service/export/xajdExportPaperService.java

@@ -30,7 +30,7 @@ public class xajdExportPaperService extends ExportPaperAbstractService{
     public void downloadPaper(String paperId,String zipFileName) throws Exception {
 		PaperExp paperExp = initPaperExp(paperId);
 		if(paperExp!=null){
-			String paperfileName = paperExp.getCourseNo()+"_"+ExamFileType.PAPER.getName()+DOCX_SUFFIX;
+			String paperfileName = paperExp.getName()+"_"+paperExp.getCourseNo()+"_"+ExamFileType.PAPER.getName()+DOCX_SUFFIX;
 			File file = new File(TEMP_FILE_EXP+File.separator+zipFileName+File.separator+paperfileName);
 			DocxProcessUtil.exportWordNew(paperExp, file,XAJD_TEMPLATE_PAPER);
 			DocxProcessUtil.processImage(zipFileName+File.separator+paperfileName,getPkgList(paperId));
@@ -41,7 +41,7 @@ public class xajdExportPaperService extends ExportPaperAbstractService{
 	public void downloadPaperAnswer(String paperId, String zipFileName)throws Exception {
 		PaperExp paperExp = initPaperExp(paperId);
 		if(paperExp!=null){
-			String answerFileName = 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);
 			DocxProcessUtil.exportWordNew(paperExp,file,XAJD_TEMPLATE_ANSWER);
 			DocxProcessUtil.processImage(zipFileName+File.separator+answerFileName,getPkgList(paperId));