فهرست منبع

feat: 移除不用方法

WANGKANG 3 ماه پیش
والد
کامیت
cfd71d3284

+ 0 - 5
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/TrackSequenceController.java

@@ -138,11 +138,6 @@ public class TrackSequenceController extends BaseController {
         return trackSequenceService.getDetail(id);
     }
 
-    @PostMapping("/add_evaluate")
-    public CommonResult addEvaluate(@RequestBody AddEvaluate addEvaluate) {
-        return trackSequenceService.addEvaluate(addEvaluate);
-    }
-
     @GetMapping("/model/{id}")
     public CommonResult getModelList(@PathVariable("id") Long id) {
         return trackSequenceService.getModelList(id);

+ 0 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/service/ITrackSequenceService.java

@@ -84,8 +84,6 @@ public interface ITrackSequenceService extends IBaseService<TrackSequence> {
 
     CommonResult getDetail(Long id);
 
-    CommonResult addEvaluate(AddEvaluate addEvaluate);
-
     CommonResult getModelList(Long id);
 
     CommonResult previewPredictResult(Long id);

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

@@ -389,45 +389,6 @@ public class TargetDetectionServiceImpl extends BaseServiceImpl<TargetDetectionM
         }
         updateById(entity);
 
-        AlgorithmModelTrack algorithmModelTrack = algorithmModelTrackService.getById(entity.getAlgorithmModelId());
-        algorithmModelTrack
-                .setModelStatus("200".equals(status) ? BizConstant.ModelStatus.END : BizConstant.ModelStatus.FAILED);
-
-        AlgorithmConfigTrack algorithmConfigTrack = algorithmConfigTrackService
-                .getById(algorithmModelTrack.getAlgorithmId());
-        String params = algorithmConfigTrack.getParameterConfig();
-        HashMap<String, Object> parse = (HashMap<String, Object>) JSON.parse((params));
-
-        if ("200".equals(status) && ObjectUtil.isNull(algorithmModelTrack.getModelAddress())) {
-            algorithmModelTrack.setModelAddress(entity.getOutputPath() + File.separator
-                    + ((HashMap<String, String>) parse.get("dataset")).get("classes"));
-
-            System.out.println(parse.get("dataset"));
-            algorithmModelTrackService.updateById(algorithmModelTrack);
-        }
-
-        /*
-         * 这里有很多需要做的:1. 保存所有模型到oss 2. 模型文件保存到算法模型配置表中
-         */
-        /*
-         * Path resultsPath = Paths.get(entity.getInputPath());
-         * Path modelPath = resultsPath.resolve(BizConstant.MODEL_PATH);
-         * 
-         * File modelDir = new File(modelPath.toString());
-         * 
-         * if(!modelDir.exists() || !modelDir.isDirectory()) {
-         * return CommonResult.fail("模型文件不存在");
-         * }
-         * 
-         * for (File f : modelDir.listFiles()) {
-         * if (f.isFile() && f.getName().endsWith(BizConstant.MODEL_SUFFIX)) {
-         * SysOssVo upload = ossService.upload(f);
-         * AlgorithmModelTrack algorithmModelTrack = new AlgorithmModelTrack();
-         * algorithmModelTrack.set
-         * algorithmModelTrackService.insert();
-         * }
-         * }
-         */
         WebSocketUtils.publishAll("refresh");
         return CommonResult.success();
     }

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

@@ -487,34 +487,10 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
         }
         updateById(entity);
 
-        AlgorithmModelTrack algorithmModelTrack = algorithmModelTrackService.getById(entity.getAlgorithmModelId());
-        algorithmModelTrack
-                .setModelStatus("200".equals(status) ? BizConstant.ModelStatus.END : BizConstant.ModelStatus.FAILED);
-
-        AlgorithmConfigTrack algorithmConfigTrack = algorithmConfigTrackService
-                .getById(algorithmModelTrack.getAlgorithmId());
-        String params = algorithmConfigTrack.getParameterConfig();
-        HashMap<String, Object> parse = (HashMap<String, Object>) JSON.parse((params));
-
-        if ("200".equals(status) && ObjectUtil.isNull(algorithmModelTrack.getModelAddress())) {
-            try {
-                algorithmModelTrack.setModelAddress(entity.getOutputPath() + File.separator
-                        + ((HashMap<String, String>) parse.get("dataset")).get("classes"));
-            } catch (Exception e) {
-                System.out.println("未知错误");
-            }
-
-            System.out.println(parse.get("dataset"));
-            algorithmModelTrackService.updateById(algorithmModelTrack);
-        }
         WebSocketUtils.publishAll("refresh");
         return CommonResult.success();
     }
 
-    private String getLogFileName(TrackSequence entity) {
-        return entity.getId() + BizConstant.TRACK_SEQUENCE_SUFFIX + ".log";
-    }
-
     @Override
     public CommonResult getLog(Long id) {
         TrackSequence entity = getById(id);
@@ -560,58 +536,6 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
         }
     }
 
-    @Override
-    public CommonResult addEvaluate(AddEvaluate addEvaluate) {
-        AlgorithmConfigTrackVo config = algorithmConfigTrackService.selectById(addEvaluate.getAlgorithmId());
-        if (ObjectUtil.isNull(config)) {
-            throw new RuntimeException("算法不存在");
-        }
-
-        TrackSequence entity = this.getById(addEvaluate.getId());
-        TrackSequence evaluate_entity = new TrackSequence();
-        evaluate_entity.setStatus(NOT_START);
-        evaluate_entity.setUrl(entity.getUrl());
-        if (addEvaluate.getName().startsWith(MASC)) {
-            evaluate_entity.setInputPath(entity.getInputPath() + ";" +
-                    entity.getOutputPath() + File.separator + "gaze"
-                    + File.separator + "txt");
-        } else if (addEvaluate.getName().startsWith(CAT)) {
-            File file________ = new File(entity.getInputPath());
-            if (!file________.exists()) {
-                return CommonResult.fail("数据集为空!");
-            }
-            evaluate_entity.setInputPath(entity.getInputPath() + ";" +
-                    entity.getOutputPath() + File.separator + "txt");
-        } else {
-            return CommonResult.fail("命名错误!");
-        }
-        evaluate_entity.setZipFilePath(entity.getZipFilePath());
-        evaluate_entity.setAlgorithmModelId(entity.getAlgorithmModelId());
-        evaluate_entity.setInputOssId(entity.getInputOssId());
-
-        evaluate_entity.setName(addEvaluate.getName());
-        evaluate_entity.setAlgorithmId(addEvaluate.getAlgorithmId());
-        evaluate_entity.setRemarks(addEvaluate.getRemarks());
-
-        boolean flag__ = save(evaluate_entity);
-
-        if (flag__) {
-            Path path = Paths.get(entity.getOutputPath());
-            evaluate_entity.setOutputPath(path
-                    .resolveSibling(evaluate_entity.getId().toString() +
-                            BizConstant.TRACK_SEQUENCE_SUFFIX)
-                    .toString());
-            boolean flag___ = updateById(evaluate_entity);
-            if (flag___) {
-                return CommonResult.success("新增评估任务成功!");
-            } else {
-                return CommonResult.success("新增评估任务成功! 更新输出路径失败");
-            }
-        } else {
-            return CommonResult.success("新增评估任务失败!");
-        }
-    }
-
     @Override
     public CommonResult getModelList(Long id) {
         TrackSequence entity = getById(id);