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; //余