管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-12-20 dd5ae83a6e574322e6fc5b851134fa4c40c99627
src/main/java/com/lf/server/service/show/DataLibService.java
@@ -33,7 +33,7 @@
    /**
     * 创建Zip包
     */
    public String createZipFile(UserEntity ue, List<String> entities, String wkt, String pwd) {
    public String createZipFile(UserEntity ue, List<String> entities, String wkt, String pwd) throws Exception {
        Map<String, List<?>> map = queryData(entities, wkt);
        if (map.size() == 0) {
            return null;
@@ -42,6 +42,11 @@
        String tempName = StringHelper.YMDHMS2_FORMAT.format(new Date());
        String tempPath = pathHelper.getTempPath(tempName);
        String filePath = tempPath + File.separator + tempName + ".gdb";
        File file = new File(filePath);
        if (file.exists() && file.isDirectory()) {
            FileHelper.deleteDir(filePath);
        }
        GdbHelper.createGdb(filePath, map);
        return null;
@@ -81,7 +86,7 @@
     */
    private QueryWrapper createWrapper(GeomBaseMapper baseMapper, String wkt) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.select("ST_AsText(geom) as geom");
        wrapper.select("ST_AsText(geom) as geom, *");
        Integer srid = baseQueryService.getSrid(baseMapper);
        wrapper.apply(String.format("ST_Intersects(ST_PolygonFromText('%s', %d), geom)", wkt, srid));