2 次代码提交 8af9823bea ... 3421f4e6b0

作者 SHA1 备注 提交日期
  huangtf 3421f4e6b0 Merge branch 'master' of http://39.108.216.210:3000/zhuwei/bladex 8 月之前
  huangtf 397086d83e 材料预付款的比例 8 月之前

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

@@ -221,11 +221,11 @@ public class ExecutorMeter extends FormulaExecutor {
                 int n=1;
                 for(Material m:materials){
                     m.setIndex(n++);
-                    m.setRatio(baseInfo.getDeductRatio()*100+"%");
+                    m.setRatio(StringUtils.number2StringZero(baseInfo.getDeductRatio(),tec.getPayRadicScale())+"%");
                     m.setAdvancePayment(StringUtils.number2StringZero(Double.parseDouble(m.getSum())*baseInfo.getDeductRatio(),2));
                 }
-                this.total=StringUtils.number2StringZero(materials.stream().mapToDouble(m->Double.parseDouble(m.getSum())).sum(),2);
-                this.totalAdvance=StringUtils.number2StringZero(materials.stream().mapToDouble(m->Double.parseDouble(m.getAdvancePayment())).sum(),2);
+                this.total=StringUtils.number2StringZero(materials.stream().mapToDouble(m->Double.parseDouble(m.getSum())).sum(),tec.getScale());
+                this.totalAdvance=StringUtils.number2StringZero(materials.stream().mapToDouble(m->Double.parseDouble(m.getAdvancePayment())).sum(),tec.getScale());
                 /*合计*/
                 Material summary= new Material();
                 summary.setMaterialName("合计");