|
|
|
@ -7,10 +7,12 @@ 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.common.utils.NumKit;
|
|
|
|
|
import com.ruoyi.common.utils.StringKit;
|
|
|
|
|
import com.ruoyi.business.controller.utils.NumKit;
|
|
|
|
|
import com.ruoyi.business.controller.utils.StringKit;
|
|
|
|
|
import com.ruoyi.common.utils.PageUtils;
|
|
|
|
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
|
|
|
|
import com.ruoyi.database.domain.*;
|
|
|
|
|
import com.ruoyi.database.domain.dto.MetaRealEstateInfoDTO;
|
|
|
|
|
import com.ruoyi.database.service.*;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
@ -19,10 +21,7 @@ import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -95,6 +94,29 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/boundary")
|
|
|
|
|
@ApiOperation("边界列表")
|
|
|
|
|
public TableDataInfo<MetaRealEstateInfo> list(
|
|
|
|
|
@RequestParam("startLongitude") Double startLongitude,
|
|
|
|
|
@RequestParam("endLongitude") Double endLongitude,
|
|
|
|
|
@RequestParam("startLatitude") Double startLatitude,
|
|
|
|
|
@RequestParam("endLatitude") Double endLatitude) {
|
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
queryWrapper.between("longitude", startLongitude, endLongitude)
|
|
|
|
|
.between("latitude", startLatitude, endLatitude);
|
|
|
|
|
List<MetaRealEstateInfo> list = realEstateInfoService.list(queryWrapper);
|
|
|
|
|
int count = realEstateInfoService.count(queryWrapper);
|
|
|
|
|
List<MetaRealEstateInfoDTO> resultList = new ArrayList<>();
|
|
|
|
|
for (MetaRealEstateInfo info : list) {
|
|
|
|
|
MetaRealEstateInfoDTO dto = new MetaRealEstateInfoDTO();
|
|
|
|
|
org.springframework.beans.BeanUtils.copyProperties(info, dto);
|
|
|
|
|
String concatenatedAddress = info.getRealEstateBriefAddress() + info.getBuildingName() + "幢";
|
|
|
|
|
dto.setConcatenatedAddress(concatenatedAddress);
|
|
|
|
|
resultList.add(dto);
|
|
|
|
|
}
|
|
|
|
|
TableDataInfo dataTable = getDataTable(resultList);
|
|
|
|
|
return dataTable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping
|
|
|
|
|
@ApiOperation("常驻人员列表")
|
|
|
|
@ -351,35 +373,35 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
if (index != -1) {
|
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
|
if (Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {// 检查字符是否为数字
|
|
|
|
|
buildName = para.substring(i,index);// 返回有数字的字符串
|
|
|
|
|
buildName = para.substring(i, index);// 返回有数字的字符串
|
|
|
|
|
}
|
|
|
|
|
if (!Pattern.matches("\\d", String.valueOf(para.charAt(i)))){
|
|
|
|
|
if (!Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
|
if (index1 != -1 ){
|
|
|
|
|
para = para.substring(0,index1);
|
|
|
|
|
if (index1 != -1) {
|
|
|
|
|
para = para.substring(0, index1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
queryWrapper.eq("real_estate_brief_address",para);
|
|
|
|
|
queryWrapper.eq("building_name",buildName);
|
|
|
|
|
queryWrapper.eq("real_estate_brief_address", para);
|
|
|
|
|
queryWrapper.eq("building_name", buildName);
|
|
|
|
|
int a = realEstateInfoService.count(queryWrapper);
|
|
|
|
|
List<MetaRealEstateInfo> list = realEstateInfoService.list(queryWrapper);
|
|
|
|
|
int spCount = 0;
|
|
|
|
|
int kzCount = 0;
|
|
|
|
|
for (MetaRealEstateInfo metaRealEstateInfo : list){
|
|
|
|
|
for (MetaRealEstateInfo metaRealEstateInfo : list) {
|
|
|
|
|
int index1 = metaRealEstateInfo.getRealEstateAddress().indexOf("商铺");
|
|
|
|
|
if (index1 != -1){
|
|
|
|
|
if (index1 != -1) {
|
|
|
|
|
spCount++;
|
|
|
|
|
}
|
|
|
|
|
Integer count = actualUserInfoService.lambdaQuery().eq(MetaActualUserInfo::getHabitationAddress, metaRealEstateInfo.getRealEstateAddress()).count();
|
|
|
|
|
if (count == 0){
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
kzCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int zzCount = a-spCount;
|
|
|
|
|
int zzCount = a - spCount;
|
|
|
|
|
//todo 目前都是写死的
|
|
|
|
|
BuildInformationVo buildInformationVo = new BuildInformationVo();
|
|
|
|
|
buildInformationVo.setCount(StringKit.toString(a));
|
|
|
|
@ -410,22 +432,22 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
if (index != -1) {
|
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
|
if (Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {// 检查字符是否为数字
|
|
|
|
|
buildName = para.substring(i,index);// 返回有数字的字符串
|
|
|
|
|
buildName = para.substring(i, index);// 返回有数字的字符串
|
|
|
|
|
}
|
|
|
|
|
if (!Pattern.matches("\\d", String.valueOf(para.charAt(i)))){
|
|
|
|
|
if (!Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
|
if (index1 != -1 ){
|
|
|
|
|
para = para.substring(0,index1);
|
|
|
|
|
if (index1 != -1) {
|
|
|
|
|
para = para.substring(0, index1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 创建查询条件,使用模糊查询
|
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapperEstate = new QueryWrapper<>();
|
|
|
|
|
// queryWrapperEstate.like("real_estate_address", para); // 你需要替换成实际的模糊查询条件
|
|
|
|
|
queryWrapperEstate.eq("real_estate_brief_address", para);
|
|
|
|
|
queryWrapperEstate.eq("building_name",buildName);
|
|
|
|
|
queryWrapperEstate.eq("building_name", buildName);
|
|
|
|
|
// 执行查询
|
|
|
|
|
List<MetaRealEstateInfo> realEstateInfos = realEstateInfoService.list(queryWrapperEstate);
|
|
|
|
|
|
|
|
|
@ -491,7 +513,7 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
@PostMapping("/buildStructure")
|
|
|
|
|
@ApiOperation("楼栋信息:房屋结构")
|
|
|
|
|
public AjaxResult buildStructure(
|
|
|
|
|
@ApiParam(value = "楼栋地址" ) @RequestParam String para,
|
|
|
|
|
@ApiParam(value = "楼栋地址") @RequestParam String para,
|
|
|
|
|
@ApiParam(value = "单元") @RequestParam String unit) {
|
|
|
|
|
try {
|
|
|
|
|
//获取到房屋数据的实际地址
|
|
|
|
@ -501,21 +523,21 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
if (index != -1) {
|
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
|
if (Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {// 检查字符是否为数字
|
|
|
|
|
buildName = para.substring(i,index);// 返回有数字的字符串
|
|
|
|
|
buildName = para.substring(i, index);// 返回有数字的字符串
|
|
|
|
|
}
|
|
|
|
|
if (!Pattern.matches("\\d", String.valueOf(para.charAt(i)))){
|
|
|
|
|
if (!Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
|
if (index1 != -1 ){
|
|
|
|
|
para = para.substring(0,index1);
|
|
|
|
|
if (index1 != -1) {
|
|
|
|
|
para = para.substring(0, index1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
queryWrapper.eq("real_estate_brief_address", para);
|
|
|
|
|
// queryWrapper.like("real_estate_address", para);
|
|
|
|
|
queryWrapper.eq("building_name",buildName);
|
|
|
|
|
queryWrapper.eq("building_name", buildName);
|
|
|
|
|
queryWrapper.eq("unit_name", unit);
|
|
|
|
|
List<MetaRealEstateInfo> estateInfoList = realEstateInfoService.list(queryWrapper);
|
|
|
|
|
|
|
|
|
@ -541,16 +563,14 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
entryMap.put("homeName", info.getHomeName());
|
|
|
|
|
entryMap.put("address", info.getRealEstateAddress());
|
|
|
|
|
Integer count = actualUserInfoService.lambdaQuery().eq(MetaActualUserInfo::getHabitationAddress, info.getRealEstateAddress()).count();
|
|
|
|
|
if (count == 0){
|
|
|
|
|
entryMap.put("type","空置");
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
entryMap.put("type", "空置");
|
|
|
|
|
}
|
|
|
|
|
return entryMap;
|
|
|
|
|
},
|
|
|
|
|
Collectors.toList()
|
|
|
|
|
)
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return AjaxResult.success(resultMap);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.info(StringKit.toString(e));
|
|
|
|
@ -579,7 +599,7 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
//网格 没有
|
|
|
|
|
homeInfoVo.setGrid("");
|
|
|
|
|
homeInfoVo.setType("住宅");
|
|
|
|
|
if (para.contains("商铺")){
|
|
|
|
|
if (para.contains("商铺")) {
|
|
|
|
|
homeInfoVo.setType("商铺");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -672,5 +692,4 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|