Browse Source

查询切割后的地块

gushoubang 9 tháng trước cách đây
mục cha
commit
084dc34677

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

@@ -14,4 +14,6 @@ public class GeomRes {
     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date createTime;
     private Float area;
+    private Float muArea;
+    private Float m2Area;
 }

+ 0 - 81
onemap-modules/onemap-file/src/main/java/com/onemap/file/service/impl/LocalSysFileServiceImpl.java

@@ -236,87 +236,6 @@ public class LocalSysFileServiceImpl implements ISysFileService {
         }
     }
 
-    // @Override
-    // public RequestResult uploadZhxzZip(MultipartFile file) {
-    //     // 获得文件名称
-    //     String fileName = file.getOriginalFilename();
-    //     // 获得文件后缀名
-    //     String type = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
-    //     // 判断上传的是否是压缩包
-    //     if (!type.equals("zip") && !type.equals("rar")) {
-    //         return RequestResult.error("请上传压缩包", null);
-    //     }
-    //     File dest = new File(shpLocalFilePath + "/" + fileName);
-    //     // 获得上级目录
-    //     File dir = dest.getParentFile();
-    //     if (!dir.exists()) {
-    //         dir.mkdirs();
-    //     }
-    //     // 获取当前时间的时间戳
-    //     long timeMillis = System.currentTimeMillis();
-    //     String shpPath = "";
-    //     try {
-    //         // 上传文件
-    //         file.transferTo(dest);
-    //         // 解压zip格式
-    //         if (type.equals("zip")) {
-    //             new UnPackageUtils().unPackZip(dest, shpLocalFilePath + "/" + timeMillis);
-    //         } else {
-    //             // 解压rar格式
-    //             new UnPackageUtils().unPackRar(dest, shpLocalFilePath + "/" + timeMillis);
-    //         }
-    //         File[] files = new File(shpLocalFilePath + "/" + timeMillis).listFiles();
-    //         for (File file1 : files) {
-    //             if (file1.getAbsolutePath().substring(file1.getAbsolutePath().lastIndexOf(".") + 1).equals("shp")) {
-    //                 shpPath = file1.getAbsolutePath();
-    //                 break;
-    //             }
-    //         }
-    //         if (!"".equals(shpPath)) {
-    //             String uuid = StringUtils.getUUID();
-    //             ZhxzFileDTO insertDto = new ZhxzFileDTO();
-    //             insertDto.setBsm(uuid);
-    //             insertDto.setWj(shpPath);
-    //             insertDto.setYswj(dest.getAbsolutePath());
-    //             zhxzFileMapper.insert(insertDto);
-    //             return RequestResult.success("上传成功", uuid);
-    //         } else {
-    //             return RequestResult.error("未检索到shp文件");
-    //         }
-    //     } catch (IOException e) {
-    //         e.printStackTrace();
-    //         return RequestResult.error("上传失败");
-    //     }
-    // }
-
-    // @Override
-    // public GhtgCl uploadTgcl(MultipartFile file, Integer type) throws Exception {
-    //     GhtgCl cl = new GhtgCl();
-    //     cl.setBsm(StringUtils.getUUID());
-    //     cl.setWjdx((double) file.getSize());
-    //     String filename = file.getOriginalFilename();
-    //     cl.setFjmc(filename);
-    //     String kzmc = PublicTools.getFileKzmx(filename);
-    //     cl.setFjlx(type);
-    //     if (type == tgclTypeDTO.getShp()) {
-    //         RequestResult shpzip = uploadShpZip(file);
-    //         ShpFileDTO shpzipinfo = (ShpFileDTO) shpzip.get("data");
-    //         cl.setWjlj(shpzipinfo.getZippath());
-    //         cl.setYshp(shpzipinfo.getFilepath());
-    //         cl.setGeojson(shpzipinfo.getGeojson());
-    //         cl.setKzmc(kzmc);
-    //         cl.setYwj(shpzipinfo.getZippath());
-    //         return cl;
-    //     } else if (type == tgclTypeDTO.getTgcl()) {
-    //         WordToPdfDTO pdf = uploadWordFileToPdf(file, "tgcl");
-    //         cl.setWjlj(pdf.getPdfpath());
-    //         cl.setKzmc(pdf.getKzmc());
-    //         cl.setYwj(pdf.getFilepath());
-    //         return cl;
-    //     }
-    //     return null;
-    // }
-
     /**
      * 通过shp路径转换esrijson并返回相应json文件路径
      *

+ 2 - 0
onemap-modules/onemap-file/src/main/resources/mapper/postgresql/ShpFileMapper.xml

@@ -26,6 +26,8 @@
         SELECT id,
                public.st_asewkt(geom) AS geom,
                area,
+               area as m2Area,
+               area*0.0015 as muArea,
                create_time
         FROM t_fzss_zhxz_file
         WHERE id = #{id}