weiwenhai 6 éve
szülő
commit
565ccb116a

+ 4 - 2
examcloud-core-questions-service/src/main/java/cn/com/qmth/examcloud/core/questions/service/export/ExportPaperAbstractService.java

@@ -6,6 +6,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -916,7 +917,7 @@ public abstract class ExportPaperAbstractService {
     
     public String appendScoreToQuestionBodyHtml(String quesBodyHtml,double score){
     	String html = quesBodyHtml.replaceAll("<p>", "").replaceAll("</p>", "");
-    	html = "<P>" + html + "(" + score + ")分</p>"; 
+    	html = "<P>" + html + "(" + score + "分)</p>";
     	return html;
     }
     
@@ -1042,7 +1043,8 @@ public abstract class ExportPaperAbstractService {
    		for(PaperDetailExp paperDetailExp:paperDetailExps){
    			String title = "";
    			String titleDetail = null;
-   			String totalScore = BigDecimal.valueOf(paperDetailExp.getScore()).stripTrailingZeros().toPlainString();
+   			DecimalFormat decimalFormat = new DecimalFormat("#.#");
+   			String totalScore = decimalFormat.format(paperDetailExp.getScore());
    			QuesStructType type = paperDetailExp.getPaperDetailUnits().get(0).getQuestionType();
    			String questionScore = checkPaperDetailUnitScore(paperDetailExp);
    			if(questionScore!=null){