LAPTOP-BJJ3IV5R\SIWEI 7 сар өмнө
parent
commit
66276982b6

+ 4 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/RemoteFileService.java

@@ -1,6 +1,7 @@
 package com.onemap.system.api;
 
 import com.onemap.common.core.domain.UploadZipDTO;
+import com.onemap.common.core.web.domain.RequestResult;
 import com.onemap.system.api.domain.GhtgCl;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.http.MediaType;
@@ -65,4 +66,7 @@ public interface RemoteFileService {
      */
     @RequestMapping("/file/uploadAppendix")
     R<List<SysFile>> uploadAppendix(MultipartFile[] files);
+
+    @GetMapping("/upload/geom/query")
+    RequestResult uploadGeomQuery(@RequestParam("id") String id, @RequestParam("isDetail") Integer isDetail);
 }

+ 7 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/factory/RemoteFileFallbackFactory.java

@@ -1,11 +1,13 @@
 package com.onemap.system.api.factory;
 
 import com.onemap.common.core.domain.UploadZipDTO;
+import com.onemap.common.core.web.domain.RequestResult;
 import com.onemap.system.api.domain.GhtgCl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.cloud.openfeign.FallbackFactory;
 import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.multipart.MultipartFile;
 import com.onemap.common.core.domain.R;
 import com.onemap.system.api.RemoteFileService;
@@ -50,6 +52,11 @@ public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileServ
             public R<List<SysFile>> uploadAppendix(MultipartFile[] files) {
                 return R.fail("上传文件失败:" + throwable.getMessage());
             }
+
+            @Override
+            public RequestResult uploadGeomQuery(String id, Integer isDetail) {
+                return RequestResult.error("内部错误");
+            }
         };
     }
 }

+ 21 - 11
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/gdbh/GdbhDto.java

