月球大数据地理空间分析展示平台-【后端】-月球后台服务
1
13693261870
2024-11-17 796b44ea813a1133beae4f3a67f1c0263510c0c7
src/main/java/com/moon/server/service/show/PipelineService.java
@@ -23,11 +23,8 @@
import java.util.List;
import java.util.Map;
/**
 * 管道分析服务类
 * @author WWW
 */
@Service
@SuppressWarnings("ALL")
public class PipelineService implements PipelineMapper {
    @Autowired
    PathHelper pathHelper;
@@ -57,14 +54,6 @@
        return pipelineMapper.selectPipeAnalysis(tab, gid);
    }
    /**
     * 创建Zip包
     *
     * @param ue  用户实体
     * @param map 管道分析数据集合
     * @param pwd 密码
     * @return 下载文件GUID
     */
    public String createZipFile(UserEntity ue, Map<String, List<PipelineEntity>> map, String pwd) throws Exception {
        String tempName = StringHelper.YMDHMS2_FORMAT.format(new Date());
        String tempPath = pathHelper.getTempPath(tempName);
@@ -90,9 +79,6 @@
        return rows > 0 ? downloadEntity.getGuid() : null;
    }
    /**
     * 创建GDB
     */
    public static void createGdb(String filePath, Map<String, List<PipelineEntity>> map) throws Exception {
        Driver driver = null;
        DataSource dataSource = null;
@@ -136,9 +122,6 @@
        }
    }
    /**
     * 创建图层
     */
    private static Layer createLayer(DataSource dataSource, String tab, PipelineEntity pe) {
        int geomType = pe.getWkt().contains("POINT") ? ogr.wkbMultiPoint : ogr.wkbMultiLineString;
@@ -148,9 +131,6 @@
        return dataSource.CreateLayer(tab, sr, geomType, null);
    }
    /**
     * 获取字段
     */
    private static void getFields(Class clazz, List<Field> list) {
        try {
            Field[] fields = clazz.getDeclaredFields();
@@ -171,9 +151,6 @@
        }
    }
    /**
     * 设置图层数据
     */
    private static void setLayerData(Layer layer, List<Field> fields, List<PipelineEntity> list) throws Exception {
        for (PipelineEntity t : list) {
            Feature f = new Feature(layer.GetLayerDefn());
@@ -191,9 +168,6 @@
        }
    }
    /**
     * 添加Zip文件
     */
    private void addZipFiles(ZipFile zip, ZipParameters params, File[] files) {
        if (null == files || files.length == 0) {
            return;
@@ -208,9 +182,6 @@
        }
    }
    /**
     * 获取下载实体类
     */
    private DownloadEntity getDownloadEntity(UserEntity ue, String file, String pwd) throws Exception {
        DownloadEntity de = new DownloadEntity();
        de.setName(FileHelper.getFileName(file));