瀏覽代碼

fea: local test

unknown 10 月之前
父節點
當前提交
f8482a0662

+ 8 - 4
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataAugmentationServiceImpl.java

@@ -238,15 +238,19 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
         makeDir(inputPath.toString());
         makeDir(outputPath.toString());
         makeDir(localPath.toString());
+        //本地测试代码
 //        String inputPath = "D:\\program\\taais\\duijie\\code\\" + fileName_without_suffix + "_images";
 //        String outputPath = "D:\\program\\taais\\duijie\\code\\" + fileName_without_suffix + "_output";
 //        String logPath = "D:\\program\\taais\\duijie\\code\\" + fileName_without_suffix + "_log";
-//        makeDir(inputPath);
-//        makeDir(outputPath);
-//        makeDir(logPath);
+        makeDir(inputPath.toString());
+        makeDir(outputPath.toString());
+        makeDir(logPath.toString());
+        int lastUnderscoreIndex = fileName_without_suffix.lastIndexOf('_');
         ZipUtils.unzip(resourcePath, inputPath.toString());
+//        String inputPath = "D:\\program\\taais\\duijie\\code\\" + fileName_without_suffix + "_images\\" + fileName_without_suffix.substring(0, lastUnderscoreIndex);
+        String inputPathString = inputPath.toString() + fileName_without_suffix.substring(0, lastUnderscoreIndex);
         dataAugmentation.setLog(logPath.toString());
-        dataAugmentation.setInputPath(inputPath.toString());
+        dataAugmentation.setInputPath(inputPathString);
         dataAugmentation.setOutputPath(outputPath.toString());
 
         dataAugmentation.setStartTime(new Date());