|
@@ -490,13 +490,16 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
question.setQuesAnswer(answer);
|
|
question.setQuesAnswer(answer);
|
|
}else{
|
|
}else{
|
|
String [] order = optionOrder.split(",");
|
|
String [] order = optionOrder.split(",");
|
|
|
|
+ String answer = "";
|
|
for(int i = 0;i < order.length;i++){
|
|
for(int i = 0;i < order.length;i++){
|
|
for(QuesOption quesOption : quesOptions){
|
|
for(QuesOption quesOption : quesOptions){
|
|
if(order[i].equals(quesOption.getNumber()) && quesOption.getIsCorrect() == 1){
|
|
if(order[i].equals(quesOption.getNumber()) && quesOption.getIsCorrect() == 1){
|
|
- question.setQuesAnswer(CommonUtils.getOptionNum(i));
|
|
|
|
|
|
+ answer += CommonUtils.getOptionNum(i);
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ question.setQuesAnswer(answer);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -509,6 +512,10 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
String msg = "";
|
|
String msg = "";
|
|
Map<String, Object> quesMap = new HashMap<String, Object>();
|
|
Map<String, Object> quesMap = new HashMap<String, Object>();
|
|
PaperDetailUnit paperDetailUnit = paperDetailUnitRepo.findOne(paperDetailUnitId);
|
|
PaperDetailUnit paperDetailUnit = paperDetailUnitRepo.findOne(paperDetailUnitId);
|
|
|
|
+ List<PaperDetailUnit> paperDetailUnits = new ArrayList<PaperDetailUnit>();
|
|
|
|
+ paperDetailUnits.add(paperDetailUnit);
|
|
|
|
+ //设置答案
|
|
|
|
+ setAnswer(paperDetailUnits);
|
|
//重新对选择题option进行排序(多选、单选、套题下选择题)
|
|
//重新对选择题option进行排序(多选、单选、套题下选择题)
|
|
reorderChoicequestionOption(paperDetailUnit);
|
|
reorderChoicequestionOption(paperDetailUnit);
|
|
Question ques = paperDetailUnit.getQuestion();
|
|
Question ques = paperDetailUnit.getQuestion();
|
|
@@ -525,6 +532,10 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
dto.setSubQuestions(subQuesDtos);
|
|
dto.setSubQuestions(subQuesDtos);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(ques.getQuestionType() == QuesStructType.SINGLE_ANSWER_QUESTION
|
|
|
|
+ ||ques.getQuestionType() == QuesStructType.MULTIPLE_ANSWER_QUESTION){
|
|
|
|
+ dto.setQuesAnswer(ques.getQuesAnswer());
|
|
|
|
+ }
|
|
msg = "success";
|
|
msg = "success";
|
|
quesMap.put("quesDto", dto);
|
|
quesMap.put("quesDto", dto);
|
|
quesMap.put("msg", msg);
|
|
quesMap.put("msg", msg);
|