|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.database.controller;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.ruoyi.database.domain.MetaRealEstateInfo;
|
|
|
|
|
import com.ruoyi.database.domain.dto.MetaRealEstateInfoDTO;
|
|
|
|
|
import com.ruoyi.database.service.MetaRealEstateInfoService;
|
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
@ -13,10 +14,12 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -38,7 +41,28 @@ public class MetaRealEstateInfoController extends BaseController {
|
|
|
|
|
public TableDataInfo<MetaRealEstateInfo> list(MetaRealEstateInfo metaRealEstateInfo) {
|
|
|
|
|
startPage();
|
|
|
|
|
List<MetaRealEstateInfo> list = metaRealEstateInfoService.list(new QueryWrapper<>(metaRealEstateInfo));
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
|
|
|
|
|
// Create a new list of DTOs
|
|
|
|
|
List<MetaRealEstateInfoDTO> resultList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
for (MetaRealEstateInfo info : list) {
|
|
|
|
|
// 检查realEstateAddress是否包含"独立商铺",如果是则跳过这些记录
|
|
|
|
|
if (info.getRealEstateAddress() != null && info.getRealEstateAddress().contains("独立商铺")) {
|
|
|
|
|
continue; // 跳过包含"独立商铺"的记录
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MetaRealEstateInfoDTO dto = new MetaRealEstateInfoDTO();
|
|
|
|
|
// Copy existing fields
|
|
|
|
|
BeanUtils.copyProperties(info, dto);
|
|
|
|
|
|
|
|
|
|
// Concatenate realEstateBriefAddress and buildingName and add "幢"
|
|
|
|
|
String concatenatedAddress = info.getRealEstateBriefAddress() + info.getBuildingName() + "幢";
|
|
|
|
|
dto.setConcatenatedAddress(concatenatedAddress);
|
|
|
|
|
|
|
|
|
|
// Add DTO to the result list
|
|
|
|
|
resultList.add(dto);
|
|
|
|
|
}
|
|
|
|
|
return getDataTable(resultList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping
|
|
|
|
|