Forráskód Böngészése

fix:压缩包直接重命名,不用try异常来重命名了

wangzaijun 1 hónapja
szülő
commit
d536865f14

+ 0 - 0
mo-daq/logs/error.log


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 143 - 0
mo-daq/logs/info.log


+ 2 - 0
mo-daq/logs/warn.log

@@ -0,0 +1,2 @@
+2025-03-26 15:13:43.830 [HikariCP-daq housekeeper] - [] WARN  com.zaxxer.hikari.pool.HikariPool:797  - HikariCP-daq - Thread starvation or clock leap detected (housekeeper delta=49s479ms716µs700ns).
+2025-03-26 15:22:21.443 [HikariCP-daq housekeeper] - [] WARN  com.zaxxer.hikari.pool.HikariPool:797  - HikariCP-daq - Thread starvation or clock leap detected (housekeeper delta=55s599ms187µs).

+ 5 - 10
mo-daq/src/main/java/com/smppw/modaq/infrastructure/util/ExcelUtil.java

@@ -64,16 +64,11 @@ public class ExcelUtil {
                 if (name.startsWith("__MACOSX/")) {
                     continue;
                 }
-                File entryFile;
-                try {
-                    entryFile = FileUtil.file(destFilePath, name);
-                } catch (Exception e) {
-                    String zipFilename = FileUtil.getName(destFilePath);
-                    String ext = FileUtil.extName(name);
-                    name = zipFilename + "_" + i + "." + ext;
-                    entryFile = FileUtil.file(destFilePath, name);
-                    i++;
-                }
+                String zipFilename = FileUtil.getName(destFilePath);
+                String ext = FileUtil.extName(name);
+                name = zipFilename + "_" + i + "." + ext;
+                File entryFile = FileUtil.file(destFilePath, name);
+                i++;
                 if (entry.isDirectory()) {
                     Files.createDirectories(entryFile.toPath());
                 } else {