管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-12 4d8dd71b7d13fa41132c46831090c6282af502cb
src/main/java/com/lf/server/service/show/MarkService.java
@@ -1,7 +1,6 @@
package com.lf.server.service.show;
import com.lf.server.entity.ctrl.MarkJsonEntity;
import com.lf.server.entity.ctrl.ShpRecordEntity;
import com.lf.server.entity.data.DownloadEntity;
import com.lf.server.entity.data.MetaFileEntity;
import com.lf.server.entity.show.MarkEntity;
@@ -16,6 +15,7 @@
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@@ -123,15 +123,15 @@
        List<MarkJsonEntity> points = getMarkByType(list, "POINT");
        if (points.size() > 0) {
            String pointFile = GdalHelper.createShp(points, path, "POINT");
            String pointFile = ShpHelper.createShp(points, path, "POINT");
        }
        List<MarkJsonEntity> lines = getMarkByType(list, "LINESTRING");
        if (lines.size() > 0) {
            String lineFile = GdalHelper.createShp(lines, path, "LINESTRING");
            String lineFile = ShpHelper.createShp(lines, path, "LINESTRING");
        }
        List<MarkJsonEntity> polygons = getMarkByType(list, "POLYGON");
        if (polygons.size() > 0) {
            String polygonFile = GdalHelper.createShp(polygons, path, "POLYGON");
            String polygonFile = ShpHelper.createShp(polygons, path, "POLYGON");
        }
        return path;
@@ -163,7 +163,7 @@
    }
    private String getZip() {
        String path = pathHelper.getDownloadFullPath() + File.separator + WebHelper.getRandomInt(100000, 1000000) + ".zip";
        String path = pathHelper.getDownloadFullPath() + File.separator + StringHelper.YMDHMS2_FORMAT.format(new Date()) + ".zip";
        File file = new File(path);
        if (file.exists() && !file.isDirectory()) {
@@ -181,7 +181,7 @@
        de.setDcount(0);
        // de.setPwd(null)
        de.setUrl(FileHelper.getRelativePath(file));
        de.setDescr("下载ShapeFile文件");
        de.setDescr("ShapeFile文件");
        de.setGuid(FileHelper.getFileMd5(file));
        de.setCreateUser(ue.getId());
        // de.setGeom(null)
@@ -217,7 +217,7 @@
            return null;
        }
        List<MarkJsonEntity> mjeList = GdalHelper.readShpForMarks(fileName);
        List<MarkJsonEntity> mjeList = ShpHelper.readShpForMarks(fileName);
        FileHelper.deleteFiles(list);
        return mjeList;