|
@@ -237,7 +237,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
Map<String, String> paperIds = checkAllCourseByExamId(exportModel.getExamId(), exportStructure.getExportType());
|
|
Map<String, String> paperIds = checkAllCourseByExamId(exportModel.getExamId(), exportStructure.getExportType());
|
|
if (exportStructure.getExportType() == ExportType.NORMAL) {
|
|
if (exportStructure.getExportType() == ExportType.NORMAL) {
|
|
if (paperIds.size() > 0 && exportModel.getExportContentList().contains(ExamFileType.PAPER_STRUCTURE_OBJECTIVE.name())) {
|
|
if (paperIds.size() > 0 && exportModel.getExportContentList().contains(ExamFileType.PAPER_STRUCTURE_OBJECTIVE.name())) {
|
|
- makePaperStructure(downloadDir, exportStructure.getExamName(), paperIds, exportStructure);
|
|
|
|
|
|
+ makePaperStructure(downloadDir, exportStructure.getExamName(), paperIds, exportStructure);//for export test
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -397,7 +397,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
List<ExamCourseRelationBean> examCourseDtoList = new ArrayList<ExamCourseRelationBean>();
|
|
List<ExamCourseRelationBean> examCourseDtoList = new ArrayList<ExamCourseRelationBean>();
|
|
GetExamCourseListReq req = new GetExamCourseListReq();
|
|
GetExamCourseListReq req = new GetExamCourseListReq();
|
|
req.setExamId(Long.valueOf(examId));
|
|
req.setExamId(Long.valueOf(examId));
|
|
- //req.setExamId(217L);//for export test
|
|
|
|
|
|
+ //req.setExamId(299L);//for export test
|
|
req.setCourseEnable(true);
|
|
req.setCourseEnable(true);
|
|
Long start = 1l;
|
|
Long start = 1l;
|
|
int count = 0;
|
|
int count = 0;
|
|
@@ -419,7 +419,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
for (ExamCourseRelationBean examCourseDto : examCourseDtoList) {
|
|
for (ExamCourseRelationBean examCourseDto : examCourseDtoList) {
|
|
ExtractConfig condition = new ExtractConfig();
|
|
ExtractConfig condition = new ExtractConfig();
|
|
condition.setExamId(examCourseDto.getExamId());
|
|
condition.setExamId(examCourseDto.getExamId());
|
|
- //condition.setExamId(523L);//for export online
|
|
|
|
|
|
+ //condition.setExamId(606L);//for export online
|
|
condition.setCourseCode(examCourseDto.getCourseCode());
|
|
condition.setCourseCode(examCourseDto.getCourseCode());
|
|
|
|
|
|
ExtractConfig extractConfig = extractConfigService.findConfig(condition);
|
|
ExtractConfig extractConfig = extractConfigService.findConfig(condition);
|
|
@@ -427,6 +427,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
// logger.warn("examId:" + examId + " courseCode:" + examCourseDto.getCourseCode());
|
|
// logger.warn("examId:" + examId + " courseCode:" + examCourseDto.getCourseCode());
|
|
// continue;
|
|
// continue;
|
|
// }
|
|
// }
|
|
|
|
+
|
|
if (extractConfig == null) {
|
|
if (extractConfig == null) {
|
|
throw new RuntimeException("该考试下的课程“" + examCourseDto.getCourseName() + "”没有制定调卷规则,不能批量导出,请保存调卷规则生成文件");
|
|
throw new RuntimeException("该考试下的课程“" + examCourseDto.getCourseName() + "”没有制定调卷规则,不能批量导出,请保存调卷规则生成文件");
|
|
}
|
|
}
|
|
@@ -434,6 +435,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
throw new RuntimeException("该考试下的课程“" + examCourseDto.getCourseName() + "”考试文件没有生成,不能批量导出,请保存调卷规则生成文件");
|
|
throw new RuntimeException("该考试下的课程“" + examCourseDto.getCourseName() + "”考试文件没有生成,不能批量导出,请保存调卷规则生成文件");
|
|
}
|
|
}
|
|
checkExamFileExists(examId, examCourseDto.getCourseCode(), exportType, examCourseDto.getCourseName());
|
|
checkExamFileExists(examId, examCourseDto.getCourseCode(), exportType, examCourseDto.getCourseName());
|
|
|
|
+
|
|
List<ExamPaper> examPapers = extractConfig.getExamPaperList();
|
|
List<ExamPaper> examPapers = extractConfig.getExamPaperList();
|
|
if (examPapers == null || examPapers.size() < 1) {
|
|
if (examPapers == null || examPapers.size() < 1) {
|
|
throw new RuntimeException("该考试下的课程“" + examCourseDto.getCourseName() + "”没有绑定试卷。");
|
|
throw new RuntimeException("该考试下的课程“" + examCourseDto.getCourseName() + "”没有绑定试卷。");
|
|
@@ -519,7 +521,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
String paperId = entry.getKey();
|
|
String paperId = entry.getKey();
|
|
String paperType = entry.getValue();
|
|
String paperType = entry.getValue();
|
|
logger.info(index + " - 处理试卷:" + paperId);
|
|
logger.info(index + " - 处理试卷:" + paperId);
|
|
- PaperExp paperExp = initPaperExpService.initPaperExp(paperId);
|
|
|
|
|
|
+ PaperExp paperExp = initPaperExpService.initPaperExp(paperId);//for export test
|
|
logger.info("处理客观题...");
|
|
logger.info("处理客观题...");
|
|
//添加客观题
|
|
//添加客观题
|
|
List<PaperDetailExp> objectiveDetails = exportPaperAbstractService.getAllObjectiveDetails(paperExp);
|
|
List<PaperDetailExp> objectiveDetails = exportPaperAbstractService.getAllObjectiveDetails(paperExp);
|