From aaccc1f7e43b566b957bca142b2d4310a4d4e9cc Mon Sep 17 00:00:00 2001 From: zzl <961867786@qq.com> Date: Tue, 9 Sep 2025 10:03:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=8B=AC=E7=AB=8B=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=9C=B0=E5=9D=97=E7=A9=BA=E9=97=B4=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E9=81=BF=E5=85=8D=E6=95=8F=E6=84=9F?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=B3=84=E9=9C=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/TResourceLandController.java | 20 ++++++++ .../resource/domain/TResourceLandMap.java | 51 +++++++++++++++++++ .../resource/mapper/TResourceLandMapper.java | 3 ++ .../service/ITResourceLandService.java | 3 ++ .../impl/TResourceLandServiceImpl.java | 6 +++ .../mapper/resource/TResourceLandMapper.xml | 27 +++++++++- 6 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceLandMap.java 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 + +