管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-12-20 dd5ae83a6e574322e6fc5b851134fa4c40c99627
src/main/java/com/lf/server/service/show/DataLibService.java
@@ -33,23 +33,17 @@
    /**
     * 创建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;
        }
        //String tempName = StringHelper.YMDHMS2_FORMAT.format(new Date());
        //String tempPath = pathHelper.getTempPath(tempName);
        //String filePath = tempPath + File.separator + tempName + ".gdb";
        String tempName = StringHelper.YMDHMS2_FORMAT.format(new Date());
        String tempPath = pathHelper.getTempPath(tempName);
        String filePath = tempPath + File.separator + tempName + ".gdb";
        String filePath = "D:\\LF\\temp\\20221219202706\\20221219202705.gdb";
        File file = new File(filePath);
        if (!file.exists() || !file.isDirectory()) {
            file.mkdirs();
        }
        filePath = "D:\\LF\\temp\\20221219202706\\2022.gdb";
        if (file.exists() && file.isDirectory()) {
            FileHelper.deleteDir(filePath);
        }