|
@@ -188,6 +188,7 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
}
|
|
}
|
|
Course course = courseRepo.findFirstByCodeAndOrgId(extractConfig.getCourseCode(),extractConfig.getOrgId());
|
|
Course course = courseRepo.findFirstByCodeAndOrgId(extractConfig.getCourseCode(),extractConfig.getOrgId());
|
|
extractConfig.setCourse(course);
|
|
extractConfig.setCourse(course);
|
|
|
|
+ extractConfig.setCourseName(course.getName());
|
|
Map<String,String> newFinishedPaperIdMap = makePaperByConfig(extractConfig);
|
|
Map<String,String> newFinishedPaperIdMap = makePaperByConfig(extractConfig);
|
|
extractConfig.setFinishedPaperIdMap(newFinishedPaperIdMap);
|
|
extractConfig.setFinishedPaperIdMap(newFinishedPaperIdMap);
|
|
extractConfig.setIfFinish((short)1);
|
|
extractConfig.setIfFinish((short)1);
|
|
@@ -332,11 +333,11 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
for (Map.Entry<String, Paper> entry : paperMap.entrySet()) {
|
|
for (Map.Entry<String, Paper> entry : paperMap.entrySet()) {
|
|
String key = entry.getKey();
|
|
String key = entry.getKey();
|
|
//根据原有试卷重新组卷得到新试卷
|
|
//根据原有试卷重新组卷得到新试卷
|
|
- Paper newPaper = this.recombinationPaper(entry.getValue(),
|
|
|
|
|
|
+ /*Paper newPaper = this.recombinationPaper(entry.getValue(),
|
|
PaperType.PREVIEW,
|
|
PaperType.PREVIEW,
|
|
extractConfig.getScrambling_the_question_order(),
|
|
extractConfig.getScrambling_the_question_order(),
|
|
- extractConfig.getScrambling_the_option_order());
|
|
|
|
- finishedPaperIdMap.put(key, newPaper.getId());
|
|
|
|
|
|
+ extractConfig.getScrambling_the_option_order());*/
|
|
|
|
+ finishedPaperIdMap.put(key, entry.getValue().getId());
|
|
}
|
|
}
|
|
return finishedPaperIdMap;
|
|
return finishedPaperIdMap;
|
|
}
|
|
}
|
|
@@ -1105,5 +1106,25 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
}
|
|
}
|
|
return s;
|
|
return s;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<String> findCourseByExtractConfig(Long examId,String orgId) {
|
|
|
|
+ List<String> courseCodeList = new ArrayList<String>();
|
|
|
|
+ if(examId == null){
|
|
|
|
+ throw new StatusException("Q-","examId is null");
|
|
|
|
+ }
|
|
|
|
+ Query query = new Query();
|
|
|
|
+ query.addCriteria(Criteria.where("orgId").is(orgId));
|
|
|
|
+ query.addCriteria(Criteria.where("examId").is(examId));
|
|
|
|
+ List<ExtractConfig> extractConfigList = this.mongoTemplate.find(query, ExtractConfig.class);
|
|
|
|
+ if(extractConfigList != null && extractConfigList.size()>0){
|
|
|
|
+ for(ExtractConfig extractConfig:extractConfigList){
|
|
|
|
+ courseCodeList.add(extractConfig.getCourseCode());
|
|
|
|
+ }
|
|
|
|
+ return courseCodeList;
|
|
|
|
+ }
|
|
|
|
+ return courseCodeList;
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|