|
|
@@ -1024,7 +1024,8 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
}
|
|
|
return BigDecimal.ZERO;
|
|
|
})
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add)
|
|
|
+ .setScale(0, RoundingMode.HALF_UP); // 四舍五入为整数
|
|
|
/*本期变更(数量)*/
|
|
|
change.setChangePeriodUnit(totalChangeUnit.stripTrailingZeros().toPlainString());
|
|
|
/*本期变更(金额)*/
|
|
|
@@ -1067,6 +1068,9 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*到本期末变更累计金额*/
|
|
|
BigDecimal prechangeMoney = new BigDecimal(StringUtils.isEmpty(preChangeForm.getChangeMoney())?"0":preChangeForm.getChangeMoney());
|
|
|
change.setChangeEndPeriodAmount((prechangeMoney.add(totalChangeAmount)).stripTrailingZeros().toPlainString());
|
|
|
+ }else {
|
|
|
+ change.setChangeEndPeriodUnit(totalChangeUnit.stripTrailingZeros().toPlainString());
|
|
|
+ change.setChangeEndPeriodAmount(totalChangeAmount.stripTrailingZeros().toPlainString());
|
|
|
}
|
|
|
}else {
|
|
|
change.setChangeEndPeriodUnit(totalChangeUnit.stripTrailingZeros().toPlainString());
|