|
@@ -326,8 +326,9 @@ public abstract class ExportPaperAbstractService {
|
|
|
if(rObj.getClass().equals(R.class)){
|
|
|
List<Object> rContent = ((R)rObj).getContent();
|
|
|
for(Object tObj:rContent){
|
|
|
- if (tObj instanceof JAXBElement)
|
|
|
- tObj = ((JAXBElement<?>) tObj).getValue();
|
|
|
+ if (tObj instanceof JAXBElement){
|
|
|
+ tObj = ((JAXBElement<?>) tObj).getValue();
|
|
|
+ }
|
|
|
if(tObj.getClass().equals(Text.class)){
|
|
|
Text text = (Text)tObj;
|
|
|
String str = text.getValue();
|
|
@@ -341,31 +342,29 @@ public abstract class ExportPaperAbstractService {
|
|
|
text.setValue(str);
|
|
|
//3
|
|
|
Pattern pattern = Pattern.compile("##\\d{1,}##");
|
|
|
- Matcher m = pattern.matcher(str);
|
|
|
- while(m.find()){
|
|
|
- int curNum = num + index;
|
|
|
- String a = m.group();
|
|
|
- str = str.replaceAll(a, "___"+(curNum)+"___");
|
|
|
- text.setValue(str);
|
|
|
- index++;
|
|
|
- }
|
|
|
- //4
|
|
|
- /*if(str.startsWith("#") || str.equals("___")){
|
|
|
- curMap.put(cur,str);
|
|
|
- text.setValue("");
|
|
|
- }*/
|
|
|
- //5
|
|
|
- if(str.matches("^\\d{1,}$")){
|
|
|
- String preStr = curMap.get(cur - 1);
|
|
|
- int curNum = num + index;
|
|
|
- if(!StringUtils.isEmpty(preStr) && preStr.startsWith("#")){
|
|
|
- text.setValue("___"+(curNum)+"___");
|
|
|
- }else{
|
|
|
- text.setValue(curNum+"");
|
|
|
- }
|
|
|
- index++;
|
|
|
- }
|
|
|
- cur++;
|
|
|
+ Matcher m = pattern.matcher(str);
|
|
|
+ while(m.find()){
|
|
|
+ int curNum = num + index;
|
|
|
+ String a = m.group();
|
|
|
+ str = str.replaceAll(a, "___"+(curNum)+"___");
|
|
|
+ text.setValue(str);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ //4
|
|
|
+ /*if(str.startsWith("#") || str.equals("___")){
|
|
|
+ curMap.put(cur,str);
|
|
|
+ text.setValue("");
|
|
|
+ }*/
|
|
|
+ //5
|
|
|
+ if(str.matches("^\\d{1,}$")){
|
|
|
+ String preStr = curMap.get(cur - 1);
|
|
|
+ int curNum = num + index;
|
|
|
+ if(!StringUtils.isEmpty(preStr) && preStr.startsWith("#")){
|
|
|
+ text.setValue("___"+(curNum)+"___");
|
|
|
+ }
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ cur++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -596,11 +595,11 @@ public abstract class ExportPaperAbstractService {
|
|
|
if (type == QuesStructType.SINGLE_ANSWER_QUESTION) {
|
|
|
title = "(本大题共" + paperDetailExp.getUnitCount() + "小题,"
|
|
|
+ scoreString + "共" + totalScore + "分)";
|
|
|
- titleDetail = "在每小题列出的备选项中只有一个符号合题目要求的,请将其选出并将“答题卡”的相应代码涂黑,错涂、多涂或未涂均无分";
|
|
|
+ titleDetail = "在每小题列出的备选项中只有一个符合题目要求的,请将其选出并将“答题卡”的相应代码涂黑,错涂、多涂或未涂均无分";
|
|
|
} else if (type == QuesStructType.MULTIPLE_ANSWER_QUESTION) {
|
|
|
title = "(本大题共" + paperDetailExp.getUnitCount() + "小题,"
|
|
|
+ scoreString + "共" + totalScore+ "分)";
|
|
|
- titleDetail = "在每小题列出的备选项中有一个或多个符号合题目要求的,请将符合项选出并将“答题卡”的相应代码涂黑";
|
|
|
+ titleDetail = "在每小题列出的备选项中有一个或多个符合题目要求的,请将符合项选出并将“答题卡”的相应代码涂黑";
|
|
|
} else if (type == QuesStructType.BOOL_ANSWER_QUESTION) {
|
|
|
title = "(本大题共" + paperDetailExp.getUnitCount() + "小题,"
|
|
|
+ scoreString + "共" + totalScore+ "分。"
|