|
@@ -1752,6 +1752,7 @@ public class PaperServiceImpl implements PaperService{
|
|
|
List<PaperDetailUnit> units = paperDetailUnitRepo.findByPaperOrderByNumber(paper);
|
|
|
if(units != null && units.size()>0){
|
|
|
double total = 0;
|
|
|
+ BigDecimal b1 = new BigDecimal(Double.toString(total));
|
|
|
for(PaperDetailUnit unit:units){
|
|
|
if(unit.getQuestion().getPublicity() == null){
|
|
|
unit.getQuestion().setPublicity(true);
|
|
@@ -1761,10 +1762,11 @@ public class PaperServiceImpl implements PaperService{
|
|
|
}
|
|
|
String factType = unit.getQuestion().getPublicity() + "-" + unit.getQuestion().getDifficulty();
|
|
|
if(needType.equals(factType)){
|
|
|
- total += unit.getScore();
|
|
|
+ BigDecimal b2 = new BigDecimal(Double.toString(unit.getScore()));
|
|
|
+ b1 = b1.add(b2);
|
|
|
}
|
|
|
}
|
|
|
- return total;
|
|
|
+ return b1.doubleValue();
|
|
|
}
|
|
|
return 0;
|
|
|
}
|