huangtf 8 сар өмнө
parent
commit
4c59af7e81

+ 3 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -724,6 +724,8 @@ public class ExecutorMeter extends FormulaExecutor {
                         /*每一章需要留一行做小计,其他要填充空白行*/
                         SubInterimMeterPaySummary summary=  new SubInterimMeterPaySummary("小计");
                         summary.setCurrentPeriodEndPay(tmp.stream().map(SubInterimMeterPaySummary::getCurrentPeriodEndPay).filter(BaseUtils::isNumber).map(BigDecimal::new).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
+                        summary.setCurrentPeriodEndPay(StringUtils.number2StringZero(summary.getCurrentPeriodEndPay(),tec.getScale()));
+
                         int over = size*capacity-1-tmp.size();
                         if(over>0){
                             /*填充空白行*/
@@ -852,7 +854,7 @@ public class ExecutorMeter extends FormulaExecutor {
             if(dataList.size()>0){
                 InterimMeterPaySummary summary = new InterimMeterPaySummary("合计");
                 double sum=dataList.stream().map(InterimMeterPaySummary::getMoney).filter(StringUtils::isNumber).mapToDouble(Double::parseDouble).sum();
-                summary.setMoney(StringUtils.number2StringZero(sum,2));
+                summary.setMoney(StringUtils.number2StringZero(sum,tec.getScale()));
                 dataList.add(summary);
             }
             putOut(InterimMeterPaySummary.class);