|
@@ -5276,11 +5276,15 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
}
|
|
}
|
|
vo.setAmountCount(amountCount);
|
|
vo.setAmountCount(amountCount);
|
|
//取出总消耗
|
|
//取出总消耗
|
|
- Double costCountStr = records.get(0).getCostCount();
|
|
|
|
- vo.setCostCount(costCountStr);
|
|
|
|
|
|
+ Double costCount = records.get(0).getCostCount();
|
|
|
|
+ vo.setCostCount(costCount);
|
|
//用充值总数/总消耗
|
|
//用充值总数/总消耗
|
|
if (amountCount != 0) {
|
|
if (amountCount != 0) {
|
|
- vo.setRecoveryCount((amountCount / costCountStr)*100);
|
|
|
|
|
|
+ //防止double转成科学计数法
|
|
|
|
+ BigDecimal costBigDecimal = new BigDecimal(costCount);
|
|
|
|
+ BigDecimal amountBigDecimal = new BigDecimal(amountCount);
|
|
|
|
+ BigDecimal bd = amountBigDecimal.divide(costBigDecimal, 2, RoundingMode.HALF_UP);
|
|
|
|
+ vo.setRecoveryCount(bd.doubleValue());
|
|
}
|
|
}
|
|
return vo;
|
|
return vo;
|
|
}
|
|
}
|