|
|
@@ -357,7 +357,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
while (i<paragraphList.size())
|
|
|
{
|
|
|
XWPFParagraph paragraph = paragraphList.get(i);
|
|
|
- content = paragraph.getText();
|
|
|
+ content = paragraph.getText().trim();
|
|
|
System.out.println(content);
|
|
|
if(Validator.isEmpty(content)){
|
|
|
System.out.println("换行");
|
|
|
@@ -437,7 +437,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
while (j<paragraphList.size())
|
|
|
{
|
|
|
String tempTxt = paragraphList.get(j).getText();
|
|
|
- if(Validator.isEmpty(tempTxt)||tempTxt.startsWith("E.")){
|
|
|
+ if(Validator.isEmpty(tempTxt)||tempTxt.startsWith("E.")||tempTxt.startsWith("正确答案")){
|
|
|
break;
|
|
|
}
|
|
|
q_content+=tempTxt;
|
|
|
@@ -455,7 +455,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
while (j<paragraphList.size())
|
|
|
{
|
|
|
String tempTxt = paragraphList.get(j).getText();
|
|
|
- if(Validator.isEmpty(tempTxt)||tempTxt.startsWith("F.")){
|
|
|
+ if(Validator.isEmpty(tempTxt)||tempTxt.startsWith("F.")||tempTxt.startsWith("正确答案")){
|
|
|
break;
|
|
|
}
|
|
|
q_content+=tempTxt;
|
|
|
@@ -473,7 +473,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
while (j<paragraphList.size())
|
|
|
{
|
|
|
String tempTxt = paragraphList.get(j).getText();
|
|
|
- if(Validator.isEmpty(tempTxt)||tempTxt.startsWith("G.")){
|
|
|
+ if(Validator.isEmpty(tempTxt)||tempTxt.startsWith("G.")||tempTxt.startsWith("正确答案")){
|
|
|
break;
|
|
|
}
|
|
|
q_content+=tempTxt;
|
|
|
@@ -482,8 +482,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
bo1.setContent(q_content);
|
|
|
optionsList.add(bo1);
|
|
|
}
|
|
|
- else if(content.startsWith("建匠答案")){
|
|
|
-
|
|
|
+ else if(content.startsWith("正确答案")){
|
|
|
+ String answerQuestion = content.replace("正确答案:", ";");
|
|
|
}
|
|
|
paragraph.getText();
|
|
|
}
|