| @@ -160,7 +160,7 @@ public class WxAgileContractController extends WxContractBaseController { | |||||
| shopList.add(shopId); | shopList.add(shopId); | ||||
| shopIdStr = shopIdStr +","+ shopId; | shopIdStr = shopIdStr +","+ shopId; | ||||
| } | } | ||||
| String rentArea = rentInfoObject.getString("rentArea"); | |||||
| String rentArea = rentInfoObject.getString("operationArea"); | |||||
| if (StringUtils.isNotBlank(rentArea)) { | if (StringUtils.isNotBlank(rentArea)) { | ||||
| rentAreaDecimal = rentAreaDecimal.add(new BigDecimal(rentArea)); | rentAreaDecimal = rentAreaDecimal.add(new BigDecimal(rentArea)); | ||||
| } | } | ||||
| @@ -170,7 +170,7 @@ public class WxPropertyContractController extends WxContractBaseController { | |||||
| return new ResultData("createType参数不能为空"); | return new ResultData("createType参数不能为空"); | ||||
| } | } | ||||
| if (wxPropertyContract.getCreateType().intValue() == EnumPropertyCreateType.BY_SHOP.getCode().intValue()) { | if (wxPropertyContract.getCreateType().intValue() == EnumPropertyCreateType.BY_SHOP.getCode().intValue()) { | ||||
| if (StringUtils.isBlank(wxPropertyContract.getRentArea()) || StringUtils.isBlank(wxPropertyContract.getShopIds())) { | |||||
| if (StringUtils.isBlank(wxPropertyContract.getShopIds())) { | |||||
| return new ResultData(Result.ERROR,"请选择店铺"); | return new ResultData(Result.ERROR,"请选择店铺"); | ||||
| } | } | ||||
| if (new BigDecimal(wxPropertyContract.getRentArea()).compareTo(new BigDecimal(0)) <= 0 ) { | if (new BigDecimal(wxPropertyContract.getRentArea()).compareTo(new BigDecimal(0)) <= 0 ) { | ||||
| @@ -350,10 +350,15 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| WxShop shopq = new WxShop(); | WxShop shopq = new WxShop(); | ||||
| shopq.updateTenantInfo(record); | shopq.updateTenantInfo(record); | ||||
| shopq.setIds(shopIds); | shopq.setIds(shopIds); | ||||
| List<WxShop> sh = wxShopService.selectList(shopq); | |||||
| if (null != sh) { | |||||
| record.setRentInfo(JSON.toJSONString(sh)); | |||||
| List<WxShop> shlist = wxShopService.selectList(shopq); | |||||
| BigDecimal rentArea = new BigDecimal(0); | |||||
| for (int i = 0 ; i< shlist.size(); i ++) { | |||||
| rentArea = rentArea.add(new BigDecimal(shlist.get(i).getOperationArea())); | |||||
| } | } | ||||
| if (null != shlist) { | |||||
| record.setRentInfo(JSON.toJSONString(shlist)); | |||||
| } | |||||
| record.setRentArea(rentArea.toPlainString()); | |||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "保存物业合同信息成功", record); | return new ResultData(Result.SUCCESS, "保存物业合同信息成功", record); | ||||
| } | } | ||||
| @@ -423,7 +423,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| for (int i = 0; i < size; i++) { | for (int i = 0; i < size; i++) { | ||||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | ||||
| Long shopId = rentInfoObject.getLong("id"); | Long shopId = rentInfoObject.getLong("id"); | ||||
| rentArea = rentArea.add(new BigDecimal(rentInfoObject.getString("rentArea"))); | |||||
| rentArea = rentArea.add(new BigDecimal(rentInfoObject.getString("operationArea"))); | |||||
| if (!shopList.contains(shopId)) { | if (!shopList.contains(shopId)) { | ||||
| shopList.add(shopId); | shopList.add(shopId); | ||||
| shopIdStr = shopIdStr +","+ shopId; | shopIdStr = shopIdStr +","+ shopId; | ||||