@@ -17,6 +17,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil; | |||||
import com.ruoyi.common.utils.translation.TranslateUtils; | import com.ruoyi.common.utils.translation.TranslateUtils; | ||||
import com.ruoyi.framework.web.service.TokenService; | import com.ruoyi.framework.web.service.TokenService; | ||||
import com.ruoyi.resource.domain.TResourceLand; | import com.ruoyi.resource.domain.TResourceLand; | ||||
import com.ruoyi.resource.domain.TResourceLandMap; | |||||
import com.ruoyi.resource.domain.TResourceOperation; | import com.ruoyi.resource.domain.TResourceOperation; | ||||
import com.ruoyi.resource.domain.TResourceVo; | import com.ruoyi.resource.domain.TResourceVo; | ||||
import com.ruoyi.resource.service.ITResourceLandService; | import com.ruoyi.resource.service.ITResourceLandService; | ||||
@@ -75,6 +76,25 @@ public class TResourceLandController extends BaseController | |||||
return getDataTable(list); | 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<TResourceLandMap> list = tResourceLandService.selectTResourceLandQuery(tResourceLand); | |||||
return getDataTable(list); | |||||
} | |||||
/** | /** | ||||
* 导出地块属性列表 | * 导出地块属性列表 | ||||
@@ -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; | |||||
} |
@@ -1,6 +1,7 @@ | |||||
package com.ruoyi.resource.mapper; | package com.ruoyi.resource.mapper; | ||||
import com.ruoyi.resource.domain.TResourceLand; | import com.ruoyi.resource.domain.TResourceLand; | ||||
import com.ruoyi.resource.domain.TResourceLandMap; | |||||
import java.util.List; | import java.util.List; | ||||
@@ -32,6 +33,8 @@ public interface TResourceLandMapper | |||||
*/ | */ | ||||
public List<TResourceLand> selectTResourceLandList(TResourceLand tResourceLand); | public List<TResourceLand> selectTResourceLandList(TResourceLand tResourceLand); | ||||
public List<TResourceLandMap> selectTResourceLandQuery(TResourceLand tResourceLand); | |||||
/** | /** | ||||
* 新增地块属性 | * 新增地块属性 | ||||
* | * | ||||
@@ -1,6 +1,7 @@ | |||||
package com.ruoyi.resource.service; | package com.ruoyi.resource.service; | ||||
import com.ruoyi.resource.domain.TResourceLand; | import com.ruoyi.resource.domain.TResourceLand; | ||||
import com.ruoyi.resource.domain.TResourceLandMap; | |||||
import java.util.List; | import java.util.List; | ||||
@@ -32,6 +33,8 @@ public interface ITResourceLandService | |||||
*/ | */ | ||||
public List<TResourceLand> selectTResourceLandList(TResourceLand tResourceLand); | public List<TResourceLand> selectTResourceLandList(TResourceLand tResourceLand); | ||||
public List<TResourceLandMap> selectTResourceLandQuery(TResourceLand tResourceLand); | |||||
/** | /** | ||||
* 导入地块属性数据 | * 导入地块属性数据 | ||||
* | * | ||||
@@ -5,6 +5,7 @@ import com.ruoyi.common.exception.ServiceException; | |||||
import com.ruoyi.common.utils.DateUtils; | import com.ruoyi.common.utils.DateUtils; | ||||
import com.ruoyi.common.utils.StringUtils; | import com.ruoyi.common.utils.StringUtils; | ||||
import com.ruoyi.resource.domain.TResourceLand; | import com.ruoyi.resource.domain.TResourceLand; | ||||
import com.ruoyi.resource.domain.TResourceLandMap; | |||||
import com.ruoyi.resource.mapper.TResourceLandMapper; | import com.ruoyi.resource.mapper.TResourceLandMapper; | ||||
import com.ruoyi.resource.service.ITResourceLandService; | import com.ruoyi.resource.service.ITResourceLandService; | ||||
import org.apache.commons.collections4.ListUtils; | import org.apache.commons.collections4.ListUtils; | ||||
@@ -70,6 +71,11 @@ public class TResourceLandServiceImpl implements ITResourceLandService | |||||
return tResourceLandMapper.selectTResourceLandList(tResourceLand); | return tResourceLandMapper.selectTResourceLandList(tResourceLand); | ||||
} | } | ||||
@Override | |||||
public List<TResourceLandMap> selectTResourceLandQuery(TResourceLand tResourceLand) { | |||||
return tResourceLandMapper.selectTResourceLandQuery(tResourceLand); | |||||
} | |||||
/** | /** | ||||
* 导入地块属性数据 | * 导入地块属性数据 | ||||
* | * | ||||
@@ -37,8 +37,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
<result property="updateTime" column="update_time" /> | <result property="updateTime" column="update_time" /> | ||||
</resultMap> | </resultMap> | ||||
<resultMap type="TResourceLandMap" id="TResourceLandMapResult"> | |||||
<result property="fid" column="fid" /> | |||||
<result property="dkbm" column="DKBM" /> | |||||
<result property="dkmc" column="DKMC" /> | |||||
<result property="scmjm" column="SCMJM" /> | |||||
<result property="theGeom" column="the_geom" /> | |||||
<result property="theGeomText" column="the_geom_text"/> | |||||
<result property="importCode" column="import_code" /> | |||||
<result property="surveyStatus" column="survey_status" /> | |||||
</resultMap> | |||||
<sql id="selectTResourceLandVo"> | <sql id="selectTResourceLandVo"> | ||||
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 | |||||
</sql> | |||||
<sql id="selectTResourceLandMap"> | |||||
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 | |||||
</sql> | </sql> | ||||
<select id="selectTResourceLandList" parameterType="TResourceLand" resultMap="TResourceLandResult"> | <select id="selectTResourceLandList" parameterType="TResourceLand" resultMap="TResourceLandResult"> | ||||
@@ -59,6 +74,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
</where> | </where> | ||||
</select> | </select> | ||||
<select id="selectTResourceLandQuery" parameterType="TResourceLand" resultMap="TResourceLandMapResult"> | |||||
<include refid="selectTResourceLandMap"/> | |||||
<where> | |||||
<if test="dkbm != null and dkbm != ''"> and DKBM = #{dkbm}</if> | |||||
<if test="dkmc != null and dkmc != ''"> and DKMC like concat('%', #{dkmc}, '%')</if> | |||||
<if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if> | |||||
<if test="importCode != null and importCode != ''"> and import_code like concat(#{importCode}, '%')</if> | |||||
</where> | |||||
</select> | |||||
<select id="selectTResourceLandByFid" parameterType="Long" resultMap="TResourceLandResult"> | <select id="selectTResourceLandByFid" parameterType="Long" resultMap="TResourceLandResult"> | ||||
<include refid="selectTResourceLandVo"/> | <include refid="selectTResourceLandVo"/> | ||||
where fid = #{fid} | where fid = #{fid} | ||||