|
@@ -852,7 +852,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
|
|
|
private boolean isLineStart(String content) {
|
|
private boolean isLineStart(String content) {
|
|
if (Validator.isNotEmpty(content)) {
|
|
if (Validator.isNotEmpty(content)) {
|
|
- if(isQuestionStart(content)||content.startsWith("A.")||content.startsWith("B.")||content.startsWith("C.")||content.startsWith("D.")||content.startsWith("E.")
|
|
|
|
|
|
+ if(isQuestionStart(content)||content.startsWith("А.")||content.startsWith("A.")||content.startsWith("B.")||content.startsWith("C.")||content.startsWith("D.")||content.startsWith("E.")
|
|
||content.startsWith("F.")||content.startsWith("正确答案")||content.startsWith("解题思路")||content.startsWith("考查考点")||content.startsWith("老师解答")
|
|
||content.startsWith("F.")||content.startsWith("正确答案")||content.startsWith("解题思路")||content.startsWith("考查考点")||content.startsWith("老师解答")
|
|
||content.startsWith("单选题模板")||content.startsWith("判读题模板")||content.startsWith("问答题模板")||content.startsWith("多选题题模板")){
|
|
||content.startsWith("单选题模板")||content.startsWith("判读题模板")||content.startsWith("问答题模板")||content.startsWith("多选题题模板")){
|
|
return true;
|
|
return true;
|
|
@@ -1050,15 +1050,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
//新题开头
|
|
//新题开头
|
|
qContent = qContent + content +"<br />";
|
|
qContent = qContent + content +"<br />";
|
|
}
|
|
}
|
|
- //第一个选项
|
|
|
|
- System.out.println(content);
|
|
|
|
- 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("А.")||content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
errorLog += "第" + index + "条题目内容错误\n";
|
|
errorLog += "第" + index + "条题目内容错误\n";
|
|
continue;
|
|
continue;
|
|
@@ -1073,17 +1066,21 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
if(optionsList.size()<1){
|
|
if(optionsList.size()<1){
|
|
bo1 = new QuestionChildAddBo();
|
|
bo1 = new QuestionChildAddBo();
|
|
bo1.setOptionsId(1L);
|
|
bo1.setOptionsId(1L);
|
|
- bo1.setContent(strContent.replace("A.", ""));
|
|
|
|
|
|
+ bo1.setContent(strContent.replace("A.", "").replace("А.", ""));
|
|
bo1.setImgUrl(imgUrl);
|
|
bo1.setImgUrl(imgUrl);
|
|
optionsList.add(bo1);
|
|
optionsList.add(bo1);
|
|
}else{
|
|
}else{
|
|
bo1 = optionsList.get(0);
|
|
bo1 = optionsList.get(0);
|
|
bo1.setImgUrl(imgUrl);
|
|
bo1.setImgUrl(imgUrl);
|
|
- bo1.setContent(strContent.replace("A.", ""));
|
|
|
|
|
|
+ bo1.setContent(strContent.replace("A.", "").replace("А.", ""));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//第二个选项
|
|
//第二个选项
|
|
if (content.startsWith("B.")||(nowPart==2&&!isLineStart(content))) {
|
|
if (content.startsWith("B.")||(nowPart==2&&!isLineStart(content))) {
|
|
|
|
+ if (optionsList.size()<1) {
|
|
|
|
+ errorLog += "第" + index + "条题目选项A错误\n";
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
if(nowPart!=2){
|
|
if(nowPart!=2){
|
|
strContent = "";
|
|
strContent = "";
|
|
}
|
|
}
|
|
@@ -1430,7 +1427,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
qContent = qContent + content +"<br />";
|
|
qContent = qContent + content +"<br />";
|
|
}
|
|
}
|
|
//第一个选项
|
|
//第一个选项
|
|
- if(content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
|
|
|
|
|
|
+ if(content.startsWith("А.")||content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
if (Validator.isEmpty(qContent)) {
|
|
errorLog += "第" + index + "条题目内容错误\n";
|
|
errorLog += "第" + index + "条题目内容错误\n";
|
|
continue;
|
|
continue;
|
|
@@ -1446,16 +1443,20 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
bo1 = new QuestionChildAddBo();
|
|
bo1 = new QuestionChildAddBo();
|
|
bo1.setOptionsId(1L);
|
|
bo1.setOptionsId(1L);
|
|
bo1.setImgUrl(imgUrl);
|
|
bo1.setImgUrl(imgUrl);
|
|
- bo1.setContent(strContent.replace("A.", ""));
|
|
|
|
|
|
+ bo1.setContent(strContent.replace("A.", "").replace("А.", ""));
|
|
optionsList.add(bo1);
|
|
optionsList.add(bo1);
|
|
}else{
|
|
}else{
|
|
bo1 = optionsList.get(0);
|
|
bo1 = optionsList.get(0);
|
|
bo1.setImgUrl(imgUrl);
|
|
bo1.setImgUrl(imgUrl);
|
|
- bo1.setContent(strContent.replace("A.", ""));
|
|
|
|
|
|
+ bo1.setContent(strContent.replace("A.", "").replace("А.", ""));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//第二个选项
|
|
//第二个选项
|
|
if (content.startsWith("B.")||(nowPart==2&&!isLineStart(content))) {
|
|
if (content.startsWith("B.")||(nowPart==2&&!isLineStart(content))) {
|
|
|
|
+ if (optionsList.size()<1) {
|
|
|
|
+ errorLog += "第" + index + "条题目选项A错误\n";
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
if(nowPart!=2){
|
|
if(nowPart!=2){
|
|
strContent = "";
|
|
strContent = "";
|
|
}
|
|
}
|