瀏覽代碼

阅卷端接口修改7

weiwenhai 7 年之前
父節點
當前提交
eb1d1111e6

+ 2 - 2
cqb-paper/src/main/java/com/qmth/cqb/paper/service/impl/ExtractConfigServiceImpl.java

@@ -1050,12 +1050,12 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
 	public String startWithP(String s,Integer number,boolean option){
 		if(number == -2){
 			if(s.startsWith("<p>")){
-				s = s.replaceAll("<p>","<p style=\"margin-left:40px;\">").replaceFirst("<p style=\"margin-left:40px;\">", "<p style=\"margin-left:20px;\">");
+				s = s.replaceAll("<p>","<p style=\"margin-left:40px;\">").replaceAll("<p style=\"margin-left:40px;\">", "<p style=\"margin-left:20px;\">");
 			}else{
 				s = "<p style=\"margin-left:20px;color:red;\">" + s + "</p>";
 			}
 		}
-		if(number == -1){
+		else if(number == -1){
 			if(s.startsWith("<p>")){
 				s = s.replaceAll("<p>","<p style=\"margin-left:40px;\">").replaceFirst("<p style=\"margin-left:40px;\">", "<p style=\"margin-left:20px;\">" + "答案:");
 			}else{