소스 검색

Revert "质检-同步合同段-复制文件时如果文件存在就覆盖"

This reverts commit 6ec3df09e7c591c73f6627571fc1c1fe3cb40518.
LHB 3 주 전
부모
커밋
4b052acacc

+ 2 - 5
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -82,7 +82,6 @@ import java.io.*;
 import java.net.URLEncoder;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.StandardCopyOption;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
@@ -1060,16 +1059,14 @@ public class InformationWriteQueryController extends BladeController {
                             Path sourcePath = FileUtils.getOrDownloadFile(htmlUrl);
                             // 生成副本路径
                             Path copyPath = FileUtils.generateCopyPath(sourcePath);
-                            // 执行复制操作(覆盖已存在的文件
-                            Files.copy(sourcePath, copyPath, StandardCopyOption.REPLACE_EXISTING);
+                            // 复制文件
+                            Files.copy(sourcePath, copyPath);
 
-                            oldHtml.setContractFormId(wbsTreeContract.getPKeyId());
                             oldHtml.setOldHtmlUrl(copyPath.toFile().getAbsolutePath());
                             data.add(oldHtml);
                         }
                         wbsTreeContractOldHtmlClient.save(data);
                     } catch (Exception e) {
-                        e.printStackTrace();
                         throw new ServiceException(e.getMessage());
                     }
                 }