From 75f0a2a57e1c5d34bc6a8a2f6c46838ac7467b68 Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Thu, 11 Jan 2024 16:37:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E6=9C=89=E6=88=BF=E5=B1=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BigScreenController.java | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java b/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java index afbef4d..ecc910f 100644 --- a/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java +++ b/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java @@ -328,10 +328,25 @@ public class BigScreenController extends BaseController { public AjaxResult buildRealEstate(@ApiParam("楼栋地址") @RequestParam String para) { try { + int index = para.indexOf("幢"); + String buildName = null; + if (index != -1 && index > 0 ){ + buildName = String.valueOf(para.charAt(index-1)); + para = para.substring(index - 1); + } QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.like("real_estate_address", para); + queryWrapper.eq("building_name",buildName); int a = realEstateInfoService.count(queryWrapper); - + List list = realEstateInfoService.list(queryWrapper); + int spCount = 0; + for (MetaRealEstateInfo metaRealEstateInfo : list){ + int index1 = metaRealEstateInfo.getRealEstateAddress().indexOf("商铺"); + if (index1 != -1){ + spCount++; + } + } + int zzCount = a-spCount; //todo 目前都是写死的 BuildInformationVo buildInformationVo = new BuildInformationVo(); buildInformationVo.setCount(StringKit.toString(a)); @@ -341,8 +356,8 @@ public class BigScreenController extends BaseController { int countRental = realEstateInfoService.countRentalHousing(metaPara); buildInformationVo.setCzfCount(StringKit.toString(countRental)); buildInformationVo.setQzfCount("0"); - buildInformationVo.setZzCount("0"); - buildInformationVo.setSpCount("0"); + buildInformationVo.setZzCount(StringKit.toString(zzCount)); + buildInformationVo.setSpCount(StringKit.toString(spCount)); buildInformationVo.setSzlyCount("0"); buildInformationVo.setKzCount("0");