Przeglądaj źródła

feat: 可见光转红外训练接口对接完成

WANGKANG 8 miesięcy temu
rodzic
commit
6564f3b9fe

+ 1 - 1
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TargetDetectionServiceImpl.java

@@ -290,7 +290,7 @@ public class TargetDetectionServiceImpl extends BaseServiceImpl<TargetDetectionM
         if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
             targetDetection.setStatus(BizConstant.VideoStatus.INTERRUPTED);
             updateById(targetDetection);
-            return CommonResult.fail("终止任务成功");
+            return CommonResult.success("终止任务成功");
         } else {
             return CommonResult.fail("终止任务失败");
         }

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

@@ -259,8 +259,18 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
         startToInfraredTask.setBizId(toInfrared.getId());
 
         startToInfraredTask.setOtherParams(algorithmConfigTrack.getParameterConfig());
-        startToInfraredTask.setSource_dir(toInfrared.getInputPath());
-        startToInfraredTask.setResult_dir(toInfrared.getOutputPath());
+
+        String osName = System.getProperty("os.name");
+        if (osName.toLowerCase().contains("windows")) {
+            startToInfraredTask.setSource_dir("C://" + toInfrared.getInputPath());
+            startToInfraredTask.setResult_dir("C://" + toInfrared.getOutputPath());
+        } else {
+            startToInfraredTask.setSource_dir(toInfrared.getInputPath());
+            startToInfraredTask.setResult_dir(toInfrared.getOutputPath());
+        }
+
+        // startToInfraredTask.setSource_dir(toInfrared.getInputPath());
+        // startToInfraredTask.setResult_dir(toInfrared.getOutputPath());
 
         if (algorithmConfigTrack.getType() == BizConstant.AlgorithmType.REASONING) {
             startToInfraredTask.setModel_path(algorithmModelTrack.getModelAddress());
@@ -287,7 +297,7 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
         if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
             toInfrared.setStatus(BizConstant.VideoStatus.INTERRUPTED);
             updateById(toInfrared);
-            return CommonResult.fail("终止任务成功");
+            return CommonResult.success("终止任务成功");
         } else {
             return CommonResult.fail("终止任务失败");
         }
@@ -321,6 +331,11 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
         String outputPath = toInfrared.getOutputPath();
         String zipFilePath = outputPath + ".zip";
 
+        String osName = System.getProperty("os.name");
+        if (osName.toLowerCase().contains("windows")) {
+            zipFilePath = "C://" + zipFilePath;
+        }
+
         try {
             ZipUtils.zipFolderFiles(outputPath, zipFilePath);
         } catch (IOException e) {

+ 1 - 1
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TrackSequenceServiceImpl.java

@@ -288,7 +288,7 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
         if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
             trackSequence.setStatus(BizConstant.VideoStatus.INTERRUPTED);
             updateById(trackSequence);
-            return CommonResult.fail("终止任务成功");
+            return CommonResult.success("终止任务成功");
         } else {
             return CommonResult.fail("终止任务失败");
         }