cc 8 godzin temu
rodzic
commit
bbe2f6a9b6

+ 8 - 7
ai-server/src/main/java/com/zsjz/ai/module/dm/service/DmService.java

@@ -194,14 +194,15 @@ public class DmService {
 
         Path saved = saveUploadedFile(file, currentBatchId, originalName);
 
+        // 【临时禁用:演示测试需要重复上传同一文件,测试完成后还原此段】
         // 重新清洗时跳过 MD5 去重(历史文件 md5 已存在于 file_info,否则会被全部过滤)
-        if (reClean == null || reClean != 1) {
-            List<Path> kept = filterExistsMd5Files(List.of(saved));
-            if (kept.isEmpty()) {
-                log.info("上传文件与已导入文件重复,跳过解析: {}, batchId={}", originalName, currentBatchId);
-                return null;
-            }
-        }
+        // if (reClean == null || reClean != 1) {
+        //     List<Path> kept = filterExistsMd5Files(List.of(saved));
+        //     if (kept.isEmpty()) {
+        //         log.info("上传文件与已导入文件重复,跳过解析: {}, batchId={}", originalName, currentBatchId);
+        //         return null;
+        //     }
+        // }
 
         // 单文件串行解析,无需并发控制信号量;返回树形根节点(含 children sheets),重复文件返回 null
         FileInfo root = buildPreviewTree(processPreviewFile(saved, currentBatchId)).stream().findFirst().orElse(null);