|
@@ -230,24 +230,24 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
|
|
throw new StatusException("105004", "当前科目无主观题");
|
|
throw new StatusException("105004", "当前科目无主观题");
|
|
}
|
|
}
|
|
|
|
|
|
- OuterSubjectivePaperBean osb=new OuterSubjectivePaperBean();
|
|
|
|
|
|
+ OuterSubjectivePaperBean osb = new OuterSubjectivePaperBean();
|
|
osb.setExamId(examId);
|
|
osb.setExamId(examId);
|
|
osb.setSubjectCode(subjectCode);
|
|
osb.setSubjectCode(subjectCode);
|
|
osb.setSubjectName(course.getName());
|
|
osb.setSubjectName(course.getName());
|
|
|
|
|
|
- List<OuterSubjectivePaperQuestionBean> subPaperQuesList=new ArrayList<>();
|
|
|
|
|
|
+ List<OuterSubjectivePaperQuestionBean> subPaperQuesList = new ArrayList<>();
|
|
//所有试题信息
|
|
//所有试题信息
|
|
List<OuterQuestionBean> allQuestions = outletPaperStructService.getPaperStructQuestions(
|
|
List<OuterQuestionBean> allQuestions = outletPaperStructService.getPaperStructQuestions(
|
|
req.getExamId(), course.getCode(), QuestionCategory.SUBJECTIVE);
|
|
req.getExamId(), course.getCode(), QuestionCategory.SUBJECTIVE);
|
|
|
|
|
|
|
|
|
|
for (OuterQuestionBean subQues : subjectiveQuestions) {
|
|
for (OuterQuestionBean subQues : subjectiveQuestions) {
|
|
- OuterSubjectivePaperQuestionBean subPaperQues=new OuterSubjectivePaperQuestionBean();
|
|
|
|
|
|
+ OuterSubjectivePaperQuestionBean subPaperQues = new OuterSubjectivePaperQuestionBean();
|
|
//获取指定小题的题干相关信息
|
|
//获取指定小题的题干相关信息
|
|
QuestionCacheBean cachedQues = CacheHelper.getQuestion(examId, subjectCode, subQues.getPaperType(), subQues.getQuestionId());
|
|
QuestionCacheBean cachedQues = CacheHelper.getQuestion(examId, subjectCode, subQues.getPaperType(), subQues.getQuestionId());
|
|
- String strAnswer=getCorrectAnswer(subQues.getSubNumber(), subQues.getQuestionId(), cachedQues, allQuestions);
|
|
|
|
- String strParentBody=getParentBody(cachedQues);
|
|
|
|
- String strBody=getBody(subQues.getSubNumber(), subQues.getQuestionId(), cachedQues, allQuestions);
|
|
|
|
|
|
+ String strAnswer = getCorrectAnswer(subQues.getSubNumber(), subQues.getQuestionId(), cachedQues, allQuestions);
|
|
|
|
+ String strParentBody = getParentBody(cachedQues);
|
|
|
|
+ String strBody = getBody(subQues.getSubNumber(), subQues.getQuestionId(), cachedQues, allQuestions);
|
|
|
|
|
|
//注意:ComplexTextHandler类中有公共字段,需要多例,不能搞成单例,否则会出问题
|
|
//注意:ComplexTextHandler类中有公共字段,需要多例,不能搞成单例,否则会出问题
|
|
RichTextHandler answerComplexRichTextHandler = RichTextHandlerFactory.getHandler("complex");
|
|
RichTextHandler answerComplexRichTextHandler = RichTextHandlerFactory.getHandler("complex");
|
|
@@ -615,10 +615,10 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
|
|
/**
|
|
/**
|
|
* 获取当前小题的标准答案
|
|
* 获取当前小题的标准答案
|
|
*
|
|
*
|
|
- * @param curSubNumber 当前小题号
|
|
|
|
- * @param questionId 原小题id
|
|
|
|
- * @param cachedQues 带题干的试卷结构
|
|
|
|
- * @param allEqList 所有作答集合
|
|
|
|
|
|
+ * @param curSubNumber 当前小题号
|
|
|
|
+ * @param questionId 原小题id
|
|
|
|
+ * @param cachedQues 带题干的试卷结构
|
|
|
|
+ * @param allEqList 所有作答集合
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
private String getCorrectAnswer(Integer curSubNumber, String questionId,
|
|
private String getCorrectAnswer(Integer curSubNumber, String questionId,
|
|
@@ -648,16 +648,4 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
|
- String str1 ="111";
|
|
|
|
- String str2 ="222";
|
|
|
|
- String str3 ="111111";
|
|
|
|
- String str4 ="222222";
|
|
|
|
- String str5 ="222222dfsdffsd234234234234rwefsfsdfsdfaasfdsadfasdfsad";
|
|
|
|
- String str6 ="222222dfsdffsd234234234239rwefsfsdfsdfaasfdsadfasdfsad";
|
|
|
|
- System.out.println("1001110101011100111001101110101110100100001000000111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".length());
|
|
|
|
- System.out.println("9D5CE6EBA420717BE7E7D308B11F8207681B066C951D68F3994D19828F342474".length());
|
|
|
|
- System.out.println(String.format("str1=%s,str2=%s,str3=%s,str4=%s,str5=%s,str6=%s",
|
|
|
|
- str1.hashCode(),str2.hashCode(),str3.hashCode(),str4.hashCode(),str5.hashCode(),str6.hashCode()));
|
|
|
|
- }
|
|
|
|
}
|
|
}
|