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