1
0

2 Incheckningar 563f0f0444 ... 775801dfc1

Upphovsman SHA1 Meddelande Datum
  huangtf 775801dfc1 Merge branch 'master' of http://39.108.216.210:3000/zhuwei/bladex 7 månader sedan
  huangtf ed659b6acb 上期末支付为空设置0修改 7 månader sedan

+ 7 - 0
blade-service/blade-manager/src/main/java/com/mixsmart/utils/StringUtils.java

@@ -170,6 +170,13 @@ public class StringUtils {
         }
     }
 
+    public static String handleNullZero(Object obj, Object scale) {
+        if (obj == null || isEmpty(obj)) {
+            return number2StringZero("0",scale);
+        }
+        return number2StringZero(obj,scale);
+    }
+
     /**
      * 当值为null转化为“null”
      *

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

@@ -367,7 +367,7 @@ public class ExecutorMeter extends FormulaExecutor {
                          BigDecimal[] bmMoney = cm.getValue();
                          ipc.setContractAmount(bmMoney[0].toString());
                          ipc.setRevisedAmount(bmMoney[1].toString());
-                         ipc.setPreviousPeriodEndPay(StringUtils.handleNull(previousMoney.get(cm.getKey())));
+                         ipc.setPreviousPeriodEndPay(StringUtils.handleNullZero(previousMoney.get(cm.getKey()),tec.getScale()));
                          ipc.setCurrentPeriodPay(StringUtils.handleNull(currentMoney.get(cm.getKey())));
                          /*由已知求未知*/
                          ipc.calculate();