From 4681eacd16877e55448be00fd25b2e1d3e825f69 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 19 Apr 2019 17:19:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A7=9F=E8=B5=81=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E7=94=9F=E6=88=90=E8=B4=A6=E5=8D=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxRentContractServiceImpl.java | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 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 8654bf6b4..de76f89ec 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -762,17 +762,6 @@ public class WxRentContractServiceImpl implements WxRentContractService { priceArrs[i] = new BigDecimal(priceD).setScale(0, RoundingMode.HALF_EVEN).intValue(); } } - if (wxRentContract.getRentShopType().equals(EnumRentShopType.SHOP.getCode()) && - wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { - String rentInfo = wxRentContract.getRentInfo(); - JSONArray rentInfoArray = JSONArray.parseArray(rentInfo); - for (int i = 0; i < size; i++) { - Map shopInfo = new HashMap<>(); - JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); - shopInfo.put(rentInfoObject.getString("shopNumber"), 0); - shopInfos.add(shopInfo); - } - } int month = 12; int divide = lease / month; @@ -827,7 +816,21 @@ public class WxRentContractServiceImpl implements WxRentContractService { String shopInfoStr = null; if (shopInfo != null) { shopInfoStr = JSONObject.toJSONString(shopInfo); + } else { + if (wxRentContract.getRentShopType().equals(EnumRentShopType.SHOP.getCode()) && + wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { + String rentInfo = wxRentContract.getRentInfo(); + JSONArray rentInfoArray = JSONArray.parseArray(rentInfo); + int rentSize = rentInfoArray.size(); + Map shopInfoMap = new HashMap<>(); + for (int i = 0; i < rentSize; i++) { + JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); + shopInfoMap.put(rentInfoObject.getString("shopNumber"), 0); + } + shopInfoStr = JSONObject.toJSONString(shopInfoMap); + } } + Map resultMap = new HashedMap(); List resultList = new ArrayList<>(); int extralease = lease % receivePeriod; //余