@@ -11,6 +11,10 @@ public class GdbhDto {
     private String bsm;
     private String xmmc;//项目名称
     private String xzfw;//选址范围
+    @TableField(value = "xzfw_tbale_name")
+    private String xzfwTbaleName;//选址范围对应的表
+    @TableField(value = "xzfw_tbale_id")
+    private String xzfwTbaleId;//选址范围对应的表
     private Double xzmj;//选址面积
     private Date rwkssj;//开始
     private Date rwjssj;//结束
@@ -28,9 +32,7 @@ public class GdbhDto {
     private String jssj;//结束 前端使用
     @TableField(exist = false)
     private List<GdbhRwMxDto> mxlist;
-    @TableField(exist = false)
-    private Double sumMj;
-    @TableField(exist = false)
+    @TableField(value = "sum_number")
     private Integer sumNumber;
 
     public String getBsm() {
@@ -153,14 +155,6 @@ public class GdbhDto {
         this.cjUserId = cjUserId;
     }
 
-    public Double getSumMj() {
-        return sumMj;
-    }
-
-    public void setSumMj(Double sumMj) {
-        this.sumMj = sumMj;
-    }
-
     public Integer getSumNumber() {
         return sumNumber;
     }
@@ -168,4 +162,20 @@ public class GdbhDto {
     public void setSumNumber(Integer sumNumber) {
         this.sumNumber = sumNumber;
     }
+
+    public String getXzfwTbaleName() {
+        return xzfwTbaleName;
+    }
+
+    public void setXzfwTbaleName(String xzfwTbaleName) {
+        this.xzfwTbaleName = xzfwTbaleName;
+    }
+
+    public String getXzfwTbaleId() {
+        return xzfwTbaleId;
+    }
+
+    public void setXzfwTbaleId(String xzfwTbaleId) {
+        this.xzfwTbaleId = xzfwTbaleId;
+    }
 }

+ 171 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/res/ApiTTable.java

@@ -0,0 +1,171 @@
+package com.onemap.apply.domain.res;
+
+import com.onemap.common.core.annotation.Excel;
+import com.onemap.common.core.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】对象 t_table
+ *
+ * @author ruoyi
+ * @date 2024-08-06
+ */
+public class ApiTTable extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    private String id;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String tableName;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String tableDescribe;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Integer tableType;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Integer isExist;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Date deleteTime;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String createUserId;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String deleteUserId;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String version;
+
+    //table的字段集合
+    private List<ApiTTableFiled> tableFiledlist;
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableDescribe(String tableDescribe) {
+        this.tableDescribe = tableDescribe;
+    }
+
+    public String getTableDescribe() {
+        return tableDescribe;
+    }
+
+    public void setTableType(Integer tableType) {
+        this.tableType = tableType;
+    }
+
+    public Integer getTableType() {
+        return tableType;
+    }
+
+    public void setIsExist(Integer isExist) {
+        this.isExist = isExist;
+    }
+
+    public Integer getIsExist() {
+        return isExist;
+    }
+
+    public void setDeleteTime(Date deleteTime) {
+        this.deleteTime = deleteTime;
+    }
+
+    public Date getDeleteTime() {
+        return deleteTime;
+    }
+
+    public void setCreateUserId(String createUserId) {
+        this.createUserId = createUserId;
+    }
+
+    public String getCreateUserId() {
+        return createUserId;
+    }
+
+    public void setDeleteUserId(String deleteUserId) {
+        this.deleteUserId = deleteUserId;
+    }
+
+    public String getDeleteUserId() {
+        return deleteUserId;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("tableName", getTableName())
+                .append("tableDescribe", getTableDescribe())
+                .append("tableType", getTableType())
+                .append("isExist", getIsExist())
+                .append("createTime", getCreateTime())
+                .append("deleteTime", getDeleteTime())
+                .append("createUserId", getCreateUserId())
+                .append("deleteUserId", getDeleteUserId())
+                .append("version", getVersion())
+                .toString();
+    }
+
+    public List<ApiTTableFiled> getTableFiledlist() {
+        return tableFiledlist;
+    }
+
+    public void setTableFiledlist(List<ApiTTableFiled> tableFiledlist) {
+        this.tableFiledlist = tableFiledlist;
+    }
+}

+ 166 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/res/ApiTTableFiled.java

@@ -0,0 +1,166 @@
+package com.onemap.apply.domain.res;
+
+import com.onemap.common.core.annotation.Excel;
+import com.onemap.common.core.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 【请填写功能名称】对象 t_table_filed
+ * 
+ * @author ruoyi
+ * @date 2024-08-06
+ */
+public class ApiTTableFiled extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private String id;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String filedName;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String filedZh;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String filedDescribe;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String filedType;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String filedTypeLen;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String filedDict;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Date deleteTime;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String createUserId;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String deleteUserId;
+
+    public void setId(String id) 
+    {
+        this.id = id;
+    }
+
+    public String getId() 
+    {
+        return id;
+    }
+    public void setFiledName(String filedName) 
+    {
+        this.filedName = filedName;
+    }
+
+    public String getFiledName() 
+    {
+        return filedName;
+    }
+    public void setFiledZh(String filedZh) 
+    {
+        this.filedZh = filedZh;
+    }
+
+    public String getFiledZh() 
+    {
+        return filedZh;
+    }
+    public void setFiledDescribe(String filedDescribe) 
+    {
+        this.filedDescribe = filedDescribe;
+    }
+
+    public String getFiledDescribe() 
+    {
+        return filedDescribe;
+    }
+    public void setFiledType(String filedType) 
+    {
+        this.filedType = filedType;
+    }
+
+    public String getFiledType() 
+    {
+        return filedType;
+    }
+    public void setFiledTypeLen(String filedTypeLen) 
+    {
+        this.filedTypeLen = filedTypeLen;
+    }
+
+    public String getFiledTypeLen() 
+    {
+        return filedTypeLen;
+    }
+    public void setFiledDict(String filedDict) 
+    {
+        this.filedDict = filedDict;
+    }
+
+    public String getFiledDict() 
+    {
+        return filedDict;
+    }
+    public void setDeleteTime(Date deleteTime) 
+    {
+        this.deleteTime = deleteTime;
+    }
+
+    public Date getDeleteTime() 
+    {
+        return deleteTime;
+    }
+    public void setCreateUserId(String createUserId) 
+    {
+        this.createUserId = createUserId;
+    }
+
+    public String getCreateUserId() 
+    {
+        return createUserId;
+    }
+    public void setDeleteUserId(String deleteUserId) 
+    {
+        this.deleteUserId = deleteUserId;
+    }
+
+    public String getDeleteUserId() 
+    {
+        return deleteUserId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("filedName", getFiledName())
+            .append("filedZh", getFiledZh())
+            .append("filedDescribe", getFiledDescribe())
+            .append("filedType", getFiledType())
+            .append("filedTypeLen", getFiledTypeLen())
+            .append("filedDict", getFiledDict())
+            .append("createTime", getCreateTime())
+            .append("deleteTime", getDeleteTime())
+            .append("createUserId", getCreateUserId())
+            .append("deleteUserId", getDeleteUserId())
+            .toString();
+    }
+}

+ 1 - 2
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/impl/GdbhHandleService.java

@@ -32,8 +32,7 @@ public class GdbhHandleService {
 
     void gdbhAnalysisHandle(GdbhDto gdbhDto) {
         //获取范围
-        String xzfw = gdbhDto.getGeom();
-        String d_RawTableName = "TB_GPL0";
+        String d_RawTableName = gdbhDto.getXzfwTbaleName();
 
         //获取因子
         QueryWrapper<GdbhYzDTO> yzWrapper = new QueryWrapper<>();

+ 35 - 55
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/impl/GdbhJgService.java

@@ -1,16 +1,21 @@
 package com.onemap.apply.service.gdbh.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.onemap.apply.domain.gdbh.*;
+import com.onemap.apply.domain.gdbh.GdbhDto;
+import com.onemap.apply.domain.gdbh.GdbhRwMxDto;
+import com.onemap.apply.domain.gdbh.GdbhRwMxYzDto;
+import com.onemap.apply.domain.gdbh.GdbhYzDTO;
+import com.onemap.apply.domain.res.ApiTTable;
+import com.onemap.apply.domain.res.ApiTTableFiled;
 import com.onemap.apply.mapper.gdbh.*;
 import com.onemap.apply.service.analyse.HttpAnalyseService;
 import com.onemap.common.core.utils.NumberUtil;
 import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.domain.AjaxResult;
 import com.onemap.common.core.web.domain.RequestResult;
-import com.onemap.system.api.domain.IntersectionTableWktVo;
-import com.onemap.system.api.domain.IntersectsTableWktVo;
+import com.onemap.system.api.TableFiledRelationService;
 import com.onemap.system.api.domain.RawTableVo;
-import com.onemap.system.api.domain.TargetTableVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -33,6 +38,8 @@ public class GdbhJgService {
     private GdbhRwMxMapper gdbhRwMxMapper;
     @Autowired
     private GdbhRwMxYzMapper gdbhRwMxYzMapper;
+    @Autowired
+    private TableFiledRelationService tableFiledRelationService;
 
     public RequestResult gdbhAnalysisHandle(String rwBsm) {
         QueryWrapper<GdbhDto> wrapper0_1 = new QueryWrapper<>();
@@ -42,23 +49,6 @@ public class GdbhJgService {
             return RequestResult.error("未查询到数据");
         }
 
-        //
-        gdbhDto.setSumMj(255D);
-        gdbhDto.setSumNumber(255);
-
-        //获取范围
-        Map xzfw = gdbhMapper.selectGdbhXzfw(gdbhDto.getXzfw());
-        if (StringUtils.isEmpty(xzfw)) {
-            return RequestResult.error("选址范围参数为空");
-        }
-        Double area = Double.valueOf(xzfw.get("area").toString());
-        String ewkt = (String) xzfw.get("geom");
-        if (StringUtils.isEmpty(ewkt)) {
-            return RequestResult.error("选址范围参数为空");
-        }
-        gdbhDto.setGeom(ewkt);
-        gdbhDto.setXzmj(area);
-
         //计算1 模型
         QueryWrapper<GdbhRwMxDto> wrapper0_2 = new QueryWrapper<>();
         wrapper0_2.eq("rwbsm", rwBsm);
@@ -129,7 +119,15 @@ public class GdbhJgService {
         if (StringUtils.isEmpty(yzbsm)) {
             return RequestResult.error("yzbsm参数为空");
         }
-        String d_RawTableName = "TB_GPL0";
+
+        QueryWrapper<GdbhDto> wrapper0_1 = new QueryWrapper<>();
+        wrapper0_1.eq("bsm", bsm);
+        GdbhDto gdbhDto = gdbhMapper.selectOne(wrapper0_1);
+        if (StringUtils.isNull(gdbhDto)) {
+            return RequestResult.error("未查询到数据");
+        }
+        String d_RawTableName = gdbhDto.getXzfwTbaleName();
+
         List<Map<String, Object>> d_sandiao = gdbhRwJgMapper.selectGdbhRwJgGroup(bsm, mxbsm, yzbsm);
         List<String> ids = new ArrayList<>();
         for (Map<String, Object> mx : d_sandiao) {
@@ -173,23 +171,6 @@ public class GdbhJgService {
             return RequestResult.error("未查询到数据");
         }
 
-        //
-        gdbhDto.setSumMj(255D);
-        gdbhDto.setSumNumber(255);
-
-        //获取范围
-        Map xzfw = gdbhMapper.selectGdbhXzfw(gdbhDto.getXzfw());
-        if (StringUtils.isEmpty(xzfw)) {
-            return RequestResult.error("选址范围参数为空");
-        }
-        Double area = Double.valueOf(xzfw.get("area").toString());
-        String ewkt = (String) xzfw.get("geom");
-        if (StringUtils.isEmpty(ewkt)) {
-            return RequestResult.error("选址范围参数为空");
-        }
-        gdbhDto.setGeom(ewkt);
-        gdbhDto.setXzmj(area);
-
         //计算1 模型
         QueryWrapper<GdbhRwMxDto> wrapper0_2 = new QueryWrapper<>();
         wrapper0_2.eq("rwbsm", rwBsm);
@@ -238,26 +219,25 @@ public class GdbhJgService {
             ret.add(mxMap);
         }
 
-        String d_RawTableName = "TB_GPL0";
+        String d_RawTableName = gdbhDto.getXzfwTbaleName();
+
+        //查询tableid
+        String tableId = gdbhDto.getXzfwTbaleId();
+        AjaxResult ajaxResult = tableFiledRelationService.QueryTableFiledRelation(tableId);
+        if (!ajaxResult.isSuccess()) {
+            return null;
+        }
+        Object tableStr = ajaxResult.get(AjaxResult.DATA_TAG);
+        ApiTTable tTable = JSON.parseObject(JSON.toJSONString(tableStr), ApiTTable.class);
+
         List<String> ids = new ArrayList<>();
         ids.add(id);
 
+        List<ApiTTableFiled> filedList = tTable.getTableFiledlist();
         List<String> columns = new ArrayList<>(); // 列名
-        columns.add("tbbh");
-        columns.add("nfqsmc");
-        columns.add("xfrq");
-        columns.add("mj");
-        columns.add("zygdmj");
-        columns.add("zyjbntmj");
-        columns.add("qsx");
-        columns.add("hsx");
-        columns.add("qqyxmc");
-        columns.add("dqyxmc");
-        columns.add("tbfl");
-        columns.add("bz");
-        columns.add("sfhcmc");
-        columns.add("sfdcmc");
-
+        for (ApiTTableFiled filed : filedList) {
+            columns.add(filed.getFiledName());
+        }
         RawTableVo d0_vo = new RawTableVo();
         d0_vo.setIds(ids);
         d0_vo.setSrid(4525);

+ 17 - 2
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/impl/GdbhServiceImpl.java

@@ -6,6 +6,7 @@ import com.onemap.apply.mapper.gdbh.*;
 import com.onemap.apply.service.gdbh.IGdbhService;
 import com.onemap.common.core.utils.StringUtils;
 import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.system.api.RemoteFileService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -33,6 +34,8 @@ public class GdbhServiceImpl implements IGdbhService {
     private GdbhHandleService gdbhHandleService;
     @Autowired
     private GdbhJgService gdbhJgService;
+    @Autowired
+    private RemoteFileService remoteFileService;
 
     @Override
     public RequestResult GetMxList(String param) {
@@ -96,17 +99,29 @@ public class GdbhServiceImpl implements IGdbhService {
     @Override
     public RequestResult AddGdbh(GdbhDto gdbhDto) {
         try {
-            Map xzfw = gdbhMapper.selectGdbhXzfw(gdbhDto.getXzfw());
-            if (StringUtils.isEmpty(xzfw)) {
+            RequestResult resultData = remoteFileService.uploadGeomQuery(gdbhDto.getXzfw(), 0);
+            if (resultData.isError()) {
+                return resultData;
+            }
+            Map<String, Object> xzfw = (Map) resultData.get(RequestResult.DATA_TAG);
+            if (xzfw == null) {
                 return RequestResult.error("选址范围参数为空");
             }
             Double area = Double.valueOf(xzfw.get("area").toString());
             String ewkt = (String) xzfw.get("geom");
+            String tableName = (String) xzfw.get("tableName");
+            String tableId = (String) xzfw.get("filepath");
+            Integer number = (Integer) xzfw.get("number");
             if (StringUtils.isEmpty(ewkt)) {
                 return RequestResult.error("选址范围参数为空");
             }
+
             String rebsm = StringUtils.getUUID();
             gdbhDto.setGeom(ewkt);
+            gdbhDto.setXzfwTbaleName(tableName);
+            gdbhDto.setXzfwTbaleId(tableId);
+            gdbhDto.setSumNumber(number);
+            gdbhDto.setXzfwTbaleId(tableId);
             gdbhDto.setXzmj(area);
             gdbhDto.setBsm(rebsm);
             gdbhDto.setStatus(1);

+ 1 - 1
onemap-modules/onemap-file/src/main/java/com/onemap/file/controller/SysFileController.java

@@ -217,7 +217,7 @@ public class SysFileController {
 
     @GetMapping("/upload/geom/query")
     public RequestResult uploadGeomQuery(String id, Integer isDetail) {
-        return RequestResult.error("上传失败!", spaceFileRecordService.querySpaceFileRecord(id, isDetail));
+        return RequestResult.success("执行成功!", spaceFileRecordService.querySpaceFileRecord(id, isDetail));
     }
 
 

+ 2 - 0
onemap-modules/onemap-file/src/main/java/com/onemap/file/domain/SpaceFileRecordDTO.java

@@ -20,6 +20,8 @@ public class SpaceFileRecordDTO {
     private Date createTime;
     @TableField(value = "from_route")
     private String fromRoute;
+    @TableField(value = "table_name")
+    private String tableName;
     private String geom;
     private Double area;
     private Integer number;

+ 2 - 0
onemap-modules/onemap-file/src/main/java/com/onemap/file/service/impl/SpaceFileRecordServiceImpl.java

@@ -93,11 +93,13 @@ public class SpaceFileRecordServiceImpl implements ISpaceFileRecordService {
             Map<String, Object> d_map_0 = d_list_0.get(0);
             int siweicount = (int) d_map_0.get("siweicount");
             Double siweiarea = (Double) d_map_0.get("siweiarea");
+            siweiarea = Math.round(siweiarea * 100) / 100.0;
             String sumgeom = (String) d_map_0.get("geom");
 
             dto.setArea(siweiarea);
             dto.setNumber(siweicount);
             dto.setGeom(sumgeom);
+            dto.setTableName(tTable.getTableName());
             spaceFileRecordMapper.updateSpaceFileRecord(dto);
         }
 

+ 11 - 1
onemap-modules/onemap-file/src/main/resources/mapper/postgresql/SpaceFileRecordMapper.xml

@@ -5,7 +5,15 @@
 
     <!-- 可根据自己的需求,是否要使用 -->
     <resultMap type="com.onemap.file.domain.SpaceFileRecordDTO" id="spaceFileRecordResult">
-
+        <result property="zippath" column="zippath"/>
+        <result property="number" column="number"/>
+        <result property="id" column="id"/>
+        <result property="geom" column="geom"/>
+        <result property="fromType" column="from_type"/>
+        <result property="fromRoute" column="from_route"/>
+        <result property="tableName" column="table_name"/>
+        <result property="filepath" column="filepath"/>
+        <result property="area" column="area"/>
     </resultMap>
 
     <insert id="saveSpaceFileRecord">
@@ -24,6 +32,7 @@
                public.st_asewkt(geom) AS geom,
                from_type,
                from_route,
+               table_name,
                filepath,
                create_time,
                area
@@ -39,6 +48,7 @@
             </if>
             <if test="area != null and area != ''">area = #{area},</if>
             <if test="number != null and number != ''">"number" = #{number},</if>
+            <if test="tableName != null and tableName != ''">"table_name" = #{tableName},</if>
             id = #{id}
         </set>
         where id = #{id}

+ 0 - 3
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/impl/ShpFileSaveServiceImpl.java

@@ -9,11 +9,9 @@ import org.geotools.data.FeatureSource;
 import org.geotools.data.shapefile.ShapefileDataStore;
 import org.geotools.data.simple.SimpleFeatureCollection;
 import org.geotools.data.simple.SimpleFeatureIterator;
-import org.geotools.data.simple.SimpleFeatureSource;
 import org.geotools.referencing.CRS;
 import org.locationtech.jts.geom.Geometry;
 import org.opengis.feature.simple.SimpleFeature;
-import org.opengis.feature.simple.SimpleFeatureType;
 import org.opengis.feature.type.AttributeDescriptor;
 import org.opengis.feature.type.GeometryType;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
@@ -35,7 +33,6 @@ public class ShpFileSaveServiceImpl implements IShpFileSaveService {
 
     @Override
     public String readFile(String filepath) {
-        System.out.println("filepath:" + filepath);
         return readShapeFile(new File(filepath));
 //        readShapeFile(new File("D:\\02DATA\\三亚\\甲方数据\\权属\\SHP\\国有使用权去掉.shp"));
     }