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 1ddc06e..03c5cbb 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 @@ -12,6 +12,7 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.pdf.PdfUtils; import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.utils.space.SpaceUtils; import com.ruoyi.common.utils.translation.TranslateUtils; import com.ruoyi.resource.domain.TResourceLand; import com.ruoyi.resource.domain.TResourceOperation; @@ -184,6 +185,13 @@ public class TResourceLandController extends BaseController @PostMapping("/update") public AjaxResult edit(@RequestBody TResourceLand tResourceLand) { + if (tResourceLand.getTheGeom() != null && tResourceLand.getTheGeom().substring(0, 1).equals("[")) { + //坐标转换 + String houseApplyProposedSituations = SpaceUtils.space(tResourceLand.getTheGeom()); + tResourceLand.setTheGeom(houseApplyProposedSituations); + } else { + tResourceLand.setTheGeom(null); + } return toAjax(tResourceLandService.updateTResourceLand(tResourceLand)); } @@ -198,6 +206,12 @@ public class TResourceLandController extends BaseController return toAjax(tResourceLandService.deleteTResourceLandByFids(fids)); } + @Log(title = "空间字段置空", businessType = BusinessType.UPDATE) + @GetMapping("/clear/{fid}") + public AjaxResult clearTheGeom(@PathVariable("fid") Long fid) { + return toAjax(tResourceLandService.clearTheGeom(fid)); + } + /** * 打印地块属性 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java index d60e143..12215e9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java @@ -82,6 +82,15 @@ public class SysDeptController extends BaseController { return success(deptService.selectDeptById(deptId)); } + /** + * 根据部门编号获取详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:dept:query')") + @GetMapping(value = "/getInfoByCode/{orgCode}") + public AjaxResult getInfoByCode(@PathVariable String orgCode) { + return success(deptService.selectDeptByOrgCode(orgCode)); + } + /** * 新增部门 */ 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..1a70665 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 @@ -79,4 +79,12 @@ public interface TResourceLandMapper * @return 结果 */ public int deleteTResourceLandByFids(Long[] fids); + + /** + * 清空theGeom字段 + * + * @param fid + * @return + */ + public int clearTheGeom(Long fid); } 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..d2cb60c 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 @@ -89,4 +89,12 @@ public interface ITResourceLandService * @return 结果 */ public int deleteTResourceLandByFid(Long fid); + + /** + * 清空theGeom字段 + * + * @param fid + * @return + */ + public int clearTheGeom(Long fid); } 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..1159c73 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 @@ -226,4 +226,15 @@ public class TResourceLandServiceImpl implements ITResourceLandService { return tResourceLandMapper.deleteTResourceLandByFid(fid); } + + /** + * 清空theGeom字段 + * + * @param fid + * @return + */ + @Override + public int clearTheGeom(Long fid) { + return tResourceLandMapper.clearTheGeom(fid); + } } diff --git a/ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml b/ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml index 92d9f3c..1765016 100644 --- a/ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml +++ b/ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml @@ -35,7 +35,7 @@ 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, SCMJ, SCMJM, 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, SCMJ, SCMJM, ST_AsGeoJSON(the_geom) as the_geom, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_land