diff --git a/mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java b/mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java index 6d91f92f7..b1e055974 100644 --- a/mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java +++ b/mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java @@ -63,7 +63,11 @@ public class WxRentContractHelper { priceArr[i] = new BigDecimal(priceStr).multiply(new BigDecimal(rentArea)).multiply(new BigDecimal(100)).longValue(); } List priceList = computeRatioByShop(rentInfoArray,wxRentContract.getBussinessManagementFeeRatioWay(),priceArr,feeRatioField); - return calcuteRatioByPart(priceList, feeRatioField); + if (null != priceList) { + return calcuteRatioByPart(priceList, feeRatioField); + }else { + return null; + } }else { String rentArea = wxRentContract.getRentArea(); if (rentArea == null || rentArea.equalsIgnoreCase("NaN")) { @@ -93,6 +97,7 @@ public class WxRentContractHelper { return calcuteRentPriceByJoin(wxRentContract); } + //计算单个店铺每年租金基数(分铺录入) public static List computeRentPriceByShop(WxRentContract wxRentContract) { JSONArray rentInfoArray = JSONArray.parseArray(wxRentContract.getRentInfo()); long[] priceArr = new long[rentInfoArray.size()]; @@ -318,7 +323,10 @@ public class WxRentContractHelper { //大于一年 JSONObject rentInfoObject = rentInfoArray.getJSONObject(0); JSONArray adjustRatio = rentInfoObject.getJSONArray(ratioKey);//[100,200] - return computeRatioFromRentInfo(priceList, rentInfoArray, ratioWayType, adjustRatio.size(), ratioKey); + if (null != adjustRatio) { + return computeRatioFromRentInfo(priceList, rentInfoArray, ratioWayType, adjustRatio.size(), ratioKey); + } + return null; } //计算年调整后的某项计费