2 Commity 8af9823bea ... 3421f4e6b0

Autor SHA1 Wiadomość Data
  huangtf 3421f4e6b0 Merge branch 'master' of http://39.108.216.210:3000/zhuwei/bladex 8 miesięcy temu
  huangtf 397086d83e 材料预付款的比例 8 miesięcy temu

+ 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("合计");