From 029463e2d9485eb07343b536a2b27b2360390347 Mon Sep 17 00:00:00 2001 From: winter Date: Fri, 16 Aug 2024 02:29:03 +0800 Subject: [PATCH] fix --- .../service/impl/WxRentContractServiceImpl.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 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 c0f27bef7..b33434738 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -2648,7 +2648,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { //跟扣点相比较 BigDecimal priceDecimal = rentTotal; - if (null != revenuePriceArrs) { + if (null != revenuePriceArrs && null != revenuePriceArrs[yearIndex]) { BigDecimal revenuePrice = new BigDecimal(revenuePriceArrs[yearIndex]); if (revenuePrice.compareTo(rentTotal) > 0 ) { priceDecimal = revenuePrice; @@ -2714,8 +2714,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { //计算资金分摊的比例 租金,商业管理费,营业管理费,物业费。每个科目税点不一样,这样分摊能降低成本 String[] moneyShareRates = new String[4]; BigDecimal rentPriceDecimal = new BigDecimal(rentPriceArrs[yearIndex]); - BigDecimal bussinessPriceDecimal = new BigDecimal(bussinessManagerPriceArrs[yearIndex]); - BigDecimal operaterPriceDecimal = new BigDecimal(operationManagerPriceArrs[yearIndex]); + BigDecimal bussinessPriceDecimal = new BigDecimal(0); + if (null != bussinessManagerPriceArrs && null != bussinessManagerPriceArrs[yearIndex]) { + bussinessPriceDecimal = new BigDecimal(bussinessManagerPriceArrs[yearIndex]); + } + BigDecimal operaterPriceDecimal = new BigDecimal(0); + if (null != operationManagerPriceArrs && null != operationManagerPriceArrs[yearIndex]) { + operaterPriceDecimal = new BigDecimal(operationManagerPriceArrs[yearIndex]); + } if (null != rentPriceArrs && null != bussinessManagerPriceArrs && null != operationManagerPriceArrs && rentPriceDecimal.compareTo(new BigDecimal(0)) > 0 && bussinessPriceDecimal.compareTo(new BigDecimal(0)) > 0 && operaterPriceDecimal.compareTo(new BigDecimal(0)) > 0) { BigDecimal total = rentPriceDecimal.add(bussinessPriceDecimal).add(operaterPriceDecimal);