This commit is contained in:
2025-11-25 22:04:13 +08:00
parent 34f508df7a
commit 6525e5ce80

View File

@@ -1055,7 +1055,11 @@ public class ImportService {
String dir1 = saveUrl +"/"+ replace + '/';
String dir = "uploadFile" +"/"+ replace + '/';
File[] files1 = file.listFiles();
Arrays.sort(files1);
if (files1 == null || files1.length == 0) {
continue;
}
// 确保按原始文件名顺序处理
Arrays.sort(files1, Comparator.comparing(File::getName));
if(1==type){
//覆盖 先删除wsjh_20201103104220949_temp_file表的记录
HashMap mapTwo = new HashMap();
@@ -2018,6 +2022,8 @@ public class ImportService {
for (Path path2 : dirStream2) {
fileList2.add(path2);
}
// 确保批量上传时按文件名顺序处理
fileList2.sort(Comparator.comparing(pathEntry -> pathEntry.getFileName().toString()));
if (1 == type) {
//覆盖 先删除wsjh_20201103104220949_temp_file表的记录