|
@@ -58,6 +58,8 @@ import java.util.*;
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
+import static com.zhongzheng.common.utils.ToolsUtils.getEncoding;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 题库题目Service业务层处理
|
|
* 题库题目Service业务层处理
|
|
*
|
|
*
|
|
@@ -929,11 +931,6 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
boolean hasQuestion = false;
|
|
boolean hasQuestion = false;
|
|
for (XWPFParagraph paragraph : paragraphList) {
|
|
for (XWPFParagraph paragraph : paragraphList) {
|
|
content = paragraph.getText();
|
|
content = paragraph.getText();
|
|
- System.out.println(content);
|
|
|
|
- System.out.println("EEE");
|
|
|
|
- if(content.startsWith("2")){
|
|
|
|
- System.out.println("EEE");
|
|
|
|
- }
|
|
|
|
content = dealTxt(content);
|
|
content = dealTxt(content);
|
|
List<XWPFRun> runs = paragraph.getRuns();
|
|
List<XWPFRun> runs = paragraph.getRuns();
|
|
imgUrl = null;
|
|
imgUrl = null;
|
|
@@ -992,7 +989,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
QuestionAddBo addBo = new QuestionAddBo();
|
|
QuestionAddBo addBo = new QuestionAddBo();
|
|
qContent = removeNo(qContent);
|
|
qContent = removeNo(qContent);
|
|
if (Validator.isEmpty(qContent)) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
- errorLog += "第" + index + "条题目内容空白\n";
|
|
|
|
|
|
+ errorLog += "第" + index + "条题目内容错误\n";
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
QuestionAddBo bo = new QuestionAddBo();
|
|
QuestionAddBo bo = new QuestionAddBo();
|
|
@@ -1055,12 +1052,15 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
}
|
|
}
|
|
//第一个选项
|
|
//第一个选项
|
|
System.out.println(content);
|
|
System.out.println(content);
|
|
- System.out.println(content.length());
|
|
|
|
- System.out.println("FFF");
|
|
|
|
- System.out.println(content.startsWith("A."));
|
|
|
|
|
|
+ System.out.println(ToolsUtils.getEncoding(content));
|
|
|
|
+ /* System.out.println("FFF");
|
|
|
|
+ System.out.println(content.startsWith("A"));
|
|
|
|
+ System.out.println(ToolsUtils.getEncoding("A"));
|
|
|
|
+ System.out.println(content.startsWith("А"));
|
|
|
|
+ System.out.println(ToolsUtils.getEncoding("А"));*/
|
|
if(content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
|
|
if(content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
- errorLog += "第" + index + "条题目内容空白\n";
|
|
|
|
|
|
+ errorLog += "第" + index + "条题目内容错误\n";
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
if(nowPart!=1){
|
|
if(nowPart!=1){
|
|
@@ -1185,7 +1185,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
//答案和题型
|
|
//答案和题型
|
|
if (content.startsWith("正确答案:")||(nowPart==7&&!isLineStart(content))) {
|
|
if (content.startsWith("正确答案:")||(nowPart==7&&!isLineStart(content))) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
- errorLog += "第" + index + "条题目内容空白\n";
|
|
|
|
|
|
+ errorLog += "第" + index + "条题目内容错误\n";
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
if(nowPart!=7){
|
|
if(nowPart!=7){
|
|
@@ -1367,7 +1367,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
QuestionAddBo addBo = new QuestionAddBo();
|
|
QuestionAddBo addBo = new QuestionAddBo();
|
|
qContent = removeNo(qContent);
|
|
qContent = removeNo(qContent);
|
|
if (Validator.isEmpty(qContent)) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
- errorLog += "第" + index + "条题目内容空白\n";
|
|
|
|
|
|
+ errorLog += "第" + index + "条题目内容错误\n";
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
QuestionAddBo bo = new QuestionAddBo();
|
|
QuestionAddBo bo = new QuestionAddBo();
|
|
@@ -1432,7 +1432,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
//第一个选项
|
|
//第一个选项
|
|
if(content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
|
|
if(content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
- errorLog += "第" + index + "条题目内容空白\n";
|
|
|
|
|
|
+ errorLog += "第" + index + "条题目内容错误\n";
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
if(nowPart!=1){
|
|
if(nowPart!=1){
|
|
@@ -1557,7 +1557,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
//答案和题型
|
|
//答案和题型
|
|
if (content.startsWith("正确答案:")||(nowPart==7&&!isLineStart(content))) {
|
|
if (content.startsWith("正确答案:")||(nowPart==7&&!isLineStart(content))) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
- errorLog += "第" + index + "条题目内容空白\n";
|
|
|
|
|
|
+ errorLog += "第" + index + "条题目内容错误\n";
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
if(nowPart!=7){
|
|
if(nowPart!=7){
|