|
|
@ -7,10 +7,12 @@ import com.ruoyi.business.domain.vo.*;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
import com.ruoyi.common.utils.NumKit;
|
|
|
|
import com.ruoyi.business.controller.utils.NumKit;
|
|
|
|
import com.ruoyi.common.utils.StringKit;
|
|
|
|
import com.ruoyi.business.controller.utils.StringKit;
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.PageUtils;
|
|
|
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
|
|
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
|
|
|
import com.ruoyi.database.domain.*;
|
|
|
|
import com.ruoyi.database.domain.*;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.dto.MetaRealEstateInfoDTO;
|
|
|
|
import com.ruoyi.database.service.*;
|
|
|
|
import com.ruoyi.database.service.*;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@ -19,10 +21,7 @@ import lombok.RequiredArgsConstructor;
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
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
|
|
|
|
@GetMapping
|
|
|
|
@ApiOperation("常驻人员列表")
|
|
|
|
@ApiOperation("常驻人员列表")
|
|
|
@ -277,7 +299,7 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/realTimeAlarmSituation")
|
|
|
|
@PostMapping("/realTimeAlarmSituation")
|
|
|
|
@ApiOperation("实时警情")
|
|
|
|
@ApiOperation("实时警情")
|
|
|
|
public AjaxResult realTimeAlarmSituation(@ApiParam @Param("时间") @RequestParam String time) {
|
|
|
|
public AjaxResult realTimeAlarmSituation(@ApiParam @Param("时间") @RequestParam String time) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (0 == NumKit.checkInt(time)) {
|
|
|
|
if (0 == NumKit.checkInt(time)) {
|
|
|
|
time = "30";
|
|
|
|
time = "30";
|
|
|
@ -310,7 +332,7 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/buildingInformation")
|
|
|
|
@PostMapping("/buildingInformation")
|
|
|
|
@ApiOperation("楼栋信息")
|
|
|
|
@ApiOperation("楼栋信息")
|
|
|
|
public AjaxResult overviewResources(@ApiParam("楼栋地址") @RequestParam String para) {
|
|
|
|
public AjaxResult overviewResources(@ApiParam("楼栋地址") @RequestParam String para) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
para = para.substring(0, para.indexOf("号"));
|
|
|
|
para = para.substring(0, para.indexOf("号"));
|
|
|
|
MetaRealEstateInfo estateInfo = new MetaRealEstateInfo();
|
|
|
|
MetaRealEstateInfo estateInfo = new MetaRealEstateInfo();
|
|
|
@ -344,42 +366,42 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/buildRealEstate")
|
|
|
|
@PostMapping("/buildRealEstate")
|
|
|
|
@ApiOperation("楼栋信息:实有房屋统计")
|
|
|
|
@ApiOperation("楼栋信息:实有房屋统计")
|
|
|
|
public AjaxResult buildRealEstate(@ApiParam("楼栋地址") @RequestParam String para) {
|
|
|
|
public AjaxResult buildRealEstate(@ApiParam("楼栋地址") @RequestParam String para) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
int index = para.lastIndexOf("幢");
|
|
|
|
int index = para.lastIndexOf("幢");
|
|
|
|
String buildName = null;
|
|
|
|
String buildName = null;
|
|
|
|
if (index != -1) {
|
|
|
|
if (index != -1) {
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
if (Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {// 检查字符是否为数字
|
|
|
|
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;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
if (index1 != -1 ){
|
|
|
|
if (index1 != -1) {
|
|
|
|
para = para.substring(0,index1);
|
|
|
|
para = para.substring(0, index1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>();
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>();
|
|
|
|
queryWrapper.eq("real_estate_brief_address",para);
|
|
|
|
queryWrapper.eq("real_estate_brief_address", para);
|
|
|
|
queryWrapper.eq("building_name",buildName);
|
|
|
|
queryWrapper.eq("building_name", buildName);
|
|
|
|
int a = realEstateInfoService.count(queryWrapper);
|
|
|
|
int a = realEstateInfoService.count(queryWrapper);
|
|
|
|
List<MetaRealEstateInfo> list = realEstateInfoService.list(queryWrapper);
|
|
|
|
List<MetaRealEstateInfo> list = realEstateInfoService.list(queryWrapper);
|
|
|
|
int spCount = 0;
|
|
|
|
int spCount = 0;
|
|
|
|
int kzCount = 0;
|
|
|
|
int kzCount = 0;
|
|
|
|
for (MetaRealEstateInfo metaRealEstateInfo : list){
|
|
|
|
for (MetaRealEstateInfo metaRealEstateInfo : list) {
|
|
|
|
int index1 = metaRealEstateInfo.getRealEstateAddress().indexOf("商铺");
|
|
|
|
int index1 = metaRealEstateInfo.getRealEstateAddress().indexOf("商铺");
|
|
|
|
if (index1 != -1){
|
|
|
|
if (index1 != -1) {
|
|
|
|
spCount++;
|
|
|
|
spCount++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Integer count = actualUserInfoService.lambdaQuery().eq(MetaActualUserInfo::getHabitationAddress, metaRealEstateInfo.getRealEstateAddress()).count();
|
|
|
|
Integer count = actualUserInfoService.lambdaQuery().eq(MetaActualUserInfo::getHabitationAddress, metaRealEstateInfo.getRealEstateAddress()).count();
|
|
|
|
if (count == 0){
|
|
|
|
if (count == 0) {
|
|
|
|
kzCount++;
|
|
|
|
kzCount++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int zzCount = a-spCount;
|
|
|
|
int zzCount = a - spCount;
|
|
|
|
//todo 目前都是写死的
|
|
|
|
//todo 目前都是写死的
|
|
|
|
BuildInformationVo buildInformationVo = new BuildInformationVo();
|
|
|
|
BuildInformationVo buildInformationVo = new BuildInformationVo();
|
|
|
|
buildInformationVo.setCount(StringKit.toString(a));
|
|
|
|
buildInformationVo.setCount(StringKit.toString(a));
|
|
|
@ -403,29 +425,29 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/buildRealActual")
|
|
|
|
@PostMapping("/buildRealActual")
|
|
|
|
@ApiOperation("楼栋信息:实有人口统计")
|
|
|
|
@ApiOperation("楼栋信息:实有人口统计")
|
|
|
|
public AjaxResult buildRealActual(@ApiParam("楼栋地址") @RequestParam String para) {
|
|
|
|
public AjaxResult buildRealActual(@ApiParam("楼栋地址") @RequestParam String para) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
int index = para.lastIndexOf("幢");
|
|
|
|
int index = para.lastIndexOf("幢");
|
|
|
|
String buildName = null;
|
|
|
|
String buildName = null;
|
|
|
|
if (index != -1) {
|
|
|
|
if (index != -1) {
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
if (Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {// 检查字符是否为数字
|
|
|
|
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;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
if (index1 != -1 ){
|
|
|
|
if (index1 != -1) {
|
|
|
|
para = para.substring(0,index1);
|
|
|
|
para = para.substring(0, index1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 创建查询条件,使用模糊查询
|
|
|
|
// 创建查询条件,使用模糊查询
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapperEstate = new QueryWrapper<>();
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapperEstate = new QueryWrapper<>();
|
|
|
|
// queryWrapperEstate.like("real_estate_address", para); // 你需要替换成实际的模糊查询条件
|
|
|
|
// queryWrapperEstate.like("real_estate_address", para); // 你需要替换成实际的模糊查询条件
|
|
|
|
queryWrapperEstate.eq("real_estate_brief_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);
|
|
|
|
List<MetaRealEstateInfo> realEstateInfos = realEstateInfoService.list(queryWrapperEstate);
|
|
|
|
|
|
|
|
|
|
|
@ -491,7 +513,7 @@ public class BigScreenController extends BaseController {
|
|
|
|
@PostMapping("/buildStructure")
|
|
|
|
@PostMapping("/buildStructure")
|
|
|
|
@ApiOperation("楼栋信息:房屋结构")
|
|
|
|
@ApiOperation("楼栋信息:房屋结构")
|
|
|
|
public AjaxResult buildStructure(
|
|
|
|
public AjaxResult buildStructure(
|
|
|
|
@ApiParam(value = "楼栋地址" ) @RequestParam String para,
|
|
|
|
@ApiParam(value = "楼栋地址") @RequestParam String para,
|
|
|
|
@ApiParam(value = "单元") @RequestParam String unit) {
|
|
|
|
@ApiParam(value = "单元") @RequestParam String unit) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
//获取到房屋数据的实际地址
|
|
|
|
//获取到房屋数据的实际地址
|
|
|
@ -501,21 +523,21 @@ public class BigScreenController extends BaseController {
|
|
|
|
if (index != -1) {
|
|
|
|
if (index != -1) {
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
for (int i = index - 1; i >= 0; i--) { // 从特定字符位置-1开始向前遍历
|
|
|
|
if (Pattern.matches("\\d", String.valueOf(para.charAt(i)))) {// 检查字符是否为数字
|
|
|
|
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;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
int index1 = para.lastIndexOf(buildName);
|
|
|
|
if (index1 != -1 ){
|
|
|
|
if (index1 != -1) {
|
|
|
|
para = para.substring(0,index1);
|
|
|
|
para = para.substring(0, index1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>();
|
|
|
|
QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>();
|
|
|
|
queryWrapper.eq("real_estate_brief_address", para);
|
|
|
|
queryWrapper.eq("real_estate_brief_address", para);
|
|
|
|
// queryWrapper.like("real_estate_address", para);
|
|
|
|
// queryWrapper.like("real_estate_address", para);
|
|
|
|
queryWrapper.eq("building_name",buildName);
|
|
|
|
queryWrapper.eq("building_name", buildName);
|
|
|
|
queryWrapper.eq("unit_name", unit);
|
|
|
|
queryWrapper.eq("unit_name", unit);
|
|
|
|
List<MetaRealEstateInfo> estateInfoList = realEstateInfoService.list(queryWrapper);
|
|
|
|
List<MetaRealEstateInfo> estateInfoList = realEstateInfoService.list(queryWrapper);
|
|
|
|
|
|
|
|
|
|
|
@ -541,16 +563,14 @@ public class BigScreenController extends BaseController {
|
|
|
|
entryMap.put("homeName", info.getHomeName());
|
|
|
|
entryMap.put("homeName", info.getHomeName());
|
|
|
|
entryMap.put("address", info.getRealEstateAddress());
|
|
|
|
entryMap.put("address", info.getRealEstateAddress());
|
|
|
|
Integer count = actualUserInfoService.lambdaQuery().eq(MetaActualUserInfo::getHabitationAddress, info.getRealEstateAddress()).count();
|
|
|
|
Integer count = actualUserInfoService.lambdaQuery().eq(MetaActualUserInfo::getHabitationAddress, info.getRealEstateAddress()).count();
|
|
|
|
if (count == 0){
|
|
|
|
if (count == 0) {
|
|
|
|
entryMap.put("type","空置");
|
|
|
|
entryMap.put("type", "空置");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return entryMap;
|
|
|
|
return entryMap;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Collectors.toList()
|
|
|
|
Collectors.toList()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return AjaxResult.success(resultMap);
|
|
|
|
return AjaxResult.success(resultMap);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
logger.info(StringKit.toString(e));
|
|
|
|
logger.info(StringKit.toString(e));
|
|
|
@ -560,7 +580,7 @@ public class BigScreenController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/buildInformation")
|
|
|
|
@PostMapping("/buildInformation")
|
|
|
|
@ApiOperation("楼栋信息:户室信息")
|
|
|
|
@ApiOperation("楼栋信息:户室信息")
|
|
|
|
public AjaxResult buildInformation(@ApiParam("楼栋地址") @RequestParam String para) {
|
|
|
|
public AjaxResult buildInformation(@ApiParam("楼栋地址") @RequestParam String para) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<MetaRealEstateInfo> addQueryWrapper = new QueryWrapper<>();
|
|
|
|
QueryWrapper<MetaRealEstateInfo> addQueryWrapper = new QueryWrapper<>();
|
|
|
@ -579,7 +599,7 @@ public class BigScreenController extends BaseController {
|
|
|
|
//网格 没有
|
|
|
|
//网格 没有
|
|
|
|
homeInfoVo.setGrid("");
|
|
|
|
homeInfoVo.setGrid("");
|
|
|
|
homeInfoVo.setType("住宅");
|
|
|
|
homeInfoVo.setType("住宅");
|
|
|
|
if (para.contains("商铺")){
|
|
|
|
if (para.contains("商铺")) {
|
|
|
|
homeInfoVo.setType("商铺");
|
|
|
|
homeInfoVo.setType("商铺");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -672,5 +692,4 @@ public class BigScreenController extends BaseController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|