Prechádzať zdrojové kódy

上期末支付为空设置0修改

huangtf 7 mesiacov pred
rodič
commit
ed659b6acb

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