diff --git a/java/src/main/java/com/yfd/platform/modules/specialDocument/service/impl/NodesServiceImpl.java b/java/src/main/java/com/yfd/platform/modules/specialDocument/service/impl/NodesServiceImpl.java index 043bec6..80f8f07 100644 --- a/java/src/main/java/com/yfd/platform/modules/specialDocument/service/impl/NodesServiceImpl.java +++ b/java/src/main/java/com/yfd/platform/modules/specialDocument/service/impl/NodesServiceImpl.java @@ -968,6 +968,9 @@ public class NodesServiceImpl extends ServiceImpl implements // 4. 构建解压目标路径 例如 D:\yun\temporary\111 Path destRoot = Paths.get(storageSourceConfig.getValue(), decompressionPath, zipName); + LOGGER.info("要解压文件路径:{}", zipFilePath); + LOGGER.info("解压以后文件路径:{}", destRoot); + //todo 如果项目不存在 直接拷贝到目标路径下 拷贝完成以后 然后新增一个项目结构 然后走一遍扫描 @@ -980,13 +983,17 @@ public class NodesServiceImpl extends ServiceImpl implements unzipToTemp(zipFilePath, String.valueOf(destRoot)); // 执行上传并且插入数据库 this.documentUploadById(id, sourceFolderPath, targetFolderPath, storageSourceConfig.getValue()); - //开始执行更新表数据 名称是去掉后缀以后的 uploadProject(zipName); + LOGGER.info("开始更新表数据:{}", zipName); //获取文件路径 String path = storageSourceConfig.getValue() + decompressionPath; // 替换为实际路径 - File target = new File(path); + File targetZip = new File(String.valueOf(zipFilePath)); + File target = new File(String.valueOf(destRoot)); + //删除临时文件ZIP + deleteDirectory(targetZip); + //删除临时文件 deleteDirectory(target); } catch (IOException e) { throw new RuntimeException(e);