[java]代码库
Set<TemplateDetail> setTemplateChapterDetail = new HashSet<TemplateDetail>();
for(int i=0;i<listChapterId.size();i++){
TemplateDetail enTemplateDetail = new TemplateDetail();
enTemplateDetail.setChapterId(listChapterId.get(i));
//比例系数和章节id的顺序是相一致的
enTemplateDetail.setScoreRatio(listPerScore.get(i));
for(int j=0;j<listDifficulty.size();j++){
int difficuly= Integer.parseInt(listDifficulty.get(j));
enTemplateDetail.setDifficultyRatio(difficuly);
for(int z=0;z<listQuestionId.size();z++){
QuestionTypes questionType = new QuestionTypes();
questionType.setId(listQuestionId.get(z));
enTemplateDetail.setQuestionType(questionType);
enTemplateDetail.setQuestionTypeScore(Double.parseDouble(chapterDifficultyQuestionList.get(z)));
setTemplateChapterDetail.add(enTemplateDetail);
}
}
}