From ad13c289310a536f44db4d41f5f6541ec2c83e4c Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Wed, 24 Jan 2024 11:36:30 +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 | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 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 234aafb..b3bcfaa 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 @@ -7,9 +7,10 @@ import com.ruoyi.business.domain.vo.*; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.business.controller.utils.NumKit; -import com.ruoyi.business.controller.utils.StringKit; + +import com.ruoyi.common.utils.NumKit; import com.ruoyi.common.utils.PageUtils; +import com.ruoyi.common.utils.StringKit; import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.database.domain.*; import com.ruoyi.database.domain.dto.MetaRealEstateInfoDTO; @@ -65,8 +66,8 @@ public class BigScreenController extends BaseController { // querySyrkWrapper.ne("actual_user_type", 101); int actualUserSyrkCount = actualUserInfoService.count(); //实有房屋总数 - int countSyfw = realEstateInfoService.countSyfw(new MetaRealEstateInfo()); - +// int countSyfw = realEstateInfoService.countSyfw(new MetaRealEstateInfo()); + int countSyfw = realEstateInfoService.count(); //实有单位总数 int countSydw = actualUnitInfoService.count(); @@ -104,8 +105,8 @@ public class BigScreenController extends BaseController { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.between("longitude", startLongitude, endLongitude) .between("latitude", startLatitude, endLatitude); + queryWrapper.groupBy("real_estate_brief_address","building_name"); List list = realEstateInfoService.list(queryWrapper); - int count = realEstateInfoService.count(queryWrapper); List resultList = new ArrayList<>(); for (MetaRealEstateInfo info : list) { MetaRealEstateInfoDTO dto = new MetaRealEstateInfoDTO(); @@ -550,12 +551,13 @@ public class BigScreenController extends BaseController { }) .collect(Collectors.toList()); Map>> resultMap = modifiedEstateInfoList.stream() - .filter(info -> info.getHomeName().length() >= 3 && info.getHomeName().length() <= 4) + .filter(info -> info.getHomeName() != "0") .collect(Collectors.groupingBy( info -> { String homeName = info.getHomeName(); - return homeName.length() == 3 ? String.valueOf(homeName.charAt(0)) : - homeName.length() == 4 ? homeName.substring(0, 2) : null; +// return homeName.length() == 3 ? String.valueOf(homeName.charAt(0)) : +// homeName.length() == 4 ? homeName.substring(0, 2) : null; + return homeName; }, Collectors.mapping( info -> { @@ -607,14 +609,14 @@ public class BigScreenController extends BaseController { queryWrapper.eq("rental_housing_address", para); long count = housingInfoService.count(queryWrapper); //是否出租 - homeInfoVo.setIsRent(count > 0 ? "" : "出租"); + homeInfoVo.setIsRent(count > 0 ? "出租" : ""); // homeInfoVo.setPoliceDistrictCode(estateInfo.getPoliceDistrictCode()); buildUserInformationVo.setHomeInfo(homeInfoVo); QueryWrapper actualQueryWrapper = new QueryWrapper<>(); - actualQueryWrapper.eq("home_id", estateInfo == null ? null : estateInfo.getId()); + actualQueryWrapper.eq("habitation_address", estateInfo == null ? null : estateInfo.getRealEstateAddress()); List actualUserInfos = actualUserInfoService.list(actualQueryWrapper);