浏览代码

feat: MASC评估接口对接完成

WANGKANG 10 月之前
父节点
当前提交
6b6258b12c

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

@@ -312,8 +312,24 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
             return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
         }
 
-        String outputPath = entity.getOutputPath();
-        String zipFilePath = outputPath + ".zip";
+        String outputPath = "";
+        String zipFilePath = "";
+
+        AlgorithmModelTrack algorithmModelTrack = algorithmModelTrackService.getById(entity.getAlgorithmModelId());
+        AlgorithmConfigTrack algorithmConfigTrack = algorithmConfigTrackService.getById(algorithmModelTrack.getAlgorithmId());
+
+        if(BizConstant.AlgorithmType.REASONING.equals(algorithmConfigTrack.getType())){
+            outputPath = entity.getOutputPath() + File.separator + "predict";
+            zipFilePath = outputPath + ".zip";
+        }
+        else if(BizConstant.AlgorithmType.TEST.equals(algorithmConfigTrack.getType())){
+            outputPath = entity.getOutputPath() + File.separator + "evaluate";
+            zipFilePath = outputPath + ".zip";
+        }
+        else {
+            System.out.println("未知算法类型!");
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
 
         File file = new File(zipFilePath);
         if (!file.exists()) {