WANGKANG 8 miesięcy temu
rodzic
commit
65dcff62cf

+ 3 - 3
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/ToInfraredServiceImpl.java

@@ -247,12 +247,12 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
 
         Path path = Paths.get(resourcePath);
         Path inputPath = path.resolveSibling(fileName_without_suffix + BizConstant.UNZIP_SUFFIX);
-        Path outputPath = path.resolveSibling(fileName_without_suffix + BizConstant.TO_INFRARED_SUFFIX);
+        Path outputPath = path.resolveSibling(entity.getId().toString() + BizConstant.TO_INFRARED_SUFFIX);
 
         makeDir(inputPath.toString());
         makeDir(outputPath.toString());
 
-        File file = new File(resourcePath);
+        File file = new File(inputPath.toString());
         if (!file.exists()) {
             ZipUtils.unzip(resourcePath, inputPath.toString());
         }
@@ -395,7 +395,7 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
             return CommonResult.success(log, "success");
         } catch (Exception e) {
             e.printStackTrace();
-            return CommonResult.fail("读取日志失败!");
+            return CommonResult.fail("读取日志失败!" + e.getMessage());
         }
     }