From 3ce971709a0cdf62d92628cdc16fdb119018ccf8 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Tue, 3 Sep 2019 14:39:56 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=90=88=E5=90=8C][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxRentContractServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 65d26fd38..b7d6bdba2 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -2010,7 +2010,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { String ratio = new BigDecimal(integers.get(i)).divide(new BigDecimal(100)).toPlainString(); result.put("adjustRatio" + i, ratio); result.put("adjustPeriod" + i, wxRentContract.getAdjustPeriod()); - String payRatio = new BigDecimal(wxRentContract.getPayRatio()).divide(new BigDecimal(100)).toPlainString(); + Integer tempPayRatio = Optional.ofNullable(wxRentContract.getPayRatio()).orElse(0); + String payRatio = new BigDecimal(tempPayRatio).divide(new BigDecimal(100)).toPlainString(); result.put("payRatio" + i, payRatio); } @@ -2039,7 +2040,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { result.put("rentalEndDateDay" + count, enddate.substring(8)); result.put("adjustRatio" + count, wxRentContract.getAdjustRatio()); result.put("adjustPeriod" + count, wxRentContract.getAdjustPeriod()); - String payRatio = new BigDecimal(wxRentContract.getPayRatio()).divide(new BigDecimal(100)).toPlainString(); + Integer tempPayRatio = Optional.ofNullable(wxRentContract.getPayRatio()).orElse(0); + String payRatio = new BigDecimal(tempPayRatio).divide(new BigDecimal(100)).toPlainString(); result.put("payRatio" + count, payRatio); }