diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java index 80c9e18..bbacbf7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java @@ -17,6 +17,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.translation.TranslateUtils; import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.resource.domain.TResourceLand; +import com.ruoyi.resource.domain.TResourceLandMap; import com.ruoyi.resource.domain.TResourceOperation; import com.ruoyi.resource.domain.TResourceVo; import com.ruoyi.resource.service.ITResourceLandService; @@ -75,6 +76,25 @@ public class TResourceLandController extends BaseController return getDataTable(list); } + /** + * 查询地块属性列表 ,用于空间字段专属查询,避免敏感泄露 + */ + @GetMapping("/query") + public TableDataInfo query(TResourceLand tResourceLand) + { + if(StringUtils.isNull(tResourceLand.getDeptId())){ + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + SysDept dept = deptService.selectDeptById(loginUser.getUser().getDeptId()); + tResourceLand.setImportCode(dept.getImportCode()); + }else{ + SysDept dept = deptService.selectDeptById(tResourceLand.getDeptId()); + tResourceLand.setImportCode(dept.getImportCode()); + } + startPage(); + List list = tResourceLandService.selectTResourceLandQuery(tResourceLand); + return getDataTable(list); + } + /** * 导出地块属性列表 diff --git a/ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceLandMap.java b/ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceLandMap.java new file mode 100644 index 0000000..de5d3cf --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceLandMap.java @@ -0,0 +1,51 @@ +package com.ruoyi.resource.domain; + +import com.ruoyi.common.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 地块属性对象 t_resource_land + * + * @author rongxin + * @date 2025-09-05 + */ +@Data +public class TResourceLandMap +{ + private static final long serialVersionUID = 1L; + + /** fid */ + private Long fid; + + /** 地块代码 */ + @Excel(name = "地块编码", width = 25) + private String dkbm; + + /** 地块名称 */ + @Excel(name = "地块名称") + private String dkmc; + + /** 实测面积(亩) */ + @Excel(name = "实测面积(亩)") + private BigDecimal scmjm; + + /** 地块矢量 */ + private String theGeom; + + /** + * 空间坐标 + */ + private String theGeomText; + + /** 调查状态 */ + @Excel(name = "调查状态", dictType = "survey_status") + private String surveyStatus; + + /** 部门级联代码 */ + @Excel(name = "部门级联代码") + private String importCode; + + +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/resource/mapper/TResourceLandMapper.java b/ruoyi-business/src/main/java/com/ruoyi/resource/mapper/TResourceLandMapper.java index 6862d50..2b88e79 100644 --- a/ruoyi-business/src/main/java/com/ruoyi/resource/mapper/TResourceLandMapper.java +++ b/ruoyi-business/src/main/java/com/ruoyi/resource/mapper/TResourceLandMapper.java @@ -1,6 +1,7 @@ package com.ruoyi.resource.mapper; import com.ruoyi.resource.domain.TResourceLand; +import com.ruoyi.resource.domain.TResourceLandMap; import java.util.List; @@ -32,6 +33,8 @@ public interface TResourceLandMapper */ public List selectTResourceLandList(TResourceLand tResourceLand); + public List selectTResourceLandQuery(TResourceLand tResourceLand); + /** * 新增地块属性 * diff --git a/ruoyi-business/src/main/java/com/ruoyi/resource/service/ITResourceLandService.java b/ruoyi-business/src/main/java/com/ruoyi/resource/service/ITResourceLandService.java index 2fceec3..e93c093 100644 --- a/ruoyi-business/src/main/java/com/ruoyi/resource/service/ITResourceLandService.java +++ b/ruoyi-business/src/main/java/com/ruoyi/resource/service/ITResourceLandService.java @@ -1,6 +1,7 @@ package com.ruoyi.resource.service; import com.ruoyi.resource.domain.TResourceLand; +import com.ruoyi.resource.domain.TResourceLandMap; import java.util.List; @@ -32,6 +33,8 @@ public interface ITResourceLandService */ public List selectTResourceLandList(TResourceLand tResourceLand); + public List selectTResourceLandQuery(TResourceLand tResourceLand); + /** * 导入地块属性数据 * diff --git a/ruoyi-business/src/main/java/com/ruoyi/resource/service/impl/TResourceLandServiceImpl.java b/ruoyi-business/src/main/java/com/ruoyi/resource/service/impl/TResourceLandServiceImpl.java index 294a38e..4e8c38a 100644 --- a/ruoyi-business/src/main/java/com/ruoyi/resource/service/impl/TResourceLandServiceImpl.java +++ b/ruoyi-business/src/main/java/com/ruoyi/resource/service/impl/TResourceLandServiceImpl.java @@ -5,6 +5,7 @@ import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.resource.domain.TResourceLand; +import com.ruoyi.resource.domain.TResourceLandMap; import com.ruoyi.resource.mapper.TResourceLandMapper; import com.ruoyi.resource.service.ITResourceLandService; import org.apache.commons.collections4.ListUtils; @@ -70,6 +71,11 @@ public class TResourceLandServiceImpl implements ITResourceLandService return tResourceLandMapper.selectTResourceLandList(tResourceLand); } + @Override + public List selectTResourceLandQuery(TResourceLand tResourceLand) { + return tResourceLandMapper.selectTResourceLandQuery(tResourceLand); + } + /** * 导入地块属性数据 * diff --git a/ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml b/ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml index ee03a05..233e682 100644 --- a/ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml +++ b/ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml @@ -37,8 +37,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + + + - select fid, BSM, YSDM, DKBM, DKMC, SYQXZ, DKLB, TDLYLX, DLDJ, TDYT, SFJBNT, DKDZ, DKXZ, DKNZ, DKBZ, DKBZXX, ZJRXM, TXMJ, SCMJM, QSDWDM, QSDWMC, SFZWD, the_geom, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_land + select fid, BSM, YSDM, DKBM, DKMC, SYQXZ, DKLB, TDLYLX, DLDJ, TDYT, SFJBNT, DKDZ, DKXZ, DKNZ, DKBZ, DKBZXX, ZJRXM, TXMJ, SCMJM, QSDWDM, QSDWMC, SFZWD, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_land + + + + select fid, DKBM, DKMC, SCMJM, ST_AsGeoJSON(the_geom) as the_geom, ST_AsText(the_geom) as the_geom_text, survey_status, import_code from t_resource_land + +