Browse Source

空间筛选

gushoubang 10 months ago
parent
commit
ab03796d35

+ 6 - 1
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/FzssController.java

@@ -39,9 +39,14 @@ public class FzssController extends BaseController {
      */
     @PostMapping("/AddFzxz")
     public RequestResult AddFzxz(@RequestBody Map params) {
+        // 解析规划参数
         FzxzCalc fzxzCalc = fzssService.GetFzxzParam(params);
+        // 存储规划参数
         fzssService.saveScheduleParam(fzxzCalc);
-        RequestResult res = fzssService.startSchedule(fzxzCalc);
+        // 获取筛选区域
+        String geomWkt = fzssService.getWktGeom(fzxzCalc.getFzxzDTO().getGeomId());
+        // 开始规划任务
+        RequestResult res = fzssService.startSchedule(geomWkt,fzxzCalc);
         return res;
     }
 

+ 21 - 170
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzDTO.java

@@ -1,180 +1,31 @@
 package com.onemap.analyse.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
 
 import java.util.Date;
 
 @TableName("t_fzss_fzxz")
+@Data
 public class FzxzDTO {
-    private String bsm;
-    private Integer rwzt;
-    private Date cjsj;
-    private String cjyh;
-    private Date rwkssj;
-    private Date rwjssj;
-    private String fxbg;
-    private String zip;
-    private String ydxz_bsm;
-    private String ydmjbegin;
-    private String ydmjend;
-    private String kddk;
-    private String zdpd;
-    private Double xzmj;
-    private String sjy;
-    private String xzfw; //fwlx=1:wkt格式,4326,区域面积;fwlx=2:shp文件地址
-    private String xmmc;
+    private String bsm;// 标识码
+    private Integer rwzt;// 任务状态(0创建 1执行中 2完成 3错误)
+    private Date cjsj;// 创建时间
+    private String cjyh;// 创建用户
+    private Date rwkssj;// 任务开始时间
+    private Date rwjssj;// 任务结束时间
+    private String fxbg;// 分析报告
+    private String ydxz_bsm;// 用地性质标识码
+    private Float ydmjbegin;// 用地面积范围开始
+    private Float ydmjend;// 用地面积范围结束
+    private String kddk;// 可多地块,0允许,1不允许
+    private String zdpd;// 最大坡度
+    private Double xzmj;// 选址面积(m2)
+    private String sjy;// 数据源,对应表的名称
+    // private String xzfw; //fwlx=1:wkt格式,4326,区域面积;fwlx=2:shp文件地址
+    @TableField(value = "geom_id")
+    private String geomId; // 选址范围信息
+    private String xmmc;//项目名称
     private String jsdw;
-    private Integer fwlx;//0:行政区划,1:绘制,2:Shp文件
-
-    public String getCjyh() {
-        return cjyh;
-    }
-
-    public void setCjyh(String cjyh) {
-        this.cjyh = cjyh;
-    }
-
-    public String getBsm() {
-        return bsm;
-    }
-
-    public void setBsm(String bsm) {
-        this.bsm = bsm;
-    }
-
-    public Integer getRwzt() {
-        return rwzt;
-    }
-
-    public void setRwzt(Integer rwzt) {
-        this.rwzt = rwzt;
-    }
-
-    public Date getCjsj() {
-        return cjsj;
-    }
-
-    public void setCjsj(Date cjsj) {
-        this.cjsj = cjsj;
-    }
-
-    public Date getRwkssj() {
-        return rwkssj;
-    }
-
-    public void setRwkssj(Date rwkssj) {
-        this.rwkssj = rwkssj;
-    }
-
-    public Date getRwjssj() {
-        return rwjssj;
-    }
-
-    public void setRwjssj(Date rwjssj) {
-        this.rwjssj = rwjssj;
-    }
-
-    public String getFxbg() {
-        return fxbg;
-    }
-
-    public void setFxbg(String fxbg) {
-        this.fxbg = fxbg;
-    }
-
-    public String getZip() {
-        return zip;
-    }
-
-    public void setZip(String zip) {
-        this.zip = zip;
-    }
-
-    public String getYdxz_bsm() {
-        return ydxz_bsm;
-    }
-
-    public void setYdxz_bsm(String ydxz_bsm) {
-        this.ydxz_bsm = ydxz_bsm;
-    }
-
-    public String getYdmjbegin() {
-        return ydmjbegin;
-    }
-
-    public void setYdmjbegin(String ydmjbegin) {
-        this.ydmjbegin = ydmjbegin;
-    }
-
-    public String getYdmjend() {
-        return ydmjend;
-    }
-
-    public void setYdmjend(String ydmjend) {
-        this.ydmjend = ydmjend;
-    }
-
-    public String getKddk() {
-        return kddk;
-    }
-
-    public void setKddk(String kddk) {
-        this.kddk = kddk;
-    }
-
-    public String getZdpd() {
-        return zdpd;
-    }
-
-    public void setZdpd(String zdpd) {
-        this.zdpd = zdpd;
-    }
-
-    public Double getXzmj() {
-        return xzmj;
-    }
-
-    public void setXzmj(Double xzmj) {
-        this.xzmj = xzmj;
-    }
-
-    public String getSjy() {
-        return sjy;
-    }
-
-    public void setSjy(String sjy) {
-        this.sjy = sjy;
-    }
-
-    public String getXzfw() {
-        return xzfw;
-    }
-
-    public void setXzfw(String xzfw) {
-        this.xzfw = xzfw;
-    }
-
-    public String getXmmc() {
-        return xmmc;
-    }
-
-    public void setXmmc(String xmmc) {
-        this.xmmc = xmmc;
-    }
-
-    public String getJsdw() {
-        return jsdw;
-    }
-
-    public void setJsdw(String jsdw) {
-        this.jsdw = jsdw;
-    }
-
-    public Integer getFwlx() {
-        return fwlx;
-    }
-
-    public void setFwlx(Integer fwlx) {
-        this.fwlx = fwlx;
-    }
 }

+ 23 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/base/GeomResourceDTO.java

@@ -0,0 +1,23 @@
+package com.onemap.analyse.domain.base;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+@TableName("t_fzss_zhxz_file")
+@Data
+public class GeomResourceDTO {
+    private String id;
+    private String filepath;
+    private String zippath;
+    private String geom;
+    @TableField(value = "from_type")
+    private Integer fromType;// 1:手绘,2:shp导入
+    @TableField(value = "create_time")
+    private Date createTime;
+    @TableField(value = "from_route")
+    private String fromRoute;
+    private Float area;
+}

+ 1 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/calculation/FzxzCalc.java

@@ -5,6 +5,7 @@ import com.onemap.analyse.domain.FzxzXzyzDTO;
 import lombok.Data;
 
 import java.util.List;
+
 @Data
 public class FzxzCalc {
     FzxzDTO fzxzDTO;

+ 17 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/res/GeomRes.java

@@ -0,0 +1,17 @@
+package com.onemap.analyse.domain.res;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class GeomRes {
+    private String id;
+    private String geom;
+    @TableField(value = "from_type")
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+    private Float area;
+}

+ 11 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/base/ShpFileMapper.java

@@ -0,0 +1,11 @@
+package com.onemap.analyse.mapper.base;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.base.GeomResourceDTO;
+import com.onemap.analyse.domain.res.GeomRes;
+
+public interface ShpFileMapper extends BaseMapper<GeomResourceDTO> {
+    void saveGeom(GeomResourceDTO geomResourceDTO);
+
+    GeomRes getOne(String id);
+}

+ 4 - 1
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/vector/GhdkaMapper.java

@@ -4,11 +4,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.onemap.analyse.domain.FzxzXzyzDTO;
 import com.onemap.analyse.domain.query.GhdkaFilter;
 import com.onemap.analyse.domain.vector.GhdkaDTO;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
+import java.util.Map;
 
 public interface GhdkaMapper extends BaseMapper<GhdkaDTO> {
-    List<Integer> getIdByGeom(String geom);
+    // List<Integer> getIdByGeom(@Param("sjy") String sjy, @Param("geom") String geom);
+    List<Integer> getIdByGeom(Map<String, Object> params);
 
     List<Integer> getIdByFilter(GhdkaFilter ghdkaFilter);
 }

+ 5 - 1
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IFzssService.java

@@ -12,8 +12,12 @@ public interface IFzssService {
     RequestResult AddHgxfx(HgxfxEntityDTO hgxfxEntityDTO) throws IOException;
 
     FzxzCalc GetFzxzParam(Map params);
+
     void saveScheduleParam(FzxzCalc fzxzCalc);
-    RequestResult startSchedule(FzxzCalc fzxzCalc);
+
+    String getWktGeom(String geomId);
+
+    RequestResult startSchedule(String geomWkt,FzxzCalc fzxzCalc);
 
     RequestResult GetXzjg(String bsm);
 

+ 25 - 17
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/FzssServiceImpl.java

@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.onemap.analyse.domain.*;
 import com.onemap.analyse.domain.calculation.FzxzCalc;
 import com.onemap.analyse.domain.query.GhdkaFilter;
+import com.onemap.analyse.domain.res.GeomRes;
 import com.onemap.analyse.mapper.*;
+import com.onemap.analyse.mapper.base.ShpFileMapper;
 import com.onemap.analyse.mapper.vector.GhdkaMapper;
 import com.onemap.analyse.service.IFzssService;
 import com.onemap.analyse.task.FzxzSchedule;
@@ -20,10 +22,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import static com.onemap.analyse.utils.Fxfw2SdeUtils.vector2Sde;
 
@@ -59,6 +58,9 @@ public class FzssServiceImpl implements IFzssService {
     @Autowired
     GhdkaMapper ghdkaMapper;
 
+    @Autowired
+    ShpFileMapper shpFileMapper;
+
     @Transactional(rollbackFor = Exception.class)
     @Override
     public RequestResult AddHgxfx(HgxfxEntityDTO hgxfxEntityDTO) throws IOException {
@@ -131,23 +133,29 @@ public class FzssServiceImpl implements IFzssService {
         fzxzMapper.insert(fzxzCalc.getFzxzDTO());
     }
 
+    @Override
+    @Master
+    public String getWktGeom(String geomId) {
+        // 0.获取geom
+        GeomRes geomRes = shpFileMapper.getOne(geomId);
+        return geomRes.getGeom();
+    }
+
+    /**
+     * 规划选址逻辑在这里
+     *
+     * @param fzxzCalc
+     * @return
+     */
     @Override
     @Slave
-    public RequestResult startSchedule(FzxzCalc fzxzCalc) {
+    public RequestResult startSchedule(String geomWkt, FzxzCalc fzxzCalc) {
         FzxzDTO fzxzDTO = fzxzCalc.getFzxzDTO();
-        //
-        String geoWkt = null;
-        if (fzxzDTO.getFwlx() == 1) {
-            // 绘制
-            geoWkt = fzxzDTO.getXzfw();
-            // ghdkaFilter.setGeom(geoWkt);
-        } else if (fzxzDTO.getFwlx() == 2) {
-            // shp文件
-        }
-
         // 1.区域筛选
-        List<Integer> ids = ghdkaMapper.getIdByGeom(geoWkt);
-
+        Map<String, Object> paramMap = new HashMap<>();
+        paramMap.put("geom", geomWkt);
+        paramMap.put("sjy", fzxzDTO.getSjy());
+        List<Integer> ids = ghdkaMapper.getIdByGeom(paramMap);
         // 2.条件筛选
         GhdkaFilter ghdkaFilter = new GhdkaFilter();
         ghdkaFilter.setIdList(ids);

+ 2 - 2
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ChscSchedule.java

@@ -152,8 +152,8 @@ public class ChscSchedule {
                 }
                 FzxzDTO fzxzDTO = new FzxzDTO();
                 fzxzDTO.setBsm(zhxzChsc.getBsm());
-                fzxzDTO.setFwlx(zhxzChsc.getFwlx());
-                fzxzDTO.setXzfw(curfxfw);
+                // fzxzDTO.setFwlx(zhxzChsc.getFwlx());
+                // fzxzDTO.setXzfw(curfxfw);
                 RequestResult info = fzxzvector2Sde(fzxzDTO, rwlx);
                 if (info != null) {
                     System.out.println("策划生成分析范围数据入库失败");

+ 80 - 80
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/Fxfw2SdeUtils.java

@@ -165,86 +165,86 @@ public class Fxfw2SdeUtils {
      * @throws IOException
      */
     public static RequestResult fzxzvector2Sde(FzxzDTO fzxzDTO, String rwlx) throws IOException {
-        Integer fwlx = fzxzDTO.getFwlx();
-        rwlx = StringUtils.isEmpty(rwlx) ? "辅助选址" : rwlx;
-        String vectorFilePath = "";
-        String pyResult = "";
-        if (fxfwDictDTO.getRegion().equals(fwlx)) {
-
-        } else if (fxfwDictDTO.getDraw().equals(fwlx)) {//自定义绘制范围
-            EsriJsonModel esriModel = new EsriJsonModel();
-            //字段汉化
-            Map<String, String> fieldAliases = new HashMap<>();
-            fieldAliases.put("RWBSM", "RWBSM");
-            fieldAliases.put("RWLX", "RWLX");
-            esriModel.setFieldAliases(fieldAliases);
-            //geojson绘制范围转换
-            JSONObject geojson = new JSONObject(JSON.parseObject(fzxzDTO.getXzfw()));
-            Geometry geom = (Geometry) JSONObject.toJavaObject(geojson, Geometry.class);
-            //字段信息
-            List<EsriField> fields = new ArrayList<EsriField>();
-            fields.add(new EsriField().init("RWBSM", "RWBSM"));
-            fields.add(new EsriField().init("RWLX", "RWLX"));
-            esriModel.setFields(fields);
-            //要素
-            List<EsriFeature> features = new ArrayList<>();
-            EsriFeature feature = new EsriFeature();
-            Map<String, Object> attributes = new HashMap<>();
-            attributes.put("RWBSM", fzxzDTO.getBsm());
-            attributes.put("RWLX", rwlx);
-            feature.setAttributes(attributes);
-            EsriGeometry geometry = new EsriGeometry();
-            geometry.setRings(geom.getCoordinates());
-            feature.setGeometry(geometry);
-            features.add(feature);
-            esriModel.setFeatures(features);
-
-            // 获取系统的根目录
-            temp = System.getProperty("user.dir")+"\\data";
-
-            vectorFilePath = temp + "\\" + System.currentTimeMillis() + ".json";
-            //写入文件
-            FileOutputStream fos = null;
-            String fileinput = JSON.toJSONString(esriModel);
-            Boolean writeStatus = true;
-            try {
-                fos = new FileOutputStream(vectorFilePath, false);
-                //true表示在文件末尾追加
-                fos.write(fileinput.toString().getBytes());
-                fos.close();
-            } catch (FileNotFoundException e) {
-                fos.close();
-                e.printStackTrace();
-                writeStatus = false;
-            }
-            if (!writeStatus) {
-                return RequestResult.error("自定义范围数据转换失败", null);
-            }
-            Map<String, String> params = new HashMap<>();
-            params.put("json", vectorFilePath);
-            params.put("table", "KJGH.T_FZSS_FXRW_GIS");
-            pyResult = PythonExecute.RunGisHelper(esrijsonPyFun, params);
-            fzxzDTO.setXzfw("");
-        } else if (fxfwDictDTO.getShp().equals(fwlx)) {//shp文件
-            vectorFilePath = fzxzDTO.getXzfw();
-            List<Field> listField = new ArrayList<Field>();
-            listField.add(new Field().init("RWBSM", fzxzDTO.getBsm()));
-            listField.add(new Field().init("RWLX", rwlx));
-            Map<String, Object> params = new HashMap<>();
-            params.put("shpfile", vectorFilePath);
-            params.put("table", "KJGH.T_FZSS_FXRW_GIS");
-            params.put("fields", listField);
-            pyResult = PythonExecute.RunGisHelper(shpPyFun, params);
-            fzxzDTO.setXzfw("");
-        } else {
-            return RequestResult.error("分析类型未定义", null);
-        }
-        if (pyResult.contains("####OK####")) {
-
-        } else if (pyResult.contains("####ERROR####")) {
-            return RequestResult.error("分析范围数据入库失败", 0);
-        }
-        System.out.println("辅助选址分析范围要素插入成功!! RWBSM = " + fzxzDTO.getBsm());
+        // Integer fwlx = fzxzDTO.getFwlx();
+        // rwlx = StringUtils.isEmpty(rwlx) ? "辅助选址" : rwlx;
+        // String vectorFilePath = "";
+        // String pyResult = "";
+        // if (fxfwDictDTO.getRegion().equals(fwlx)) {
+        //
+        // } else if (fxfwDictDTO.getDraw().equals(fwlx)) {//自定义绘制范围
+        //     EsriJsonModel esriModel = new EsriJsonModel();
+        //     //字段汉化
+        //     Map<String, String> fieldAliases = new HashMap<>();
+        //     fieldAliases.put("RWBSM", "RWBSM");
+        //     fieldAliases.put("RWLX", "RWLX");
+        //     esriModel.setFieldAliases(fieldAliases);
+        //     //geojson绘制范围转换
+        //     JSONObject geojson = new JSONObject(JSON.parseObject(fzxzDTO.getXzfw()));
+        //     Geometry geom = (Geometry) JSONObject.toJavaObject(geojson, Geometry.class);
+        //     //字段信息
+        //     List<EsriField> fields = new ArrayList<EsriField>();
+        //     fields.add(new EsriField().init("RWBSM", "RWBSM"));
+        //     fields.add(new EsriField().init("RWLX", "RWLX"));
+        //     esriModel.setFields(fields);
+        //     //要素
+        //     List<EsriFeature> features = new ArrayList<>();
+        //     EsriFeature feature = new EsriFeature();
+        //     Map<String, Object> attributes = new HashMap<>();
+        //     attributes.put("RWBSM", fzxzDTO.getBsm());
+        //     attributes.put("RWLX", rwlx);
+        //     feature.setAttributes(attributes);
+        //     EsriGeometry geometry = new EsriGeometry();
+        //     geometry.setRings(geom.getCoordinates());
+        //     feature.setGeometry(geometry);
+        //     features.add(feature);
+        //     esriModel.setFeatures(features);
+        //
+        //     // 获取系统的根目录
+        //     temp = System.getProperty("user.dir")+"\\data";
+        //
+        //     vectorFilePath = temp + "\\" + System.currentTimeMillis() + ".json";
+        //     //写入文件
+        //     FileOutputStream fos = null;
+        //     String fileinput = JSON.toJSONString(esriModel);
+        //     Boolean writeStatus = true;
+        //     try {
+        //         fos = new FileOutputStream(vectorFilePath, false);
+        //         //true表示在文件末尾追加
+        //         fos.write(fileinput.toString().getBytes());
+        //         fos.close();
+        //     } catch (FileNotFoundException e) {
+        //         fos.close();
+        //         e.printStackTrace();
+        //         writeStatus = false;
+        //     }
+        //     if (!writeStatus) {
+        //         return RequestResult.error("自定义范围数据转换失败", null);
+        //     }
+        //     Map<String, String> params = new HashMap<>();
+        //     params.put("json", vectorFilePath);
+        //     params.put("table", "KJGH.T_FZSS_FXRW_GIS");
+        //     pyResult = PythonExecute.RunGisHelper(esrijsonPyFun, params);
+        //     fzxzDTO.setXzfw("");
+        // } else if (fxfwDictDTO.getShp().equals(fwlx)) {//shp文件
+        //     vectorFilePath = fzxzDTO.getXzfw();
+        //     List<Field> listField = new ArrayList<Field>();
+        //     listField.add(new Field().init("RWBSM", fzxzDTO.getBsm()));
+        //     listField.add(new Field().init("RWLX", rwlx));
+        //     Map<String, Object> params = new HashMap<>();
+        //     params.put("shpfile", vectorFilePath);
+        //     params.put("table", "KJGH.T_FZSS_FXRW_GIS");
+        //     params.put("fields", listField);
+        //     pyResult = PythonExecute.RunGisHelper(shpPyFun, params);
+        //     fzxzDTO.setXzfw("");
+        // } else {
+        //     return RequestResult.error("分析类型未定义", null);
+        // }
+        // if (pyResult.contains("####OK####")) {
+        //
+        // } else if (pyResult.contains("####ERROR####")) {
+        //     return RequestResult.error("分析范围数据入库失败", 0);
+        // }
+        // System.out.println("辅助选址分析范围要素插入成功!! RWBSM = " + fzxzDTO.getBsm());
         return null;
     }
 }

+ 32 - 0
onemap-modules/onemap-analyse/src/main/resources/mapper/oracle/base/ShpFileMapper.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.analyse.mapper.base.ShpFileMapper">
+
+    <!-- 可根据自己的需求,是否要使用 -->
+<!--    <resultMap type="com.onemap.file.domain.GeomResourceDTO" id="shpFileMap">-->
+<!--    </resultMap>-->
+
+    <resultMap type="com.onemap.analyse.domain.res.GeomRes" id="geomResMap">
+
+    </resultMap>
+
+    <insert id="saveGeom">
+        INSERT INTO t_fzss_zhxz_file (id, filepath, zippath, geom, from_type, create_time, area, from_route)
+        VALUES (#{id},
+                #{filepath},
+                #{zippath},
+                public.st_transform(public.st_geomfromewkt(#{geom,jdbcType=OTHER}), 4326),
+                #{fromType}, now(),
+                public.st_area(public.st_geomfromewkt(#{geom,jdbcType=OTHER})::public.geography),
+                #{fromRoute})
+    </insert>
+    <select id="getOne" resultMap="geomResMap">
+        SELECT id,
+               public.st_asewkt(geom) AS geom,
+               area,
+               create_time
+        FROM t_fzss_zhxz_file
+        WHERE id = #{id}
+    </select>
+</mapper>

+ 3 - 3
onemap-modules/onemap-analyse/src/main/resources/mapper/oracle/vector/GhdkaMapper.xml

@@ -3,10 +3,10 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.onemap.analyse.mapper.vector.GhdkaMapper">
-    <select id="getIdByGeom" parameterType="String" resultType="java.lang.Integer">
+    <select id="getIdByGeom" parameterType="map" resultType="java.lang.Integer">
         SELECT id
-        FROM "GHDKA"
-        WHERE public.st_contains(public.st_geometryfromtext(#{geom}, 4326), geom);
+        FROM "${sjy}"
+        WHERE public.st_contains(public.st_geomfromewkt(#{geom,jdbcType=OTHER}), geom);
     </select>
 
     <select id="getIdByFilter" parameterType="com.onemap.analyse.domain.query.GhdkaFilter"

+ 1 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/FzxzServiceImpl.java

@@ -32,7 +32,7 @@ public class FzxzServiceImpl implements IFzxzService {
     @Override
     public RequestResult GetSjyList(String param) {
         try {
-            QueryWrapper<FzxzSjyDTO> wrapper = new QueryWrapper<FzxzSjyDTO>();
+            QueryWrapper<FzxzSjyDTO> wrapper = new QueryWrapper<>();
             if (!StringUtils.isEmpty(param)) {
                 wrapper.eq("bsm", param);
             }