Explorar o código

Merge branch 'develop' of http://47.108.150.237:10000/www/taais into tl-develop

unknown hai 6 meses
pai
achega
7737dda86b
Modificáronse 85 ficheiros con 7179 adicións e 81 borrados
  1. 21 16
      taais-admin/src/main/resources/application-dev.yml
  2. 2 2
      taais-common/taais-common-core/src/main/java/com/taais/common/core/config/TaaisConfig.java
  3. 2 1
      taais-common/taais-common-json/src/main/java/com/taais/common/json/utils/JsonUtils.java
  4. 42 6
      taais-modules/taais-biz/src/main/java/com/taais/biz/constant/BizConstant.java
  5. 114 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/AlgorithmConfigTrackController.java
  6. 110 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/AlgorithmModelTrackController.java
  7. 112 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/DataAmplificationTaskController.java
  8. 5 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/DataController.java
  9. 119 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/DataSeqController.java
  10. 36 11
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/PublicController.java
  11. 129 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/TargetDetectionController.java
  12. 21 2
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/TargetIdentificationSubtaskController.java
  13. 128 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/ToInfraredController.java
  14. 129 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/TrackSequenceController.java
  15. 6 6
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/VideoStableController.java
  16. 59 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/AlgorithmConfigTrack.java
  17. 65 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/AlgorithmModelTrack.java
  18. 90 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/DataAmplificationTask.java
  19. 122 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/DataSeq.java
  20. 81 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/TargetDetection.java
  21. 30 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/TaskTrackResultBo.java
  22. 103 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/ToInfrared.java
  23. 78 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/TrackSequence.java
  24. 67 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/AlgorithmConfigTrackBo.java
  25. 68 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/AlgorithmModelTrackBo.java
  26. 93 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/DataAmplificationTaskBo.java
  27. 108 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/DataSeqBo.java
  28. 101 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/TargetDetectionBo.java
  29. 93 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/ToInfraredBo.java
  30. 25 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/ToInfraredStartResultBo.java
  31. 98 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/TrackSequenceBo.java
  32. 10 5
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/dto/DataAmplifyDto.java
  33. 2 1
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/dto/task/CreateTargetIdentificationTaskDto.java
  34. 64 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmConfigTrackImportVo.java
  35. 72 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmConfigTrackVo.java
  36. 60 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmModelTrackImportVo.java
  37. 92 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmModelTrackVo.java
  38. 91 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/DataAmplificationTaskVo.java
  39. 86 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/DataSeqImportVo.java
  40. 137 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/DataSeqVo.java
  41. 26 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/StartToInfraredTask.java
  42. 123 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/TargetDetectionImportVo.java
  43. 136 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/TargetDetectionVo.java
  44. 85 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/ToInfraredImportVo.java
  45. 123 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/ToInfraredVo.java
  46. 89 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/TrackSequenceImportVo.java
  47. 131 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/TrackSequenceVo.java
  48. 119 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/listener/AlgorithmConfigTrackImportListener.java
  49. 120 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/listener/AlgorithmModelTrackImportListener.java
  50. 119 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/listener/DataSeqImportListener.java
  51. 119 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/listener/TargetDetectionImportListener.java
  52. 119 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/listener/ToInfraredImportListener.java
  53. 119 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/listener/TrackSequenceImportListener.java
  54. 16 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/AlgorithmConfigTrackMapper.java
  55. 16 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/AlgorithmModelTrackMapper.java
  56. 9 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/DataAmplificationTaskMapper.java
  57. 16 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/DataSeqMapper.java
  58. 16 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/TargetDetectionMapper.java
  59. 15 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/ToInfraredMapper.java
  60. 16 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/TrackSequenceMapper.java
  61. 67 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/IAlgorithmConfigTrackService.java
  62. 68 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/IAlgorithmModelTrackService.java
  63. 25 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/IDataAmplificationTaskService.java
  64. 68 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/IDataSeqService.java
  65. 2 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/IDataService.java
  66. 77 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/ITargetDetectionService.java
  67. 78 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/IToInfraredService.java
  68. 77 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/ITrackSequenceService.java
  69. 161 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/AlgorithmConfigTrackServiceImpl.java
  70. 256 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/AlgorithmModelTrackServiceImpl.java
  71. 95 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataAmplificationTaskServiceImpl.java
  72. 268 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataSeqServiceImpl.java
  73. 166 9
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataServiceImpl.java
  74. 395 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TargetDetectionServiceImpl.java
  75. 34 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TargetIdentificationTaskServiceImpl.java
  76. 465 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/ToInfraredServiceImpl.java
  77. 395 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TrackSequenceServiceImpl.java
  78. 16 16
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/VideoStableServiceImpl.java
  79. 22 6
      taais-modules/taais-biz/src/main/java/com/taais/biz/utils/ZipUtils.java
  80. 6 0
      taais-modules/taais-biz/src/main/resources/mapper/demo/AlgorithmConfigTrackMapper.xml
  81. 7 0
      taais-modules/taais-biz/src/main/resources/mapper/demo/AlgorithmModelTrackMapper.xml
  82. 7 0
      taais-modules/taais-biz/src/main/resources/mapper/demo/DataSeqMapper.xml
  83. 7 0
      taais-modules/taais-biz/src/main/resources/mapper/demo/TargetDetectionMapper.xml
  84. 7 0
      taais-modules/taais-biz/src/main/resources/mapper/demo/ToInfraredMapper.xml
  85. 7 0
      taais-modules/taais-biz/src/main/resources/mapper/demo/TrackSequenceMapper.xml

+ 21 - 16
taais-admin/src/main/resources/application-dev.yml

@@ -1,10 +1,29 @@
 server:
-  video_stable_start_url: http://localhost:11001/video_stable
-  video_stable_stop_url: http://localhost:11001/video_stable_stop
+  video_stable_start_url: http://localhost:11002/video_stable
+  video_stable_stop_url: http://localhost:11002/video_stable_stop
+  to_infrared_stop_url: http://localhost:11002/to_infrared_stop
+  track_sequence_stop_url: http://localhost:11003/track_sequence_stop
+  target_detection_stop_url: http://localhost:11003/target_detection_stop
+
 # 数据源配置
 spring:
   datasource:
     type: com.zaxxer.hikari.HikariDataSource
+    hikari:
+      # 最大连接池数量
+      maximum-pool-size: 4
+      # 最小空闲线程数量
+      minimum-idle: 2
+      # 配置获取连接等待超时的时间
+      connectionTimeout: 300000
+      # 校验超时时间
+      validationTimeout: 50000
+      # 空闲连接存活最大时间,默认10分钟
+      idleTimeout: 6000000
+      # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
+      maxLifetime: 1800000
+      # 多久检查一次连接的活性
+      keepaliveTime: 30000
 mybatis-flex:
   # sql审计
   audit_enable: true
@@ -27,20 +46,6 @@ mybatis-flex:
       url: jdbc:postgresql://110.41.34.83:5432/taais?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
       username: postgres
       password: P3x0LG8jzyHRX59l
-      # 最大连接池数量
-      maximum-pool-size: 2
-      # 最小空闲线程数量
-      minimum-idle: 2
-      # 配置获取连接等待超时的时间
-      connectionTimeout: 30000
-      # 校验超时时间
-      validationTimeout: 5000
-      # 空闲连接存活最大时间,默认10分钟
-      idleTimeout: 60000
-      # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
-      maxLifetime: 60000
-      # 多久检查一次连接的活性
-      keepaliveTime: 30000
 
 #    # 数据源-2
 #    ds2:

+ 2 - 2
taais-common/taais-common-core/src/main/java/com/taais/common/core/config/TaaisConfig.java

@@ -17,7 +17,7 @@ public class TaaisConfig {
     /**
      * 文件路径
      */
-
+    @Value("${taais.profile}")
     private static String profile;
     /**
      * 获取地址开关
@@ -46,7 +46,7 @@ public class TaaisConfig {
         return profile;
     }
 
-//    @Value("${taais.profile}")
+
     public void setProfile(String profile) {
         TaaisConfig.profile = profile;
     }

+ 2 - 1
taais-common/taais-common-json/src/main/java/com/taais/common/json/utils/JsonUtils.java

@@ -15,6 +15,7 @@ import lombok.NoArgsConstructor;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 /**
  * JSON 工具类
@@ -99,7 +100,7 @@ public class JsonUtils {
         }
     }
 
-    public static <T> List<T> parseArray(String text, Class<T> clazz) {
+    public static <T> List<T> parseArray(String text, Class<Map> clazz) {
         if (StringUtils.isEmpty(text)) {
             return new ArrayList<>();
         }

+ 42 - 6
taais-modules/taais-biz/src/main/java/com/taais/biz/constant/BizConstant.java

@@ -6,6 +6,42 @@ package com.taais.biz.constant;
 public class BizConstant {
     // 视频文件存储目录
     public static final String UPLOAD_DIR = "uploads/";
+    public static final String MODEL_PATH = "model";
+    public static final String MODEL_SUFFIX = ".pt";
+    public static final String PREDICT_PATH = "predict";
+
+    public static final String UNZIP_SUFFIX = "_unzip";
+    public static final String TO_INFRARED_SUFFIX = "_to_infrared";
+    public static final String TRACK_SEQUENCE_SUFFIX = "_track_sequence";
+    public static final String TARGET_DETECTION_SUFFIX = "_target_detection";
+
+    public static class ModelStatus {
+        public static final String NOT_START = "0";
+        public static final String RUNNING = "1";
+        public static final String END = "2";
+        public static final String FAILED = "3";
+        public static final String INTERRUPTED = "4";
+    }
+
+    public static class BizType {
+        public static final String VIDEO_STABLE = "video_stable";
+        public static final String TO_INFRARED = "to_infrared";
+        public static final String TARGET_DETECTION = "target_detection";
+        public static final String TRACK_SEQUENCE = "track_sequence";
+    }
+
+    public static class SubSystem {
+        public static final String  ToInfrared = "0";
+        public static final String  TargetDetection = "1";
+        public static final String TrackSequence = "2";
+    }
+
+    public static class AlgorithmType {
+        public static final String TRAIN = "0";
+        public static final String TEST = "1";
+        public static final String REASONING = "2";
+    }
+
     public class VideoStatus {
         public static final String NOT_START = "0";
         public static final String RUNNING = "1";
@@ -27,10 +63,10 @@ public class BizConstant {
 
     public static final String TASK_FOLDER_PATH_TRAIL_EXPANSION = "/expansion/";
 
-    public static final String TASK_FOLDER_PATH_TRAIL_RESULT= "/result/";
+    public static final String TASK_FOLDER_PATH_TRAIL_RESULT = "/result/";
 
-    public static final String TASK_FOLDER_PATH_LOG= "log/";
-    public static final String TASK_FOLDER_LOG_PATH= TASK_FOLDER_PATH_LOG+"log.log";
+    public static final String TASK_FOLDER_PATH_LOG = "log/";
+    public static final String TASK_FOLDER_LOG_PATH = TASK_FOLDER_PATH_LOG + "log.log";
     public static final String IMAGE = "images/";
     public static final String LABEL = "labels/";
 
@@ -70,9 +106,9 @@ public class BizConstant {
     public static final String R_CURVE = "R_curve.png";
     public static final String P_CURVE = "P_curve.png";
     public static final String F1_CURVE = "F1_curve.png";
-    public static final String ORIGINAL_IMAGE= "原始图片";
-    public static final String DOCKER_BASE_PATH= "/home/ObjectDetection_Web";
-    public static final String DOCKER_PT_PATH= "weights/best.pt";
+    public static final String ORIGINAL_IMAGE = "原始图片";
+    public static final String DOCKER_BASE_PATH = "/home/ObjectDetection_Web";
+    public static final String DOCKER_PT_PATH = "weights/best.pt";
 
     public static final String REMARK_PREFIX = "__URL__";
 }

+ 114 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/AlgorithmConfigTrackController.java

@@ -0,0 +1,114 @@
+package com.taais.biz.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.excel.utils.ExcelUtil;
+import com.taais.common.log.annotation.Log;
+import com.taais.common.log.enums.BusinessType;
+import com.taais.common.web.annotation.RepeatSubmit;
+import com.taais.common.web.core.BaseController;
+import jakarta.annotation.Resource;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
+import com.taais.biz.domain.bo.AlgorithmConfigTrackBo;
+import com.taais.biz.service.IAlgorithmConfigTrackService;
+
+import com.taais.common.core.core.page.PageResult;
+
+/**
+ * 算法配置Controller
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/demo/AlgorithmConfigTrack")
+public class AlgorithmConfigTrackController extends BaseController {
+    @Resource
+    private IAlgorithmConfigTrackService algorithmConfigTrackService;
+
+    /**
+     * 查询算法配置列表
+     */
+    @SaCheckPermission("demo:AlgorithmConfigTrack:list")
+    @GetMapping("/list")
+    public CommonResult<PageResult<AlgorithmConfigTrackVo>> list(AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+        return CommonResult.success(algorithmConfigTrackService.selectPage(algorithmConfigTrackBo));
+    }
+
+    /**
+     * 导出算法配置列表
+     */
+    @SaCheckPermission("demo:AlgorithmConfigTrack:export")
+    @Log(title = "算法配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+        List<AlgorithmConfigTrackVo> list = algorithmConfigTrackService.selectList(algorithmConfigTrackBo);
+        ExcelUtil.exportExcel(list, "算法配置", AlgorithmConfigTrackVo.class, response);
+    }
+
+    /**
+     * 获取算法配置详细信息
+     */
+    @SaCheckPermission("demo:AlgorithmConfigTrack:query")
+    @GetMapping(value = "/{id}")
+    public CommonResult<AlgorithmConfigTrackVo> getInfo(@PathVariable Long id) {
+        return CommonResult.success(algorithmConfigTrackService.selectById(id));
+    }
+
+    /**
+     * 新增算法配置
+     */
+    @SaCheckPermission("demo:AlgorithmConfigTrack:add")
+    @Log(title = "算法配置", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping
+    public CommonResult<Void> add(@Validated @RequestBody AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+        boolean inserted = algorithmConfigTrackService.insert(algorithmConfigTrackBo);
+        if (!inserted) {
+            return CommonResult.fail("新增算法配置记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 修改算法配置
+     */
+    @SaCheckPermission("demo:AlgorithmConfigTrack:edit")
+    @Log(title = "算法配置", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping
+    public CommonResult<Void> edit(@Validated @RequestBody AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+        Boolean updated = algorithmConfigTrackService.update(algorithmConfigTrackBo);
+        if (!updated) {
+            return CommonResult.fail("修改算法配置记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 删除算法配置
+     */
+    @SaCheckPermission("demo:AlgorithmConfigTrack:remove")
+    @Log(title = "算法配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public CommonResult<Void> remove(@PathVariable Long[] ids) {
+        boolean deleted = algorithmConfigTrackService.deleteByIds(ids);
+        if (!deleted) {
+            return CommonResult.fail("删除算法配置记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    @GetMapping("/enums")
+    public CommonResult<List<Object>> enums() {
+        return CommonResult.success(algorithmConfigTrackService.getEnums());
+    }
+}

+ 110 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/AlgorithmModelTrackController.java

@@ -0,0 +1,110 @@
+package com.taais.biz.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.excel.utils.ExcelUtil;
+import com.taais.common.log.annotation.Log;
+import com.taais.common.log.enums.BusinessType;
+import com.taais.common.web.annotation.RepeatSubmit;
+import com.taais.common.web.core.BaseController;
+import jakarta.annotation.Resource;
+import com.taais.biz.domain.vo.AlgorithmModelTrackVo;
+import com.taais.biz.domain.bo.AlgorithmModelTrackBo;
+import com.taais.biz.service.IAlgorithmModelTrackService;
+
+import com.taais.common.core.core.page.PageResult;
+
+/**
+ * 算法模型配置Controller
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/demo/AlgorithmModelTrack")
+public class AlgorithmModelTrackController extends BaseController {
+    @Resource
+    private IAlgorithmModelTrackService algorithmModelTrackService;
+
+    /**
+     * 查询算法模型配置列表
+     */
+    @SaCheckPermission("demo:AlgorithmModelTrack:list")
+    @GetMapping("/list")
+    public CommonResult<PageResult<AlgorithmModelTrackVo>> list(AlgorithmModelTrackBo algorithmModelTrackBo) {
+        return CommonResult.success(algorithmModelTrackService.selectPage(algorithmModelTrackBo));
+    }
+
+    /**
+     * 导出算法模型配置列表
+     */
+    @SaCheckPermission("demo:AlgorithmModelTrack:export")
+    @Log(title = "算法模型配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AlgorithmModelTrackBo algorithmModelTrackBo) {
+        List<AlgorithmModelTrackVo> list = algorithmModelTrackService.selectList(algorithmModelTrackBo);
+        ExcelUtil.exportExcel(list, "算法模型配置", AlgorithmModelTrackVo.class, response);
+    }
+
+    /**
+     * 获取算法模型配置详细信息
+     */
+    @SaCheckPermission("demo:AlgorithmModelTrack:query")
+    @GetMapping(value = "/{id}")
+    public CommonResult<AlgorithmModelTrackVo> getInfo(@PathVariable Long id) {
+        return CommonResult.success(algorithmModelTrackService.selectById(id));
+    }
+
+    /**
+     * 新增算法模型配置
+     */
+    @SaCheckPermission("demo:AlgorithmModelTrack:add")
+    @Log(title = "算法模型配置", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping
+    public CommonResult<String> add(@Validated @RequestBody AlgorithmModelTrackBo algorithmModelTrackBo) {
+        return algorithmModelTrackService.insert(algorithmModelTrackBo);
+    }
+
+    /**
+     * 修改算法模型配置
+     */
+    @SaCheckPermission("demo:AlgorithmModelTrack:edit")
+    @Log(title = "算法模型配置", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping
+    public CommonResult<Void> edit(@Validated @RequestBody AlgorithmModelTrackBo algorithmModelTrackBo) {
+        Boolean updated = algorithmModelTrackService.update(algorithmModelTrackBo);
+        if (!updated) {
+            return CommonResult.fail("修改算法模型配置记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 删除算法模型配置
+     */
+    @SaCheckPermission("demo:AlgorithmModelTrack:remove")
+    @Log(title = "算法模型配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public CommonResult<Void> remove(@PathVariable Long[] ids) {
+        boolean deleted = algorithmModelTrackService.deleteByIds(ids);
+        if (!deleted) {
+            return CommonResult.fail("删除算法模型配置记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    @GetMapping("/enums")
+    public CommonResult<List<Object>> enums() {
+        return CommonResult.success(algorithmModelTrackService.enums());
+    }
+}

+ 112 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/DataAmplificationTaskController.java

@@ -0,0 +1,112 @@
+package com.taais.biz.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.taais.biz.domain.bo.DataAmplificationTaskBo;
+import com.taais.biz.domain.bo.DataAmplificationTaskBo;
+import com.taais.biz.domain.dto.task.TestResultDto;
+import com.taais.biz.domain.dto.task.TranResultDto;
+import com.taais.biz.domain.vo.AlgorithmBizProcessVo;
+import com.taais.biz.domain.vo.DataAmplificationTaskVo;
+import com.taais.biz.service.IAlgorithmBizProcessService;
+import com.taais.biz.service.IDataAmplificationTaskService;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.excel.utils.ExcelUtil;
+import com.taais.common.log.annotation.Log;
+import com.taais.common.log.enums.BusinessType;
+import com.taais.common.web.annotation.RepeatSubmit;
+import com.taais.common.web.core.BaseController;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.RequiredArgsConstructor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * 数据扩增业务处理Controller
+ *
+ * @author 0
+ * 2024-06-14
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/task/dataAmplificationTask")
+public class DataAmplificationTaskController extends BaseController {
+
+    private static final Logger log = LoggerFactory.getLogger(DataAmplificationTaskController.class);
+    @Resource
+    private IDataAmplificationTaskService dataAmplificationTaskService;
+
+    /**
+     * 查询数据扩增业务处理列表
+     */
+    @GetMapping("/list")
+    public CommonResult<PageResult<DataAmplificationTaskVo>> list(DataAmplificationTaskBo dataAmplificationTaskBo) {
+        return CommonResult.success(dataAmplificationTaskService.selectPage(dataAmplificationTaskBo));
+    }
+
+    /**
+     * 导出数据扩增业务处理列表
+     */
+    @Log(title = "数据扩增业务处理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DataAmplificationTaskBo dataAmplificationTaskBo) {
+        List<DataAmplificationTaskVo> list = dataAmplificationTaskService.selectList(dataAmplificationTaskBo);
+        ExcelUtil.exportExcel(list, "数据扩增业务处理", DataAmplificationTaskVo.class, response);
+    }
+
+    /**
+     * 获取数据扩增业务处理详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public CommonResult<DataAmplificationTaskVo> getInfo(@PathVariable Long id) {
+        return CommonResult.success(dataAmplificationTaskService.selectById(id));
+    }
+
+    /**
+     * 新增数据扩增业务处理
+     */
+    @Log(title = "数据扩增业务处理", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping
+    public CommonResult<Void> add(@Validated @RequestBody DataAmplificationTaskBo algorithmBizProcessBo) {
+        boolean inserted = dataAmplificationTaskService.insert(algorithmBizProcessBo);
+        if (!inserted) {
+            return CommonResult.fail("新增数据扩增业务处理记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 修改数据扩增业务处理
+     */
+    @Log(title = "数据扩增业务处理", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping
+    public CommonResult<Void> edit(@Validated @RequestBody DataAmplificationTaskBo dataAmplificationTaskBo) {
+        Boolean updated = dataAmplificationTaskService.update(dataAmplificationTaskBo);
+        if (!updated) {
+            return CommonResult.fail("修改数据扩增业务处理记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 删除数据扩增业务处理
+     */
+    @Log(title = "数据扩增业务处理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public CommonResult<Void> remove(@PathVariable Long[] ids) {
+        boolean deleted = dataAmplificationTaskService.deleteByIds(ids);
+        if (!deleted) {
+            return CommonResult.fail("删除数据扩增业务处理记录失败!");
+        }
+        return CommonResult.success();
+    }
+}

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

@@ -249,4 +249,9 @@ public class DataController extends BaseController {
     public CommonResult<Boolean> dataAmplify(@RequestBody DataAmplifyDto dataAmplifyDto) {
         return dataService.dataAmplify(dataAmplifyDto);
     }
+
+    @PostMapping("/amplifyForData")
+    public CommonResult<Boolean> amplifyForData(@RequestParam("id") String id) {
+        return dataService.amplifyForData(id);
+    }
 }

+ 119 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/DataSeqController.java

@@ -0,0 +1,119 @@
+package com.taais.biz.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.excel.utils.ExcelUtil;
+import com.taais.common.log.annotation.Log;
+import com.taais.common.log.enums.BusinessType;
+import com.taais.common.web.annotation.RepeatSubmit;
+import com.taais.common.web.core.BaseController;
+import jakarta.annotation.Resource;
+import com.taais.biz.domain.vo.DataSeqVo;
+import com.taais.biz.domain.bo.DataSeqBo;
+import com.taais.biz.service.IDataSeqService;
+
+import com.taais.common.core.core.page.PageResult;
+
+/**
+ * 数据管理Controller
+ *
+ * @author wangkang
+ * 2024-10-08
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/demo/DataSeq")
+public class DataSeqController extends BaseController {
+    @Resource
+    private IDataSeqService dataSeqService;
+
+    /**
+     * 查询数据管理列表
+     */
+    @SaCheckPermission("demo:DataSeq:list")
+    @GetMapping("/list")
+    public CommonResult<PageResult<DataSeqVo>> list(DataSeqBo dataSeqBo) {
+        return CommonResult.success(dataSeqService.selectPage(dataSeqBo));
+    }
+
+    /**
+     * 导出数据管理列表
+     */
+    @SaCheckPermission("demo:DataSeq:export")
+    @Log(title = "数据管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DataSeqBo dataSeqBo) {
+        List<DataSeqVo> list = dataSeqService.selectList(dataSeqBo);
+        ExcelUtil.exportExcel(list, "数据管理", DataSeqVo.class, response);
+    }
+
+    /**
+     * 获取数据管理详细信息
+     */
+    @SaCheckPermission("demo:DataSeq:query")
+    @GetMapping(value = "/{id}")
+    public CommonResult<DataSeqVo> getInfo(@PathVariable Long id) {
+        return CommonResult.success(dataSeqService.selectById(id));
+    }
+
+    /**
+     * 新增数据管理
+     */
+    @SaCheckPermission("demo:DataSeq:add")
+    @Log(title = "数据管理", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping
+    public CommonResult<Void> add(@Validated @RequestBody DataSeqBo dataSeqBo) {
+        boolean inserted = dataSeqService.insert(dataSeqBo);
+        if (!inserted) {
+            return CommonResult.fail("新增数据管理记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 修改数据管理
+     */
+    @SaCheckPermission("demo:DataSeq:edit")
+    @Log(title = "数据管理", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping
+    public CommonResult<Void> edit(@Validated @RequestBody DataSeqBo dataSeqBo) {
+        Boolean updated = dataSeqService.update(dataSeqBo);
+        if (!updated) {
+            return CommonResult.fail("修改数据管理记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 删除数据管理
+     */
+    @SaCheckPermission("demo:DataSeq:remove")
+    @Log(title = "数据管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public CommonResult<Void> remove(@PathVariable Long[] ids) {
+        boolean deleted = dataSeqService.deleteByIds(ids);
+        if (!deleted) {
+            return CommonResult.fail("删除数据管理记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    @GetMapping("/getAllImages/{inputOdssId}")
+    public CommonResult<List<String>> getAllImages(@PathVariable Long inputOdssId) {
+        return CommonResult.success(dataSeqService.getAllImages(inputOdssId));
+    }
+
+    @GetMapping("/getImages/{inputOdssId}/{subsystem}/{ifInput}/{dir}")
+    public CommonResult<List<String>> getImages(@PathVariable Long inputOdssId, @PathVariable String subsystem, @PathVariable Boolean ifInput, @PathVariable String dir) {
+        return CommonResult.success(dataSeqService.getImages(inputOdssId, subsystem, ifInput, dir));
+    }
+}

+ 36 - 11
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/PublicController.java

@@ -2,8 +2,11 @@ package com.taais.biz.controller;
 
 import com.alibaba.fastjson2.JSON;
 import com.taais.biz.constant.BizConstant;
+import com.taais.biz.domain.TaskTrackResultBo;
 import com.taais.biz.domain.bo.AlgorithmModelBo;
 import com.taais.biz.domain.bo.TargetIdentificationSubtaskDetailsBo;
+import com.taais.biz.domain.bo.ToInfraredBo;
+import com.taais.biz.domain.bo.ToInfraredStartResultBo;
 import com.taais.biz.domain.bo.VideoStableStartResultBo;
 import com.taais.biz.domain.dto.TaskResultDTO;
 import com.taais.biz.service.*;
@@ -37,6 +40,12 @@ public class PublicController extends BaseController {
     private static final Logger log = LoggerFactory.getLogger(PublicController.class);
     @Resource
     private IVideoStableService videoStableService;
+    @Resource
+    private IToInfraredService toInfraredService;
+    @Resource
+    private ITrackSequenceService trackSequenceService;
+    @Resource
+    private ITargetDetectionService targetDetectionService;
 
     @Resource
     private IDataAugmentationService dataAugmentationService;
@@ -60,15 +69,15 @@ public class PublicController extends BaseController {
     // todo: 2024080906
     @PostMapping("/taskResult")
     public CommonResult<Void> taskResult(@RequestBody TaskResultDTO resultDTO) {
-        log.info("taskResult start,params:{}",resultDTO);
+        log.info("taskResult start,params:{}", resultDTO);
         String errorMsg = checkDTO(resultDTO);
-        if(StringUtils.isNotEmpty(errorMsg)){
-            log.error("taskResult error,{}",errorMsg);
+        if (StringUtils.isNotEmpty(errorMsg)) {
+            log.error("taskResult error,{}", errorMsg);
             return CommonResult.fail(errorMsg);
         }
         String bizType = resultDTO.getBizType();
-        if(BizConstant.TYPE_DATA_BIZ_PROCESS.equals(bizType)){
-            //errorMsg = bizProcessService.taskResult(resultDTO);
+        if (BizConstant.TYPE_DATA_BIZ_PROCESS.equals(bizType)) {
+            // errorMsg = bizProcessService.taskResult(resultDTO);
             TargetIdentificationSubtaskDetailsBo detailsBo = detailsService.getById(resultDTO.getBizId());
             detailsBo.setStatus(resultDTO.getStatus() != 200 ? BizConstant.TASK_STATUS_FAILED :
                 resultDTO.getMsg().contains("finish") ? BizConstant.TASK_STATUS_SUCCEED : BizConstant.TASK_STATUS_PROCESSING);
@@ -89,11 +98,11 @@ public class PublicController extends BaseController {
         } else if (BizConstant.TYPE_DATA_PROCESS.equals(bizType)) {
             errorMsg = dataProcessService.taskResult(resultDTO);
         } else {
-            log.error("这种情况是不可能发生的,参数:{}",resultDTO);
+            log.error("这种情况是不可能发生的,参数:{}", resultDTO);
             return CommonResult.fail("这种情况是不可能发生的");
         }
 
-        if(StringUtils.isNotEmpty(errorMsg)){
+        if (StringUtils.isNotEmpty(errorMsg)) {
             return CommonResult.fail(errorMsg);
         }
         return CommonResult.success();
@@ -101,16 +110,16 @@ public class PublicController extends BaseController {
 
     private String checkDTO(TaskResultDTO resultDTO) {
         Integer status = resultDTO.getStatus();
-        if(status != 200 && status != 500){
+        if (status != 200 && status != 500) {
             return "status 只能是200或500";
         }
         Long bizId = resultDTO.getBizId();
-        if(bizId == null){
+        if (bizId == null) {
             return "bizId 不能为null";
         }
         String bizType = resultDTO.getBizType();
-        if(!BizConstant.TYPE_DATA_BIZ_PROCESS.equals(bizType) && !BizConstant.TYPE_DATA_PROCESS.equals(bizType)){
-            return "status 只能是"+BizConstant.TYPE_DATA_BIZ_PROCESS+"或"+BizConstant.TYPE_DATA_PROCESS;
+        if (!BizConstant.TYPE_DATA_BIZ_PROCESS.equals(bizType) && !BizConstant.TYPE_DATA_PROCESS.equals(bizType)) {
+            return "status 只能是" + BizConstant.TYPE_DATA_BIZ_PROCESS + "或" + BizConstant.TYPE_DATA_PROCESS;
         }
         return null;
     }
@@ -129,4 +138,20 @@ public class PublicController extends BaseController {
     public CommonResult Result(@Valid @RequestBody VideoStableStartResultBo dataAugmentationStartResultBo) {
         return dataAugmentationService.getResult(dataAugmentationStartResultBo);
     }
+
+    @PostMapping("/task/get_result")
+    public CommonResult getResult(@Valid @RequestBody TaskTrackResultBo taskTrackResultBo) {
+        if(BizConstant.BizType.TO_INFRARED.equals(taskTrackResultBo.getBizType())) {
+            return toInfraredService.getResult(taskTrackResultBo);
+        }
+        else if(BizConstant.BizType.TRACK_SEQUENCE.equals(taskTrackResultBo.getBizType())) {
+            return trackSequenceService.getResult(taskTrackResultBo);
+        }
+        else if(BizConstant.BizType.TARGET_DETECTION.equals(taskTrackResultBo.getBizType())) {
+            return targetDetectionService.getResult(taskTrackResultBo);
+        }
+        else {
+            return CommonResult.fail("业务类型不支持");
+        }
+    }
 }

+ 129 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/TargetDetectionController.java

@@ -0,0 +1,129 @@
+package com.taais.biz.controller;
+
+import java.io.IOException;
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.excel.utils.ExcelUtil;
+import com.taais.common.log.annotation.Log;
+import com.taais.common.log.enums.BusinessType;
+import com.taais.common.web.annotation.RepeatSubmit;
+import com.taais.common.web.core.BaseController;
+import jakarta.annotation.Resource;
+import com.taais.biz.domain.vo.TargetDetectionVo;
+import com.taais.biz.domain.bo.TargetDetectionBo;
+import com.taais.biz.service.ITargetDetectionService;
+
+import com.taais.common.core.core.page.PageResult;
+
+/**
+ * 目标检测Controller
+ *
+ * @author wangkang
+ * 2024-09-29
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/demo/TargetDetection")
+public class TargetDetectionController extends BaseController {
+    @Resource
+    private ITargetDetectionService targetDetectionService;
+
+    /**
+     * 查询目标检测列表
+     */
+    @SaCheckPermission("demo:TargetDetection:list")
+    @GetMapping("/list")
+    public CommonResult<PageResult<TargetDetectionVo>> list(TargetDetectionBo targetDetectionBo) {
+        return CommonResult.success(targetDetectionService.selectPage(targetDetectionBo));
+    }
+
+    /**
+     * 导出目标检测列表
+     */
+    @SaCheckPermission("demo:TargetDetection:export")
+    @Log(title = "目标检测", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TargetDetectionBo targetDetectionBo) {
+        List<TargetDetectionVo> list = targetDetectionService.selectList(targetDetectionBo);
+        ExcelUtil.exportExcel(list, "目标检测", TargetDetectionVo.class, response);
+    }
+
+    /**
+     * 获取目标检测详细信息
+     */
+    @SaCheckPermission("demo:TargetDetection:query")
+    @GetMapping(value = "/{id}")
+    public CommonResult<TargetDetectionVo> getInfo(@PathVariable Long id) {
+        return CommonResult.success(targetDetectionService.selectById(id));
+    }
+
+    /**
+     * 新增目标检测
+     */
+    @SaCheckPermission("demo:TargetDetection:add")
+    @Log(title = "目标检测", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping
+    public CommonResult<Void> add(@Validated @RequestBody TargetDetectionBo targetDetectionBo) {
+        boolean inserted = targetDetectionService.insert(targetDetectionBo);
+        if (!inserted) {
+            return CommonResult.fail("新增目标检测记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 修改目标检测
+     */
+    @SaCheckPermission("demo:TargetDetection:edit")
+    @Log(title = "目标检测", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping
+    public CommonResult<Void> edit(@Validated @RequestBody TargetDetectionBo targetDetectionBo) {
+        Boolean updated = targetDetectionService.update(targetDetectionBo);
+        if (!updated) {
+            return CommonResult.fail("修改目标检测记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 删除目标检测
+     */
+    @SaCheckPermission("demo:TargetDetection:remove")
+    @Log(title = "目标检测", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public CommonResult<Void> remove(@PathVariable Long[] ids) {
+        boolean deleted = targetDetectionService.deleteByIds(ids);
+        if (!deleted) {
+            return CommonResult.fail("删除目标检测记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    @GetMapping("/start/{id}")
+    public CommonResult start(@PathVariable("id") Long id) {
+        return targetDetectionService.start(id);
+    }
+
+    @GetMapping("/stop/{id}")
+    public CommonResult stop(@PathVariable("id") Long id) {
+        return targetDetectionService.stop(id);
+    }
+
+        @GetMapping("/zip/{id}")
+    public ResponseEntity<org.springframework.core.io.Resource> zipFolder(@PathVariable("id") Long id) throws IOException {
+        /**
+         * 传VideoImage的ID
+         */
+        return targetDetectionService.zipImages(id);
+    }
+}

+ 21 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/TargetIdentificationSubtaskController.java

@@ -1,6 +1,9 @@
 package com.taais.biz.controller;
 
+import java.util.Comparator;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 import lombok.RequiredArgsConstructor;
 import jakarta.servlet.http.HttpServletResponse;
@@ -39,8 +42,24 @@ public class TargetIdentificationSubtaskController extends BaseController {
      */
     @SaCheckPermission("identification:identificationSubtask:list")
     @GetMapping("/list")
-    public CommonResult<PageResult<TargetIdentificationSubtaskVo>> list(TargetIdentificationSubtaskBo targetIdentificationSubtaskBo) {
-        return CommonResult.success(targetIdentificationSubtaskService.selectPage(targetIdentificationSubtaskBo));
+    public CommonResult<PageResult<TargetIdentificationSubtaskVo>> list(TargetIdentificationSubtaskBo targetIdentificationSubtaskBo, Integer pageNum, Integer pageSize) {
+        List<TargetIdentificationSubtaskVo> list = targetIdentificationSubtaskService.selectList(targetIdentificationSubtaskBo);
+        List<TargetIdentificationSubtaskVo> collect = list.stream().sorted(((o1, o2) -> {
+                if ("数据扩增".equals(o1.getName())) {
+                    return -1;
+                }
+                if ("数据扩增".equals(o2.getName())) {
+                    return -1;
+                }
+                return 1;
+            })).skip((pageNum-1)*pageSize)
+            .limit(pageSize).toList();
+        PageResult<TargetIdentificationSubtaskVo> result = new PageResult<>();
+        result.setList(collect);
+        result.setTotal((long) list.size());
+        result.setPageNum(Long.valueOf(pageNum));
+        result.setPageSize(Long.valueOf(pageSize));
+        return CommonResult.success(result);
     }
 
     /**

+ 128 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/ToInfraredController.java

@@ -0,0 +1,128 @@
+package com.taais.biz.controller;
+
+import com.taais.biz.domain.bo.ToInfraredBo;
+import com.taais.biz.domain.vo.ToInfraredVo;
+import com.taais.biz.service.IToInfraredService;
+import com.taais.common.core.core.page.PageResult;
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.excel.utils.ExcelUtil;
+import com.taais.common.log.annotation.Log;
+import com.taais.common.log.enums.BusinessType;
+import com.taais.common.web.annotation.RepeatSubmit;
+import com.taais.common.web.core.BaseController;
+import jakarta.annotation.Resource;
+
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * 可见光转红外Controller
+ *
+ * @author 0
+ * 2024-09-20
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/demo/toInfrared")
+public class ToInfraredController extends BaseController {
+    @Resource
+    private IToInfraredService toInfraredService;
+
+    /**
+     * 查询可见光转红外列表
+     */
+    @SaCheckPermission("demo:toInfrared:list")
+    @GetMapping("/list")
+    public CommonResult<PageResult<ToInfraredVo>> list(ToInfraredBo toInfraredBo) {
+        return CommonResult.success(toInfraredService.selectPage(toInfraredBo));
+    }
+
+    /**
+     * 导出可见光转红外列表
+     */
+    @SaCheckPermission("demo:toInfrared:export")
+    @Log(title = "可见光转红外", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ToInfraredBo toInfraredBo) {
+        List<ToInfraredVo> list = toInfraredService.selectList(toInfraredBo);
+        ExcelUtil.exportExcel(list, "可见光转红外", ToInfraredVo.class, response);
+    }
+
+    /**
+     * 获取可见光转红外详细信息
+     */
+    @SaCheckPermission("demo:toInfrared:query")
+    @GetMapping(value = "/{id}")
+    public CommonResult<ToInfraredVo> getInfo(@PathVariable Long id) {
+        return CommonResult.success(toInfraredService.selectById(id));
+    }
+
+    /**
+     * 新增可见光转红外
+     */
+    @SaCheckPermission("demo:toInfrared:add")
+    @Log(title = "可见光转红外", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping
+    public CommonResult<Void> add(@Validated @RequestBody ToInfraredBo toInfraredBo) {
+        boolean inserted = toInfraredService.insert(toInfraredBo);
+        if (!inserted) {
+            return CommonResult.fail("新增可见光转红外记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 修改可见光转红外
+     */
+    @SaCheckPermission("demo:toInfrared:edit")
+    @Log(title = "可见光转红外", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping
+    public CommonResult<Void> edit(@Validated @RequestBody ToInfraredBo toInfraredBo) {
+        Boolean updated = toInfraredService.update(toInfraredBo);
+        if (!updated) {
+            return CommonResult.fail("修改可见光转红外记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 删除可见光转红外
+     */
+    @SaCheckPermission("demo:toInfrared:remove")
+    @Log(title = "可见光转红外", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public CommonResult<Void> remove(@PathVariable Long[] ids) {
+        boolean deleted = toInfraredService.deleteByIds(ids);
+        if (!deleted) {
+            return CommonResult.fail("删除可见光转红外记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    @GetMapping("/start/{id}")
+    public CommonResult start(@PathVariable("id") Long id) {
+        return toInfraredService.start(id);
+    }
+
+    @GetMapping("/stop/{id}")
+    public CommonResult stop(@PathVariable("id") Long id) {
+        return toInfraredService.stop(id);
+    }
+
+    @GetMapping("/zip/{id}")
+    public ResponseEntity<org.springframework.core.io.Resource> zipFolder(@PathVariable("id") Long id) throws IOException {
+        /**
+         * 传VideoImage的ID
+         */
+        return toInfraredService.zipImages(id);
+    }
+}

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

@@ -0,0 +1,129 @@
+package com.taais.biz.controller;
+
+import java.io.IOException;
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.excel.utils.ExcelUtil;
+import com.taais.common.log.annotation.Log;
+import com.taais.common.log.enums.BusinessType;
+import com.taais.common.web.annotation.RepeatSubmit;
+import com.taais.common.web.core.BaseController;
+import jakarta.annotation.Resource;
+import com.taais.biz.domain.vo.TrackSequenceVo;
+import com.taais.biz.domain.bo.TrackSequenceBo;
+import com.taais.biz.service.ITrackSequenceService;
+
+import com.taais.common.core.core.page.PageResult;
+
+/**
+ * 注视轨迹序列Controller
+ *
+ * @author wangkang
+ * 2024-09-22
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/demo/trackSequence")
+public class TrackSequenceController extends BaseController {
+    @Resource
+    private ITrackSequenceService trackSequenceService;
+
+    /**
+     * 查询注视轨迹序列列表
+     */
+    @SaCheckPermission("demo:trackSequence:list")
+    @GetMapping("/list")
+    public CommonResult<PageResult<TrackSequenceVo>> list(TrackSequenceBo trackSequenceBo) {
+        return CommonResult.success(trackSequenceService.selectPage(trackSequenceBo));
+    }
+
+    /**
+     * 导出注视轨迹序列列表
+     */
+    @SaCheckPermission("demo:trackSequence:export")
+    @Log(title = "注视轨迹序列", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TrackSequenceBo trackSequenceBo) {
+        List<TrackSequenceVo> list = trackSequenceService.selectList(trackSequenceBo);
+        ExcelUtil.exportExcel(list, "注视轨迹序列", TrackSequenceVo.class, response);
+    }
+
+    /**
+     * 获取注视轨迹序列详细信息
+     */
+    @SaCheckPermission("demo:trackSequence:query")
+    @GetMapping(value = "/{id}")
+    public CommonResult<TrackSequenceVo> getInfo(@PathVariable Long id) {
+        return CommonResult.success(trackSequenceService.selectById(id));
+    }
+
+    /**
+     * 新增注视轨迹序列
+     */
+    @SaCheckPermission("demo:trackSequence:add")
+    @Log(title = "注视轨迹序列", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping
+    public CommonResult<Void> add(@Validated @RequestBody TrackSequenceBo trackSequenceBo) {
+        boolean inserted = trackSequenceService.insert(trackSequenceBo);
+        if (!inserted) {
+            return CommonResult.fail("新增注视轨迹序列记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 修改注视轨迹序列
+     */
+    @SaCheckPermission("demo:trackSequence:edit")
+    @Log(title = "注视轨迹序列", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping
+    public CommonResult<Void> edit(@Validated @RequestBody TrackSequenceBo trackSequenceBo) {
+        Boolean updated = trackSequenceService.update(trackSequenceBo);
+        if (!updated) {
+            return CommonResult.fail("修改注视轨迹序列记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 删除注视轨迹序列
+     */
+    @SaCheckPermission("demo:trackSequence:remove")
+    @Log(title = "注视轨迹序列", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public CommonResult<Void> remove(@PathVariable Long[] ids) {
+        boolean deleted = trackSequenceService.deleteByIds(ids);
+        if (!deleted) {
+            return CommonResult.fail("删除注视轨迹序列记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    @GetMapping("/start/{id}")
+    public CommonResult start(@PathVariable("id") Long id) {
+        return trackSequenceService.start(id);
+    }
+
+    @GetMapping("/stop/{id}")
+    public CommonResult stop(@PathVariable("id") Long id) {
+        return trackSequenceService.stop(id);
+    }
+
+    @GetMapping("/zip/{id}")
+    public ResponseEntity<org.springframework.core.io.Resource> zipFolder(@PathVariable("id") Long id) throws IOException {
+        /**
+         * 传VideoImage的ID
+         */
+        return trackSequenceService.zipImages(id);
+    }
+}

+ 6 - 6
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/VideoStableController.java

@@ -62,15 +62,15 @@ public class VideoStableController extends BaseController {
 
             Path inputPath = null;
             Path outputPath = null;
-            String osName = System.getProperty("os.name");
+//            String osName = System.getProperty("os.name");
             // 判断是否是Windows环境
-            if (osName.toLowerCase().contains("windows")) {
-                inputPath = Paths.get("C:", videoStable.getInputPath());
-                outputPath = Paths.get("C:", videoStable.getOutputPath());
-            } else {
+//            if (osName.toLowerCase().contains("windows")) {
+//                inputPath = Paths.get("C:", videoStable.getInputPath());
+//                outputPath = Paths.get("C:", videoStable.getOutputPath());
+//            } else {
                 inputPath = Paths.get(videoStable.getInputPath());
                 outputPath = Paths.get(videoStable.getOutputPath());
-            }
+//            }
             System.out.println("inputPath: " + inputPath.toString());
             System.out.println("outputPath: " + outputPath.toString());
 

+ 59 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/AlgorithmConfigTrack.java

@@ -0,0 +1,59 @@
+package com.taais.biz.domain;
+
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 算法配置对象 algorithm_config_track
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "algorithm_config_track")
+public class AlgorithmConfigTrack extends BaseEntity
+    {
+@Serial
+private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @Id
+    private Long id;
+
+    /** 类型 */
+    private String type;
+
+    /** 父id */
+    private Long parentId;
+
+    /** 分系统 */
+    private String subsystem;
+
+    /** 算法名称 */
+    private String algorithmName;
+
+    /** 算法地址 */
+    private String algorithmAddress;
+
+    /** 参数配置 */
+    private String parameterConfig;
+
+    /** 备注 */
+    private String remarks;
+
+    /** 逻辑删除标志(0代表存在 1代表删除) */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+    /** 系统 */
+    private String system;
+
+
+}

+ 65 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/AlgorithmModelTrack.java

@@ -0,0 +1,65 @@
+package com.taais.biz.domain;
+
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 算法模型配置对象 algorithm_model_track
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "algorithm_model_track")
+public class AlgorithmModelTrack extends BaseEntity
+    {
+@Serial
+private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @Id
+    private Long id;
+
+    /** 算法 */
+    private Long algorithmId;
+
+    /** 模型名称 */
+    private String modelName;
+
+    /** 模型 */
+    private String modelAddress;
+
+    /** 训练样本数 */
+    private Long sampleNumber;
+
+    /** 训练循环次数 */
+    private Long cycleEpoch;
+
+    /** 备注 */
+    private String remarks;
+
+    /** 逻辑删除标志(0代表存在 1代表删除) */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+    /** 系统 */
+    private String system;
+
+    private String algorithmType;
+
+    /*
+    *  NOT_START = "0";
+       RUNNING = "1";
+       END = "2";
+       FAILED = "3";
+       INTERRUPTED = "4";
+    */
+    private String modelStatus;
+}

+ 90 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/DataAmplificationTask.java

@@ -0,0 +1,90 @@
+package com.taais.biz.domain;
+
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import com.taais.common.orm.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.util.Date;
+
+/**
+ * 目标识别子任务对象 target_identification_subtask
+ *
+ * @author Allen
+ * 2024-08-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "data_amplification_task")
+public class DataAmplificationTask extends BaseEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @Id
+    private Long id;
+
+    /**
+     * 子任务id
+     */
+    private Long subTaskId;
+
+    /**
+     * 参数类型
+     */
+    private String augmentationType;
+
+    private String inputImagePath;
+
+    private String outputImagePath;
+
+    /** 任务名称 */
+    private String name;
+
+    /** 任务状态 */
+    private String status;
+
+    /**
+     * 数据批次号
+     */
+    private String dataBatchNums;
+
+    /**
+     * 调用算法时所用的参数
+     */
+    private String parameters;
+
+    /**
+     * 开始时间
+     */
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    private Integer costSecond;
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /** 逻辑删除标志(0代表存在 1代表删除) */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+}

+ 122 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/DataSeq.java

@@ -0,0 +1,122 @@
+package com.taais.biz.domain;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 数据管理对象 data_seq
+ *
+ * @author wangkang
+ * 2024-10-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "data_seq")
+public class DataSeq extends BaseEntity {
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @Id
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    private String subsystem;
+
+    /**
+     * 数据类型
+     */
+    private String dataType;
+
+    /**
+     * 文件类型
+     */
+    private String fileType;
+
+    /**
+     * 目标类型
+     */
+    private String objectType;
+
+    /**
+     * 目标子类型
+     */
+    private String objectSubtype;
+
+    /**
+     * 批次号
+     */
+    private String batchNum;
+
+    /**
+     * 场景
+     */
+    private String scene;
+
+    /**
+     * 数据源
+     */
+    private String dataSource;
+
+    /**
+     * 采集时间
+     */
+    private Date gatherTime;
+
+    /**
+     * 采集地点
+     */
+    private String gatherSpot;
+
+    /**
+     * 图片url
+     */
+    private String url;
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 逻辑删除标志(0代表存在 1代表删除)
+     */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+    /**
+     * 图片压缩包路径
+     */
+    private String filePath;
+
+    /**
+     * 压缩包解压的路径
+     */
+    private String unzipPath;
+
+    /**
+     * 输入oss_ID
+     */
+    private Long inputOssId;
+}

+ 81 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/TargetDetection.java

@@ -0,0 +1,81 @@
+package com.taais.biz.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 目标检测对象 target_detection
+ *
+ * @author wangkang
+ * 2024-09-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "target_detection")
+public class TargetDetection extends BaseEntity
+    {
+@Serial
+private static final long serialVersionUID = 1L;
+
+    /** ID */
+    @Id
+    private Long id;
+
+    /** 任务名称 */
+    private String name;
+
+    /** 状态
+0:未开始
+1:进行中
+2:完成
+3:失败
+4:中断 */
+    private String status;
+
+    /** 开始时间 */
+    private Date startTime;
+
+    /** 结束时间 */
+    private Date endTime;
+
+    /** 耗时 */
+    private Long costSecond;
+
+    /** 日志 */
+    private String log;
+
+    /** 备注 */
+    private String remarks;
+
+    /** $column.columnComment */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+    /** $column.columnComment */
+    private String url;
+
+    /** $column.columnComment */
+    private Long inputOssId;
+
+    /** 输入路径 */
+    private String inputPath;
+
+    /** 输出路径 */
+    private String outputPath;
+
+    /** zip文件输出路径 */
+    private String zipFilePath;
+
+    /** 模型的id */
+    private Long algorithmModelId;
+
+
+}

+ 30 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/TaskTrackResultBo.java

@@ -0,0 +1,30 @@
+package com.taais.biz.domain;
+
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Datetime : 2023/12/5 12:13
+ * @Author : WANGKANG
+ * @Email : 1686617586@qq.com
+ * @File : TaskTrackResultBo.java
+ * @Brief :
+ * Copyright 2023 WANGKANG, All Rights Reserved.
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class TaskTrackResultBo {
+    @NotNull(message = "status不能为空")
+    private String status;
+    private String msg;
+    @NotNull(message = "id不能为空")
+    private Long bizId;
+
+    @NotEmpty(message = "bizType不能为空")
+    private String bizType;
+}

+ 103 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/ToInfrared.java

@@ -0,0 +1,103 @@
+package com.taais.biz.domain;
+
+import java.util.Date;
+
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 可见光转红外对象 to_infrared
+ *
+ * @author 0
+ * 2024-09-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "to_infrared")
+public class ToInfrared extends BaseEntity {
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @Id
+    private Long id;
+
+    /**
+     * 任务名称
+     */
+    private String name;
+
+    /**
+     * 状态
+     * 0:未开始
+     * 1:进行中
+     * 2:完成
+     * 3:失败
+     * 4:中断
+     */
+    private String status;
+
+    /**
+     * 开始时间
+     */
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    private Long costSecond;
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * $column.columnComment
+     */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+    /**
+     * $column.columnComment
+     */
+    private String url;
+
+    /**
+     * $column.columnComment
+     */
+    private Long inputOssId;
+
+    /**
+     * 输入路径
+     */
+    private String inputPath;
+
+    /**
+     * 输出路径
+     */
+    private String outputPath;
+    private String zipFilePath;
+
+    private Long algorithmModelId;
+
+}

+ 78 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/TrackSequence.java

@@ -0,0 +1,78 @@
+package com.taais.biz.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 注视轨迹序列对象 track_sequence
+ *
+ * @author wangkang
+ * 2024-09-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "track_sequence")
+public class TrackSequence extends BaseEntity
+    {
+@Serial
+private static final long serialVersionUID = 1L;
+
+    /** ID */
+    @Id
+    private Long id;
+
+    /** 任务名称 */
+    private String name;
+
+    /** 状态
+0:未开始
+1:进行中
+2:完成
+3:失败
+4:中断 */
+    private String status;
+
+    /** 开始时间 */
+    private Date startTime;
+
+    /** 结束时间 */
+    private Date endTime;
+
+    /** 耗时 */
+    private Long costSecond;
+
+    /** 日志 */
+    private String log;
+
+    /** 备注 */
+    private String remarks;
+
+    /** $column.columnComment */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+    /** $column.columnComment */
+    private String url;
+
+    /** $column.columnComment */
+    private Long inputOssId;
+
+    /** 输入路径 */
+    private String inputPath;
+
+    /** 输出路径 */
+    private String outputPath;
+
+    /** zip文件输出路径 */
+    private String zipFilePath;
+
+    private Long algorithmModelId;
+}

+ 67 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/AlgorithmConfigTrackBo.java

@@ -0,0 +1,67 @@
+package com.taais.biz.domain.bo;
+
+import com.taais.biz.domain.AlgorithmConfigTrack;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 算法配置业务对象 algorithm_config_track
+ *
+ * @author wangkang
+ * @date 2024-09-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = AlgorithmConfigTrack.class, reverseConvertGenerate = false)
+public class AlgorithmConfigTrackBo extends BaseEntity{
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 类型
+     */
+    private String type;
+
+    /**
+     * 父id
+     */
+    private Long parentId;
+
+    /**
+     * 分系统
+     */
+    private String subsystem;
+
+    /**
+     * 算法名称
+     */
+    @NotBlank(message = "算法名称不能为空")
+    private String algorithmName;
+
+    /**
+     * 算法地址
+     */
+    @NotBlank(message = "算法地址不能为空")
+    private String algorithmAddress;
+
+    /**
+     * 参数配置
+     */
+    @NotBlank(message = "参数配置不能为空")
+    private String parameterConfig;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 系统
+     */
+    private String system;
+}

+ 68 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/AlgorithmModelTrackBo.java

@@ -0,0 +1,68 @@
+package com.taais.biz.domain.bo;
+
+import com.taais.biz.domain.AlgorithmModelTrack;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 算法模型配置业务对象 algorithm_model_track
+ *
+ * @author wangkang
+ * @date 2024-09-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = AlgorithmModelTrack.class, reverseConvertGenerate = false)
+public class AlgorithmModelTrackBo extends BaseEntity {
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 算法
+     */
+    @NotNull(message = "算法不能为空")
+    private Long algorithmId;
+
+    /**
+     * 模型名称
+     */
+    @NotBlank(message = "模型名称不能为空")
+    private String modelName;
+
+    // @NotNull(message = "模型文件不能为空")
+    private Long modelInputOssId;
+
+    /**
+     * 模型
+     */
+    private String modelAddress;
+
+    /**
+     * 训练样本数
+     */
+    private Long sampleNumber;
+
+    /**
+     * 训练循环次数
+     */
+    private Long cycleEpoch;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 系统
+     */
+    private String system;
+
+    private String algorithmType;
+
+    private String modelStatus;
+}

+ 93 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/DataAmplificationTaskBo.java

@@ -0,0 +1,93 @@
+package com.taais.biz.domain.bo;
+
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.taais.biz.domain.DataAmplificationTask;
+import com.taais.biz.domain.TargetIdentificationSubtask;
+import com.taais.common.orm.core.domain.BaseEntity;
+import io.github.linpeilie.annotations.AutoMapper;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.util.Date;
+
+/**
+ * 目标识别子任务业务对象 target_identification_subtask
+ *
+ * @author Allen
+ * @date 2024-08-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = DataAmplificationTask.class, reverseConvertGenerate = false)
+public class DataAmplificationTaskBo extends BaseEntity{
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @Id
+    private Long id;
+
+    /**
+     * 子任务id
+     */
+    private Long subTaskId;
+
+    /**
+     * 参数类型
+     */
+    private String augmentationType;
+
+    /** 任务名称 */
+    private String name;
+
+    /** 任务状态 */
+    private String status;
+
+    /**
+     * 数据批次号
+     */
+    private String dataBatchNums;
+
+    /**
+     * 调用算法时所用的参数
+     */
+    private String parameters;
+
+    /**
+     * 开始时间
+     */
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    private Integer costSecond;
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /** 逻辑删除标志(0代表存在 1代表删除) */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+    private String inputImagePath;
+
+    private String outputImagePath;
+
+}

+ 108 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/DataSeqBo.java

@@ -0,0 +1,108 @@
+package com.taais.biz.domain.bo;
+
+import com.taais.biz.domain.DataSeq;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 数据管理业务对象 data_seq
+ *
+ * @author wangkang
+ * @date 2024-10-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = DataSeq.class, reverseConvertGenerate = false)
+public class DataSeqBo extends BaseEntity {
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 名称
+     */
+    @NotBlank(message = "名称不能为空")
+    private String name;
+
+    /**
+     * 数据类型
+     */
+    @NotBlank(message = "分系统不能为空")
+    private String subsystem;
+
+    /**
+     * 数据类型
+     */
+    private String dataType;
+
+    /**
+     * 文件类型
+     */
+    private String fileType;
+
+    /**
+     * 目标类型
+     */
+    private String objectType;
+
+    /**
+     * 目标子类型
+     */
+    private String objectSubtype;
+
+    /**
+     * 批次号
+     */
+    @NotBlank(message = "批次号不能为空")
+    private String batchNum;
+
+    /**
+     * 场景
+     */
+    private String scene;
+
+    /**
+     * 数据源
+     */
+    private String dataSource;
+
+    /**
+     * 采集时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date gatherTime;
+
+    /**
+     * 采集地点
+     */
+    private String gatherSpot;
+
+    /**
+     * 图片url
+     */
+    private String url;
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    private String filePath;
+    private String unzipPath;
+
+    @NotNull(message = "请上传数据集文件")
+    private Long inputOssId;
+}

+ 101 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/TargetDetectionBo.java

@@ -0,0 +1,101 @@
+package com.taais.biz.domain.bo;
+
+import com.taais.biz.domain.TargetDetection;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 目标检测业务对象 target_detection
+ *
+ * @author wangkang
+ * @date 2024-09-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = TargetDetection.class, reverseConvertGenerate = false)
+public class TargetDetectionBo extends BaseEntity{
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 任务名称
+     */
+    @NotBlank(message = "任务名称不能为空")
+    private String name;
+
+    /**
+     * 状态
+        0:未开始
+        1:进行中
+        2:完成
+        3:失败
+        4:中断
+             */
+    private String status;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    private Long costSecond;
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * $column.columnComment
+     */
+    private String url;
+
+    /**
+     * $column.columnComment
+     */
+    @NotNull(message = "图片集不能为空")
+    private Long inputOssId;
+
+    /**
+     * 输入路径
+     */
+    private String inputPath;
+
+    /**
+     * 输出路径
+     */
+    private String outputPath;
+
+    /**
+     * zip文件输出路径
+     */
+    private String zipFilePath;
+
+    /**
+     * 模型的id
+     */
+    @NotNull(message = "模型的id不能为空")
+    private Long algorithmModelId;
+}

+ 93 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/ToInfraredBo.java

@@ -0,0 +1,93 @@
+package com.taais.biz.domain.bo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.taais.biz.domain.ToInfrared;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+import java.util.Date;
+
+/**
+ * 可见光转红外业务对象 to_infrared
+ *
+ * @author 0
+ * @date 2024-09-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = ToInfrared.class, reverseConvertGenerate = false)
+public class ToInfraredBo extends BaseEntity {
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 任务名称
+     */
+    @NotBlank(message = "任务名称不能为空")
+    private String name;
+
+    /**
+     * 状态
+     * 0:未开始
+     * 1:进行中
+     * 2:完成
+     * 3:失败
+     * 4:中断
+     */
+    private String status;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    private Long costSecond;
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * $column.columnComment
+     */
+    private String url;
+
+    /**
+     * $column.columnComment
+     */
+    @NotNull(message = "上传文件不能为空")
+    private Long inputOssId;
+
+    /**
+     * 输入路径
+     */
+    private String inputPath;
+
+    /**
+     * 输出路径
+     */
+    private String outputPath;
+
+    private Long algorithmModelId;
+}

+ 25 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/ToInfraredStartResultBo.java

@@ -0,0 +1,25 @@
+package com.taais.biz.domain.bo;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.*;
+
+/**
+ * @Datetime : 2023/12/5 12:13
+ * @Author : WANGKANG
+ * @Email : 1686617586@qq.com
+ * @File : ToInfraredStartResultBo.java
+ * @Brief :
+ * Copyright 2023 WANGKANG, All Rights Reserved.
+ */
+@Builder
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@EqualsAndHashCode()
+public class ToInfraredStartResultBo {
+    @NotNull(message = "status不能为空")
+    private String status;
+    private String msg;
+    @NotNull(message = "id不能为空")
+    private Long id;
+}

+ 98 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/TrackSequenceBo.java

@@ -0,0 +1,98 @@
+package com.taais.biz.domain.bo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.taais.biz.domain.TrackSequence;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+import java.util.Date;
+
+/**
+ * 注视轨迹序列业务对象 track_sequence
+ *
+ * @author wangkang
+ * @date 2024-09-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = TrackSequence.class, reverseConvertGenerate = false)
+public class TrackSequenceBo extends BaseEntity{
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 任务名称
+     */
+    @NotBlank(message = "任务名称不能为空")
+    private String name;
+
+    /**
+     * 状态
+0:未开始
+1:进行中
+2:完成
+3:失败
+4:中断
+     */
+    private String status;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    private Long costSecond;
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * $column.columnComment
+     */
+    private String url;
+
+    /**
+     * $column.columnComment
+     */
+    @NotNull(message = "上传文件不能为空")
+    private Long inputOssId;
+
+    /**
+     * 输入路径
+     */
+    private String inputPath;
+
+    /**
+     * 输出路径
+     */
+    private String outputPath;
+
+    /**
+     * zip文件输出路径
+     */
+    private String zipFilePath;
+
+    private Long algorithmModelId;
+}

+ 10 - 5
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/dto/DataAmplifyDto.java

@@ -1,10 +1,12 @@
 package com.taais.biz.domain.dto;
 
+import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotEmpty;
 import jakarta.validation.constraints.NotNull;
 import lombok.*;
 import lombok.experimental.Accessors;
 
+import java.util.List;
 import java.util.Map;
 
 
@@ -19,19 +21,22 @@ import java.util.Map;
 @Accessors(chain = true)
 public class DataAmplifyDto {
 
-    @NotEmpty(message = "批次不能为空")
+    @NotBlank(message = "id不能为空")
+    private String id;
+
+    @NotBlank(message = "批次不能为空")
     private String batchNum;
 
-    @NotEmpty(message = "任务名称")
+    @NotBlank(message = "任务名称")
     private String taskName;
 
-    @NotEmpty(message = "扩充方式不能为空")
+    @NotBlank(message = "扩充方式不能为空")
     private String augmentationType;
 
     private String inputImagePath;
 
     private String outputImagePath;
 
-    @NotNull(message = "扩充算法配置不能为空")
-    private Map<String, String> otherParams;
+    @NotEmpty(message = "扩充算法配置不能为空")
+    private List<Map<String, String>> otherParams;
 }

+ 2 - 1
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/dto/task/CreateTargetIdentificationTaskDto.java

@@ -1,5 +1,6 @@
 package com.taais.biz.domain.dto.task;
 
+import com.taais.biz.domain.dto.DataAmplifyDto;
 import lombok.Data;
 
 import java.util.List;
@@ -36,5 +37,5 @@ public class CreateTargetIdentificationTaskDto {
     private Boolean hasTrainAugmentation;
 
     // 训练扩增的超参
-    private String trainAugmentationParams;
+    private DataAmplifyDto trainAugmentationParams;
 }

+ 64 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmConfigTrackImportVo.java

@@ -0,0 +1,64 @@
+package com.taais.biz.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.NoArgsConstructor;
+
+/**
+ * 算法配置导入视图对象 algorithm_config_track
+ *
+ * @author wangkang
+ * @date 2024-09-26
+ */
+
+@Data
+@NoArgsConstructor
+public class AlgorithmConfigTrackImportVo implements Serializable
+{
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+
+     /** 类型 */
+    @ExcelProperty(value = "类型")
+    private String type;
+
+     /** 父id */
+    @ExcelProperty(value = "父id")
+    private Long parentId;
+
+     /** 分系统 */
+    @ExcelProperty(value = "分系统")
+    private String subsystem;
+
+     /** 算法名称 */
+    @ExcelProperty(value = "算法名称")
+    private String algorithmName;
+
+     /** 算法地址 */
+    @ExcelProperty(value = "算法地址")
+    private String algorithmAddress;
+
+     /** 参数配置 */
+    @ExcelProperty(value = "参数配置")
+    private String parameterConfig;
+
+     /** 备注 */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+     /** 逻辑删除标志(0代表存在 1代表删除) */
+    @ExcelProperty(value = "逻辑删除标志(0代表存在 1代表删除)")
+    private Integer delFlag;
+
+     /** 系统 */
+    @ExcelProperty(value = "系统")
+    private String system;
+
+
+}

+ 72 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmConfigTrackVo.java

@@ -0,0 +1,72 @@
+package com.taais.biz.domain.vo;
+
+import com.taais.biz.domain.AlgorithmConfigTrack;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import java.io.Serial;
+import java.io.Serializable;
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 算法配置视图对象 algorithm_config_track
+ *
+ * @author wangkang
+ * @date 2024-09-26
+ */
+@Data
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = AlgorithmConfigTrack.class)
+public class AlgorithmConfigTrackVo extends BaseEntity implements Serializable {
+
+@Serial
+private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @ExcelProperty(value = "主键ID")
+    private Long id;
+
+    /** 类型 */
+    @ExcelProperty(value = "类型")
+    private String type;
+
+    /** 父id */
+    @ExcelProperty(value = "父id")
+    private Long parentId;
+
+    /** 分系统 */
+    @ExcelProperty(value = "分系统")
+    private String subsystem;
+
+    /** 算法名称 */
+    @ExcelProperty(value = "算法名称")
+    private String algorithmName;
+
+    /** 算法地址 */
+    @ExcelProperty(value = "算法地址")
+    private String algorithmAddress;
+
+    /** 参数配置 */
+    @ExcelProperty(value = "参数配置")
+    private String parameterConfig;
+
+    /** 备注 */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    /** 逻辑删除标志(0代表存在 1代表删除) */
+    @ExcelProperty(value = "逻辑删除标志(0代表存在 1代表删除)")
+    private Integer delFlag;
+
+    /** 系统 */
+    @ExcelProperty(value = "系统")
+    private String system;
+
+
+
+}

+ 60 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmModelTrackImportVo.java

@@ -0,0 +1,60 @@
+package com.taais.biz.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.NoArgsConstructor;
+
+/**
+ * 算法模型配置导入视图对象 algorithm_model_track
+ *
+ * @author wangkang
+ * @date 2024-09-26
+ */
+
+@Data
+@NoArgsConstructor
+public class AlgorithmModelTrackImportVo implements Serializable
+{
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+
+     /** 算法 */
+    @ExcelProperty(value = "算法")
+    private Long algorithmId;
+
+     /** 模型名称 */
+    @ExcelProperty(value = "模型名称")
+    private String modelName;
+
+     /** 模型 */
+    @ExcelProperty(value = "模型")
+    private String modelAddress;
+
+     /** 训练样本数 */
+    @ExcelProperty(value = "训练样本数")
+    private Long sampleNumber;
+
+     /** 训练循环次数 */
+    @ExcelProperty(value = "训练循环次数")
+    private Long cycleEpoch;
+
+     /** 备注 */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+     /** 逻辑删除标志(0代表存在 1代表删除) */
+    @ExcelProperty(value = "逻辑删除标志(0代表存在 1代表删除)")
+    private Integer delFlag;
+
+     /** 系统 */
+    @ExcelProperty(value = "系统")
+    private String system;
+
+
+}

+ 92 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmModelTrackVo.java

@@ -0,0 +1,92 @@
+package com.taais.biz.domain.vo;
+
+import com.taais.biz.domain.AlgorithmModelTrack;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 算法模型配置视图对象 algorithm_model_track
+ *
+ * @author wangkang
+ * @date 2024-09-26
+ */
+@Data
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = AlgorithmModelTrack.class)
+public class AlgorithmModelTrackVo extends BaseEntity implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @ExcelProperty(value = "主键ID")
+    private Long id;
+
+    /**
+     * 算法
+     */
+    @ExcelProperty(value = "算法")
+    private Long algorithmId;
+
+    /**
+     * 模型名称
+     */
+    @ExcelProperty(value = "模型名称")
+    private String modelName;
+
+    /**
+     * 模型
+     */
+    @ExcelProperty(value = "模型")
+    private String modelAddress;
+
+    /**
+     * 训练样本数
+     */
+    @ExcelProperty(value = "训练样本数")
+    private Long sampleNumber;
+
+    /**
+     * 训练循环次数
+     */
+    @ExcelProperty(value = "训练循环次数")
+    private Long cycleEpoch;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    /**
+     * 逻辑删除标志(0代表存在 1代表删除)
+     */
+    @ExcelProperty(value = "逻辑删除标志(0代表存在 1代表删除)")
+    private Integer delFlag;
+
+    /**
+     * 系统
+     */
+    @ExcelProperty(value = "系统")
+    private String system;
+
+    private String algorithmType;
+    private String parameterConfig;
+
+    private String modelStatus;
+    private String type;
+    private String subsystem;
+}

+ 91 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/DataAmplificationTaskVo.java

@@ -0,0 +1,91 @@
+package com.taais.biz.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.biz.domain.AlgorithmTaskConfiguration;
+import com.taais.common.orm.core.domain.BaseEntity;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = AlgorithmTaskConfiguration.class)
+public class DataAmplificationTaskVo extends BaseEntity implements Serializable {
+
+    @ExcelProperty(value = "主键ID")
+    private Long id;
+
+    /**
+     * 子任务id
+     */
+    @ExcelProperty(value = "子任务id")
+    private Long subTaskId;
+
+    /**
+     * 参数类型
+     */
+    @ExcelProperty(value = "参数类型")
+    private String augmentationType;
+
+    /** 任务名称 */
+    @ExcelProperty(value = "任务名称")
+    private String name;
+
+    /** 任务状态 */
+    @ExcelProperty(value = "任务状态")
+    private String status;
+
+    /**
+     * 数据批次号
+     */
+    @ExcelProperty(value = "数据批次号")
+    private String dataBatchNums;
+
+    /**
+     * 调用算法时所用的参数
+     */
+    @ExcelProperty(value = "调用算法时所用的参数")
+    private String parameters;
+
+    /**
+     * 开始时间
+     */
+    @ExcelProperty(value = "开始时间")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @ExcelProperty(value = "结束时间")
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    @ExcelProperty(value = "耗时")
+    private Integer costSecond;
+
+    /**
+     * 日志
+     */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    @ExcelProperty(value = "输入路径")
+    private String inputImagePath;
+
+    @ExcelProperty(value = "输出路径")
+    private String outputImagePath;
+
+}

+ 86 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/DataSeqImportVo.java

@@ -0,0 +1,86 @@
+package com.taais.biz.domain.vo;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.NoArgsConstructor;
+
+/**
+ * 数据管理导入视图对象 data_seq
+ *
+ * @author wangkang
+ * @date 2024-10-08
+ */
+
+@Data
+@NoArgsConstructor
+public class DataSeqImportVo implements Serializable
+{
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+
+     /** 名称 */
+    @ExcelProperty(value = "名称")
+    private String name;
+
+     /** 数据类型 */
+    @ExcelProperty(value = "数据类型")
+    private String dataType;
+
+     /** 文件类型 */
+    @ExcelProperty(value = "文件类型")
+    private String fileType;
+
+     /** 目标类型 */
+    @ExcelProperty(value = "目标类型")
+    private String objectType;
+
+     /** 目标子类型 */
+    @ExcelProperty(value = "目标子类型")
+    private String objectSubtype;
+
+     /** 批次号 */
+    @ExcelProperty(value = "批次号")
+    private String batchNum;
+
+     /** 场景 */
+    @ExcelProperty(value = "场景")
+    private String scene;
+
+     /** 数据源 */
+    @ExcelProperty(value = "数据源")
+    private String dataSource;
+
+     /** 采集时间 */
+    @ExcelProperty(value = "采集时间")
+    private Date gatherTime;
+
+     /** 采集地点 */
+    @ExcelProperty(value = "采集地点")
+    private String gatherSpot;
+
+     /** 图片url */
+    @ExcelProperty(value = "图片url")
+    private String url;
+
+     /** 日志 */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+     /** 备注 */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+     /** 逻辑删除标志(0代表存在 1代表删除) */
+    @ExcelProperty(value = "逻辑删除标志(0代表存在 1代表删除)")
+    private Integer delFlag;
+
+
+}

+ 137 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/DataSeqVo.java

@@ -0,0 +1,137 @@
+package com.taais.biz.domain.vo;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.taais.biz.domain.DataSeq;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 数据管理视图对象 data_seq
+ *
+ * @author wangkang
+ * @date 2024-10-08
+ */
+@Data
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = DataSeq.class)
+public class DataSeqVo extends BaseEntity implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @ExcelProperty(value = "id")
+    private Long id;
+
+    /**
+     * 名称
+     */
+    @ExcelProperty(value = "名称")
+    private String name;
+
+    /**
+     * 数据类型
+     */
+    @ExcelProperty(value = "数据类型")
+    private String dataType;
+
+    /**
+     * 文件类型
+     */
+    @ExcelProperty(value = "文件类型")
+    private String fileType;
+
+    /**
+     * 目标类型
+     */
+    @ExcelProperty(value = "目标类型")
+    private String objectType;
+
+    /**
+     * 目标子类型
+     */
+    @ExcelProperty(value = "目标子类型")
+    private String objectSubtype;
+
+    /**
+     * 批次号
+     */
+    @ExcelProperty(value = "批次号")
+    private String batchNum;
+
+    /**
+     * 场景
+     */
+    @ExcelProperty(value = "场景")
+    private String scene;
+
+    /**
+     * 数据源
+     */
+    @ExcelProperty(value = "数据源")
+    private String dataSource;
+
+    /**
+     * 采集时间
+     */
+    @ExcelProperty(value = "采集时间")
+    private Date gatherTime;
+
+    /**
+     * 采集地点
+     */
+    @ExcelProperty(value = "采集地点")
+    private String gatherSpot;
+
+    /**
+     * 图片url
+     */
+    @ExcelProperty(value = "图片url")
+    private String url;
+
+    /**
+     * 日志
+     */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    /**
+     * 逻辑删除标志(0代表存在 1代表删除)
+     */
+    @ExcelProperty(value = "逻辑删除标志(0代表存在 1代表删除)")
+    private Integer delFlag;
+
+    @ExcelProperty(value = "文件路径")
+    private String filePath;
+
+    @ExcelProperty(value = "解压路径")
+    private String unzipPath;
+
+    @NotBlank(message = "inputOssId")
+    private Long inputOssId;
+
+    @NotBlank(message = "分系统")
+    private String subsystem;
+}

+ 26 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/StartToInfraredTask.java

@@ -0,0 +1,26 @@
+package com.taais.biz.domain.vo;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Datetime : 2023/12/5 12:13
+ * @Author : WANGKANG
+ * @Email : 1686617586@qq.com
+ * @File : StartToInfraredTask.java
+ * @Brief :
+ * Copyright 2023 WANGKANG, All Rights Reserved.
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class StartToInfraredTask {
+    private String bizType;
+    private Long bizId;
+    private String otherParams;
+    private String model_path;
+    private String result_dir;
+    private String source_dir;
+}

+ 123 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/TargetDetectionImportVo.java

@@ -0,0 +1,123 @@
+package com.taais.biz.domain.vo;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+import lombok.NoArgsConstructor;
+
+/**
+ * 目标检测导入视图对象 target_detection
+ *
+ * @author wangkang
+ * @date 2024-09-29
+ */
+
+@Data
+@NoArgsConstructor
+public class TargetDetectionImportVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 任务名称
+     */
+    @ExcelProperty(value = "任务名称")
+    private String name;
+
+    /**
+     * 状态
+     * 0:未开始
+     * 1:进行中
+     * 2:完成
+     * 3:失败
+     * 4:中断
+     */
+    @ExcelProperty(value = "状态")
+    private String status;
+
+    /**
+     * 开始时间
+     */
+    @ExcelProperty(value = "开始时间")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @ExcelProperty(value = "结束时间")
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    @ExcelProperty(value = "耗时")
+    private Long costSecond;
+
+    /**
+     * 日志
+     */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${column.columnComment}")
+    private Integer delFlag;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private String url;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private Long inputOssId;
+
+    /**
+     * 输入路径
+     */
+    @ExcelProperty(value = "输入路径")
+    private String inputPath;
+
+    /**
+     * 输出路径
+     */
+    @ExcelProperty(value = "输出路径")
+    private String outputPath;
+
+    /**
+     * zip文件输出路径
+     */
+    @ExcelProperty(value = "zip文件输出路径")
+    private String zipFilePath;
+
+    /**
+     * 模型的id
+     */
+    @ExcelProperty(value = "模型的id")
+    private Long algorithmModelId;
+
+
+}

+ 136 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/TargetDetectionVo.java

@@ -0,0 +1,136 @@
+package com.taais.biz.domain.vo;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.taais.biz.domain.TargetDetection;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 目标检测视图对象 target_detection
+ *
+ * @author wangkang
+ * @date 2024-09-29
+ */
+@Data
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = TargetDetection.class)
+public class TargetDetectionVo extends BaseEntity implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @ExcelProperty(value = "ID")
+    private Long id;
+
+    /**
+     * 任务名称
+     */
+    @ExcelProperty(value = "任务名称")
+    private String name;
+
+    /**
+     * 状态
+     * 0:未开始
+     * 1:进行中
+     * 2:完成
+     * 3:失败
+     * 4:中断
+     */
+    @ExcelProperty(value = "状态")
+    private String status;
+
+    /**
+     * 开始时间
+     */
+    @ExcelProperty(value = "开始时间")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @ExcelProperty(value = "结束时间")
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    @ExcelProperty(value = "耗时")
+    private Long costSecond;
+
+    /**
+     * 日志
+     */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${column.columnComment}")
+    private Integer delFlag;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private String url;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private Long inputOssId;
+
+    /**
+     * 输入路径
+     */
+    @ExcelProperty(value = "输入路径")
+    private String inputPath;
+
+    /**
+     * 输出路径
+     */
+    @ExcelProperty(value = "输出路径")
+    private String outputPath;
+
+    /**
+     * zip文件输出路径
+     */
+    @ExcelProperty(value = "zip文件输出路径")
+    private String zipFilePath;
+
+    /**
+     * 模型的id
+     */
+    @ExcelProperty(value = "模型的id")
+    private Long algorithmModelId;
+
+    private String type;
+    private String subsystem;
+    private String algorithmName;
+    private String modelName;
+}

+ 85 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/ToInfraredImportVo.java

@@ -0,0 +1,85 @@
+package com.taais.biz.domain.vo;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.NoArgsConstructor;
+
+/**
+ * 可见光转红外导入视图对象 to_infrared
+ *
+ * @author 0
+ * @date 2024-09-20
+ */
+
+@Data
+@NoArgsConstructor
+public class ToInfraredImportVo implements Serializable
+{
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+
+     /** 任务名称 */
+    @ExcelProperty(value = "任务名称")
+    private String name;
+
+     /** 状态
+0:未开始
+1:进行中
+2:完成
+3:失败
+4:中断 */
+    @ExcelProperty(value = "状态 ")
+    private String status;
+
+     /** 开始时间 */
+    @ExcelProperty(value = "开始时间")
+    private Date startTime;
+
+     /** 结束时间 */
+    @ExcelProperty(value = "结束时间")
+    private Date endTime;
+
+     /** 耗时 */
+    @ExcelProperty(value = "耗时")
+    private Long costSecond;
+
+     /** 日志 */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+     /** 备注 */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+     /** $column.columnComment */
+    @ExcelProperty(value = "${column.columnComment}")
+    private Integer delFlag;
+
+     /** $column.columnComment */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private String url;
+
+     /** $column.columnComment */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private Long inputOssId;
+
+     /** 输入路径 */
+    @ExcelProperty(value = "输入路径")
+    private String inputPath;
+
+     /** 输出路径 */
+    @ExcelProperty(value = "输出路径")
+    private String outputPath;
+
+
+}

+ 123 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/ToInfraredVo.java

@@ -0,0 +1,123 @@
+package com.taais.biz.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.biz.domain.ToInfrared;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 可见光转红外视图对象 to_infrared
+ *
+ * @author 0
+ * @date 2024-09-20
+ */
+@Data
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = ToInfrared.class)
+public class ToInfraredVo extends BaseEntity implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @ExcelProperty(value = "ID")
+    private Long id;
+
+    /**
+     * 任务名称
+     */
+    @ExcelProperty(value = "任务名称")
+    private String name;
+
+    /**
+     * 状态
+     * 0:未开始
+     * 1:进行中
+     * 2:完成
+     * 3:失败
+     * 4:中断
+     */
+    @ExcelProperty(value = "状态 ")
+    private String status;
+
+    /**
+     * 开始时间
+     */
+    @ExcelProperty(value = "开始时间")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @ExcelProperty(value = "结束时间")
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    @ExcelProperty(value = "耗时")
+    private Long costSecond;
+
+    /**
+     * 日志
+     */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${column.columnComment}")
+    private Integer delFlag;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private String url;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private Long inputOssId;
+
+    /**
+     * 输入路径
+     */
+    @ExcelProperty(value = "输入路径")
+    private String inputPath;
+
+    /**
+     * 输出路径
+     */
+    @ExcelProperty(value = "输出路径")
+    private String outputPath;
+
+    private Long algorithmModelId;
+    private String type;
+    private String subsystem;
+    private String algorithmName;
+    private String modelName;
+}

+ 89 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/TrackSequenceImportVo.java

@@ -0,0 +1,89 @@
+package com.taais.biz.domain.vo;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.NoArgsConstructor;
+
+/**
+ * 注视轨迹序列导入视图对象 track_sequence
+ *
+ * @author wangkang
+ * @date 2024-09-22
+ */
+
+@Data
+@NoArgsConstructor
+public class TrackSequenceImportVo implements Serializable
+{
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+
+     /** 任务名称 */
+    @ExcelProperty(value = "任务名称")
+    private String name;
+
+     /** 状态
+0:未开始
+1:进行中
+2:完成
+3:失败
+4:中断 */
+    @ExcelProperty(value = "状态")
+    private String status;
+
+     /** 开始时间 */
+    @ExcelProperty(value = "开始时间")
+    private Date startTime;
+
+     /** 结束时间 */
+    @ExcelProperty(value = "结束时间")
+    private Date endTime;
+
+     /** 耗时 */
+    @ExcelProperty(value = "耗时")
+    private Long costSecond;
+
+     /** 日志 */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+     /** 备注 */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+     /** $column.columnComment */
+    @ExcelProperty(value = "${column.columnComment}")
+    private Integer delFlag;
+
+     /** $column.columnComment */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private String url;
+
+     /** $column.columnComment */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private Long inputOssId;
+
+     /** 输入路径 */
+    @ExcelProperty(value = "输入路径")
+    private String inputPath;
+
+     /** 输出路径 */
+    @ExcelProperty(value = "输出路径")
+    private String outputPath;
+
+     /** zip文件输出路径 */
+    @ExcelProperty(value = "zip文件输出路径")
+    private String zipFilePath;
+
+    private Long algorithmModelId;
+}

+ 131 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/TrackSequenceVo.java

@@ -0,0 +1,131 @@
+package com.taais.biz.domain.vo;
+
+import java.util.Date;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.taais.biz.domain.TrackSequence;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+import com.taais.common.orm.core.domain.BaseEntity;
+
+/**
+ * 注视轨迹序列视图对象 track_sequence
+ *
+ * @author wangkang
+ * @date 2024-09-22
+ */
+@Data
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = TrackSequence.class)
+public class TrackSequenceVo extends BaseEntity implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @ExcelProperty(value = "ID")
+    private Long id;
+
+    /**
+     * 任务名称
+     */
+    @ExcelProperty(value = "任务名称")
+    private String name;
+
+    /**
+     * 状态
+     * 0:未开始
+     * 1:进行中
+     * 2:完成
+     * 3:失败
+     * 4:中断
+     */
+    @ExcelProperty(value = "状态")
+    private String status;
+
+    /**
+     * 开始时间
+     */
+    @ExcelProperty(value = "开始时间")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @ExcelProperty(value = "结束时间")
+    private Date endTime;
+
+    /**
+     * 耗时
+     */
+    @ExcelProperty(value = "耗时")
+    private Long costSecond;
+
+    /**
+     * 日志
+     */
+    @ExcelProperty(value = "日志")
+    private String log;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${column.columnComment}")
+    private Integer delFlag;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private String url;
+
+    /**
+     * $column.columnComment
+     */
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    private Long inputOssId;
+
+    /**
+     * 输入路径
+     */
+    @ExcelProperty(value = "输入路径")
+    private String inputPath;
+
+    /**
+     * 输出路径
+     */
+    @ExcelProperty(value = "输出路径")
+    private String outputPath;
+
+    /**
+     * zip文件输出路径
+     */
+    @ExcelProperty(value = "zip文件输出路径")
+    private String zipFilePath;
+
+    private Long algorithmModelId;
+
+    private String type;
+    private String subsystem;
+    private String algorithmName;
+    private String modelName;
+}

+ 119 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/listener/AlgorithmConfigTrackImportListener.java

@@ -0,0 +1,119 @@
+package com.taais.biz.listener;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.taais.common.core.exception.ServiceException;
+import com.taais.common.core.utils.SpringUtils;
+import com.taais.common.core.utils.ValidatorUtils;
+import com.taais.common.excel.core.ExcelListener;
+import com.taais.common.excel.core.ExcelResult;
+import com.taais.biz.domain.bo.AlgorithmConfigTrackBo;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackImportVo;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
+import com.taais.biz.service.IAlgorithmConfigTrackService;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+
+/**
+ * 算法配置自定义导入
+ *
+ * @author wangkang
+ */
+@Slf4j
+public class AlgorithmConfigTrackImportListener extends AnalysisEventListener<AlgorithmConfigTrackImportVo> implements ExcelListener<AlgorithmConfigTrackImportVo> {
+    private final IAlgorithmConfigTrackService algorithmConfigTrackService;
+
+    private final Boolean isUpdateSupport;
+    private int successNum = 0;
+    private int failureNum = 0;
+    private final StringBuilder successMsg = new StringBuilder();
+    private final StringBuilder failureMsg = new StringBuilder();
+
+    public AlgorithmConfigTrackImportListener(Boolean isUpdateSupport) {
+        this.algorithmConfigTrackService = SpringUtils.getBean(IAlgorithmConfigTrackService.class);
+        this.isUpdateSupport = isUpdateSupport;
+    }
+
+    @Override
+    public void invoke(AlgorithmConfigTrackImportVo algorithmConfigTrackVo, AnalysisContext context) {
+        try {
+
+            AlgorithmConfigTrackBo algorithmConfigTrackBo = BeanUtil.toBean(algorithmConfigTrackVo, AlgorithmConfigTrackBo.class);
+
+            //TODO:根据某个字段,查询数据库表中是否存在记录,不存在就新增,存在就更新
+            AlgorithmConfigTrackVo algorithmConfigTrackVo1 = null;
+
+            //algorithmConfigTrackVo1 = algorithmConfigTrackService.selectBySomefield(algorithmConfigTrackVo.getSomefield());
+            if (ObjectUtil.isNull(algorithmConfigTrackVo1)) {
+                //不存在就新增
+                algorithmConfigTrackBo.setVersion(0);
+                ValidatorUtils.validate(algorithmConfigTrackBo);
+                boolean inserted = algorithmConfigTrackService.insert(algorithmConfigTrackBo);
+
+                if (inserted) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、算法配置 记录导入成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、算法配置 记录导入失败");
+                    return;
+                }
+            } else if (isUpdateSupport) {
+                //存在就更新
+                algorithmConfigTrackBo.setId(algorithmConfigTrackVo1.getId());//主键
+                algorithmConfigTrackBo.setVersion(algorithmConfigTrackVo1.getVersion());
+                boolean updated = algorithmConfigTrackService.update(algorithmConfigTrackBo);
+                if (updated) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、算法配置 记录更新成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、算法配置 记录更新失败");
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            failureNum++;
+            String msg = "<br/>" + failureNum + "、算法配置 记录导入失败:";
+            failureMsg.append(msg).append(e.getMessage());
+            log.error(msg, e);
+        }
+    }
+
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+
+    }
+
+    @Override
+    public ExcelResult<AlgorithmConfigTrackImportVo> getExcelResult() {
+        return new ExcelResult<>() {
+
+            @Override
+            public String getAnalysis() {
+                if (failureNum > 0) {
+                    failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据没有成功导入,错误如下:");
+                    throw new ServiceException(failureMsg.toString());
+                } else {
+                    successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+                }
+                return successMsg.toString();
+            }
+
+            @Override
+            public List<AlgorithmConfigTrackImportVo> getList() {
+                return null;
+            }
+
+            @Override
+            public List<String> getErrorList() {
+                return null;
+            }
+        };
+    }
+}

+ 120 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/listener/AlgorithmModelTrackImportListener.java

@@ -0,0 +1,120 @@
+package com.taais.biz.listener;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.core.exception.ServiceException;
+import com.taais.common.core.utils.SpringUtils;
+import com.taais.common.core.utils.ValidatorUtils;
+import com.taais.common.excel.core.ExcelListener;
+import com.taais.common.excel.core.ExcelResult;
+import com.taais.biz.domain.bo.AlgorithmModelTrackBo;
+import com.taais.biz.domain.vo.AlgorithmModelTrackImportVo;
+import com.taais.biz.domain.vo.AlgorithmModelTrackVo;
+import com.taais.biz.service.IAlgorithmModelTrackService;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+
+/**
+ * 算法模型配置自定义导入
+ *
+ * @author wangkang
+ */
+@Slf4j
+public class AlgorithmModelTrackImportListener extends AnalysisEventListener<AlgorithmModelTrackImportVo> implements ExcelListener<AlgorithmModelTrackImportVo> {
+    private final IAlgorithmModelTrackService algorithmModelTrackService;
+
+    private final Boolean isUpdateSupport;
+    private int successNum = 0;
+    private int failureNum = 0;
+    private final StringBuilder successMsg = new StringBuilder();
+    private final StringBuilder failureMsg = new StringBuilder();
+
+    public AlgorithmModelTrackImportListener(Boolean isUpdateSupport) {
+        this.algorithmModelTrackService = SpringUtils.getBean(IAlgorithmModelTrackService.class);
+        this.isUpdateSupport = isUpdateSupport;
+    }
+
+    @Override
+    public void invoke(AlgorithmModelTrackImportVo algorithmModelTrackVo, AnalysisContext context) {
+        try {
+
+            AlgorithmModelTrackBo algorithmModelTrackBo = BeanUtil.toBean(algorithmModelTrackVo, AlgorithmModelTrackBo.class);
+
+            //TODO:根据某个字段,查询数据库表中是否存在记录,不存在就新增,存在就更新
+            AlgorithmModelTrackVo algorithmModelTrackVo1 = null;
+
+            //algorithmModelTrackVo1 = algorithmModelTrackService.selectBySomefield(algorithmModelTrackVo.getSomefield());
+            if (ObjectUtil.isNull(algorithmModelTrackVo1)) {
+                //不存在就新增
+                algorithmModelTrackBo.setVersion(0);
+                ValidatorUtils.validate(algorithmModelTrackBo);
+                CommonResult<String> result = algorithmModelTrackService.insert(algorithmModelTrackBo);
+
+                if (result.getCode() == CommonResult.SUCCESS) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、算法模型配置 记录导入成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、算法模型配置 记录导入失败");
+                    return;
+                }
+            } else if (isUpdateSupport) {
+                //存在就更新
+                algorithmModelTrackBo.setId(algorithmModelTrackVo1.getId());//主键
+                algorithmModelTrackBo.setVersion(algorithmModelTrackVo1.getVersion());
+                boolean updated = algorithmModelTrackService.update(algorithmModelTrackBo);
+                if (updated) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、算法模型配置 记录更新成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、算法模型配置 记录更新失败");
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            failureNum++;
+            String msg = "<br/>" + failureNum + "、算法模型配置 记录导入失败:";
+            failureMsg.append(msg).append(e.getMessage());
+            log.error(msg, e);
+        }
+    }
+
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+
+    }
+
+    @Override
+    public ExcelResult<AlgorithmModelTrackImportVo> getExcelResult() {
+        return new ExcelResult<>() {
+
+            @Override
+            public String getAnalysis() {
+                if (failureNum > 0) {
+                    failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据没有成功导入,错误如下:");
+                    throw new ServiceException(failureMsg.toString());
+                } else {
+                    successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+                }
+                return successMsg.toString();
+            }
+
+            @Override
+            public List<AlgorithmModelTrackImportVo> getList() {
+                return null;
+            }
+
+            @Override
+            public List<String> getErrorList() {
+                return null;
+            }
+        };
+    }
+}

+ 119 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/listener/DataSeqImportListener.java

@@ -0,0 +1,119 @@
+package com.taais.biz.listener;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.taais.common.core.exception.ServiceException;
+import com.taais.common.core.utils.SpringUtils;
+import com.taais.common.core.utils.ValidatorUtils;
+import com.taais.common.excel.core.ExcelListener;
+import com.taais.common.excel.core.ExcelResult;
+import com.taais.biz.domain.bo.DataSeqBo;
+import com.taais.biz.domain.vo.DataSeqImportVo;
+import com.taais.biz.domain.vo.DataSeqVo;
+import com.taais.biz.service.IDataSeqService;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+
+/**
+ * 数据管理自定义导入
+ *
+ * @author wangkang
+ */
+@Slf4j
+public class DataSeqImportListener extends AnalysisEventListener<DataSeqImportVo> implements ExcelListener<DataSeqImportVo> {
+    private final IDataSeqService dataSeqService;
+
+    private final Boolean isUpdateSupport;
+    private int successNum = 0;
+    private int failureNum = 0;
+    private final StringBuilder successMsg = new StringBuilder();
+    private final StringBuilder failureMsg = new StringBuilder();
+
+    public DataSeqImportListener(Boolean isUpdateSupport) {
+        this.dataSeqService = SpringUtils.getBean(IDataSeqService.class);
+        this.isUpdateSupport = isUpdateSupport;
+    }
+
+    @Override
+    public void invoke(DataSeqImportVo dataSeqVo, AnalysisContext context) {
+        try {
+
+            DataSeqBo dataSeqBo = BeanUtil.toBean(dataSeqVo, DataSeqBo.class);
+
+            //TODO:根据某个字段,查询数据库表中是否存在记录,不存在就新增,存在就更新
+            DataSeqVo dataSeqVo1 = null;
+
+            //dataSeqVo1 = dataSeqService.selectBySomefield(dataSeqVo.getSomefield());
+            if (ObjectUtil.isNull(dataSeqVo1)) {
+                //不存在就新增
+                dataSeqBo.setVersion(0);
+                ValidatorUtils.validate(dataSeqBo);
+                boolean inserted = dataSeqService.insert(dataSeqBo);
+
+                if (inserted) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、数据管理 记录导入成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、数据管理 记录导入失败");
+                    return;
+                }
+            } else if (isUpdateSupport) {
+                //存在就更新
+                dataSeqBo.setId(dataSeqVo1.getId());//主键
+                dataSeqBo.setVersion(dataSeqVo1.getVersion());
+                boolean updated = dataSeqService.update(dataSeqBo);
+                if (updated) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、数据管理 记录更新成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、数据管理 记录更新失败");
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            failureNum++;
+            String msg = "<br/>" + failureNum + "、数据管理 记录导入失败:";
+            failureMsg.append(msg).append(e.getMessage());
+            log.error(msg, e);
+        }
+    }
+
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+
+    }
+
+    @Override
+    public ExcelResult<DataSeqImportVo> getExcelResult() {
+        return new ExcelResult<>() {
+
+            @Override
+            public String getAnalysis() {
+                if (failureNum > 0) {
+                    failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据没有成功导入,错误如下:");
+                    throw new ServiceException(failureMsg.toString());
+                } else {
+                    successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+                }
+                return successMsg.toString();
+            }
+
+            @Override
+            public List<DataSeqImportVo> getList() {
+                return null;
+            }
+
+            @Override
+            public List<String> getErrorList() {
+                return null;
+            }
+        };
+    }
+}

+ 119 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/listener/TargetDetectionImportListener.java

@@ -0,0 +1,119 @@
+package com.taais.biz.listener;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.taais.common.core.exception.ServiceException;
+import com.taais.common.core.utils.SpringUtils;
+import com.taais.common.core.utils.ValidatorUtils;
+import com.taais.common.excel.core.ExcelListener;
+import com.taais.common.excel.core.ExcelResult;
+import com.taais.biz.domain.bo.TargetDetectionBo;
+import com.taais.biz.domain.vo.TargetDetectionImportVo;
+import com.taais.biz.domain.vo.TargetDetectionVo;
+import com.taais.biz.service.ITargetDetectionService;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+
+/**
+ * 目标检测自定义导入
+ *
+ * @author wangkang
+ */
+@Slf4j
+public class TargetDetectionImportListener extends AnalysisEventListener<TargetDetectionImportVo> implements ExcelListener<TargetDetectionImportVo> {
+    private final ITargetDetectionService targetDetectionService;
+
+    private final Boolean isUpdateSupport;
+    private int successNum = 0;
+    private int failureNum = 0;
+    private final StringBuilder successMsg = new StringBuilder();
+    private final StringBuilder failureMsg = new StringBuilder();
+
+    public TargetDetectionImportListener(Boolean isUpdateSupport) {
+        this.targetDetectionService = SpringUtils.getBean(ITargetDetectionService.class);
+        this.isUpdateSupport = isUpdateSupport;
+    }
+
+    @Override
+    public void invoke(TargetDetectionImportVo targetDetectionVo, AnalysisContext context) {
+        try {
+
+            TargetDetectionBo targetDetectionBo = BeanUtil.toBean(targetDetectionVo, TargetDetectionBo.class);
+
+            //TODO:根据某个字段,查询数据库表中是否存在记录,不存在就新增,存在就更新
+            TargetDetectionVo targetDetectionVo1 = null;
+
+            //targetDetectionVo1 = targetDetectionService.selectBySomefield(targetDetectionVo.getSomefield());
+            if (ObjectUtil.isNull(targetDetectionVo1)) {
+                //不存在就新增
+                targetDetectionBo.setVersion(0);
+                ValidatorUtils.validate(targetDetectionBo);
+                boolean inserted = targetDetectionService.insert(targetDetectionBo);
+
+                if (inserted) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、目标检测 记录导入成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、目标检测 记录导入失败");
+                    return;
+                }
+            } else if (isUpdateSupport) {
+                //存在就更新
+                targetDetectionBo.setId(targetDetectionVo1.getId());//主键
+                targetDetectionBo.setVersion(targetDetectionVo1.getVersion());
+                boolean updated = targetDetectionService.update(targetDetectionBo);
+                if (updated) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、目标检测 记录更新成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、目标检测 记录更新失败");
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            failureNum++;
+            String msg = "<br/>" + failureNum + "、目标检测 记录导入失败:";
+            failureMsg.append(msg).append(e.getMessage());
+            log.error(msg, e);
+        }
+    }
+
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+
+    }
+
+    @Override
+    public ExcelResult<TargetDetectionImportVo> getExcelResult() {
+        return new ExcelResult<>() {
+
+            @Override
+            public String getAnalysis() {
+                if (failureNum > 0) {
+                    failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据没有成功导入,错误如下:");
+                    throw new ServiceException(failureMsg.toString());
+                } else {
+                    successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+                }
+                return successMsg.toString();
+            }
+
+            @Override
+            public List<TargetDetectionImportVo> getList() {
+                return null;
+            }
+
+            @Override
+            public List<String> getErrorList() {
+                return null;
+            }
+        };
+    }
+}

+ 119 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/listener/ToInfraredImportListener.java

@@ -0,0 +1,119 @@
+package com.taais.biz.listener;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.taais.biz.domain.bo.ToInfraredBo;
+import com.taais.biz.domain.vo.ToInfraredImportVo;
+import com.taais.biz.domain.vo.ToInfraredVo;
+import com.taais.biz.service.IToInfraredService;
+import com.taais.common.core.exception.ServiceException;
+import com.taais.common.core.utils.SpringUtils;
+import com.taais.common.core.utils.ValidatorUtils;
+import com.taais.common.excel.core.ExcelListener;
+import com.taais.common.excel.core.ExcelResult;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+
+/**
+ * 可见光转红外自定义导入
+ *
+ * @author 0
+ */
+@Slf4j
+public class ToInfraredImportListener extends AnalysisEventListener<ToInfraredImportVo> implements ExcelListener<ToInfraredImportVo> {
+    private final IToInfraredService toInfraredService;
+
+    private final Boolean isUpdateSupport;
+    private int successNum = 0;
+    private int failureNum = 0;
+    private final StringBuilder successMsg = new StringBuilder();
+    private final StringBuilder failureMsg = new StringBuilder();
+
+    public ToInfraredImportListener(Boolean isUpdateSupport) {
+        this.toInfraredService = SpringUtils.getBean(IToInfraredService.class);
+        this.isUpdateSupport = isUpdateSupport;
+    }
+
+    @Override
+    public void invoke(ToInfraredImportVo toInfraredVo, AnalysisContext context) {
+        try {
+
+            ToInfraredBo toInfraredBo = BeanUtil.toBean(toInfraredVo, ToInfraredBo.class);
+
+            //TODO:根据某个字段,查询数据库表中是否存在记录,不存在就新增,存在就更新
+            ToInfraredVo toInfraredVo1 = null;
+
+            //toInfraredVo1 = toInfraredService.selectBySomefield(toInfraredVo.getSomefield());
+            if (ObjectUtil.isNull(toInfraredVo1)) {
+                //不存在就新增
+                toInfraredBo.setVersion(0);
+                ValidatorUtils.validate(toInfraredBo);
+                boolean inserted = toInfraredService.insert(toInfraredBo);
+
+                if (inserted) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、可见光转红外 记录导入成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、可见光转红外 记录导入失败");
+                    return;
+                }
+            } else if (isUpdateSupport) {
+                //存在就更新
+                toInfraredBo.setId(toInfraredVo1.getId());//主键
+                toInfraredBo.setVersion(toInfraredVo1.getVersion());
+                boolean updated = toInfraredService.update(toInfraredBo);
+                if (updated) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、可见光转红外 记录更新成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、可见光转红外 记录更新失败");
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            failureNum++;
+            String msg = "<br/>" + failureNum + "、可见光转红外 记录导入失败:";
+            failureMsg.append(msg).append(e.getMessage());
+            log.error(msg, e);
+        }
+    }
+
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+
+    }
+
+    @Override
+    public ExcelResult<ToInfraredImportVo> getExcelResult() {
+        return new ExcelResult<>() {
+
+            @Override
+            public String getAnalysis() {
+                if (failureNum > 0) {
+                    failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据没有成功导入,错误如下:");
+                    throw new ServiceException(failureMsg.toString());
+                } else {
+                    successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+                }
+                return successMsg.toString();
+            }
+
+            @Override
+            public List<ToInfraredImportVo> getList() {
+                return null;
+            }
+
+            @Override
+            public List<String> getErrorList() {
+                return null;
+            }
+        };
+    }
+}

+ 119 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/listener/TrackSequenceImportListener.java

@@ -0,0 +1,119 @@
+package com.taais.biz.listener;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.taais.common.core.exception.ServiceException;
+import com.taais.common.core.utils.SpringUtils;
+import com.taais.common.core.utils.ValidatorUtils;
+import com.taais.common.excel.core.ExcelListener;
+import com.taais.common.excel.core.ExcelResult;
+import com.taais.biz.domain.bo.TrackSequenceBo;
+import com.taais.biz.domain.vo.TrackSequenceImportVo;
+import com.taais.biz.domain.vo.TrackSequenceVo;
+import com.taais.biz.service.ITrackSequenceService;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+
+/**
+ * 注视轨迹序列自定义导入
+ *
+ * @author wangkang
+ */
+@Slf4j
+public class TrackSequenceImportListener extends AnalysisEventListener<TrackSequenceImportVo> implements ExcelListener<TrackSequenceImportVo> {
+    private final ITrackSequenceService trackSequenceService;
+
+    private final Boolean isUpdateSupport;
+    private int successNum = 0;
+    private int failureNum = 0;
+    private final StringBuilder successMsg = new StringBuilder();
+    private final StringBuilder failureMsg = new StringBuilder();
+
+    public TrackSequenceImportListener(Boolean isUpdateSupport) {
+        this.trackSequenceService = SpringUtils.getBean(ITrackSequenceService.class);
+        this.isUpdateSupport = isUpdateSupport;
+    }
+
+    @Override
+    public void invoke(TrackSequenceImportVo trackSequenceVo, AnalysisContext context) {
+        try {
+
+            TrackSequenceBo trackSequenceBo = BeanUtil.toBean(trackSequenceVo, TrackSequenceBo.class);
+
+            //TODO:根据某个字段,查询数据库表中是否存在记录,不存在就新增,存在就更新
+            TrackSequenceVo trackSequenceVo1 = null;
+
+            //trackSequenceVo1 = trackSequenceService.selectBySomefield(trackSequenceVo.getSomefield());
+            if (ObjectUtil.isNull(trackSequenceVo1)) {
+                //不存在就新增
+                trackSequenceBo.setVersion(0);
+                ValidatorUtils.validate(trackSequenceBo);
+                boolean inserted = trackSequenceService.insert(trackSequenceBo);
+
+                if (inserted) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、注视轨迹序列 记录导入成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、注视轨迹序列 记录导入失败");
+                    return;
+                }
+            } else if (isUpdateSupport) {
+                //存在就更新
+                trackSequenceBo.setId(trackSequenceVo1.getId());//主键
+                trackSequenceBo.setVersion(trackSequenceVo1.getVersion());
+                boolean updated = trackSequenceService.update(trackSequenceBo);
+                if (updated) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、注视轨迹序列 记录更新成功");
+                    return;
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、注视轨迹序列 记录更新失败");
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            failureNum++;
+            String msg = "<br/>" + failureNum + "、注视轨迹序列 记录导入失败:";
+            failureMsg.append(msg).append(e.getMessage());
+            log.error(msg, e);
+        }
+    }
+
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+
+    }
+
+    @Override
+    public ExcelResult<TrackSequenceImportVo> getExcelResult() {
+        return new ExcelResult<>() {
+
+            @Override
+            public String getAnalysis() {
+                if (failureNum > 0) {
+                    failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据没有成功导入,错误如下:");
+                    throw new ServiceException(failureMsg.toString());
+                } else {
+                    successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+                }
+                return successMsg.toString();
+            }
+
+            @Override
+            public List<TrackSequenceImportVo> getList() {
+                return null;
+            }
+
+            @Override
+            public List<String> getErrorList() {
+                return null;
+            }
+        };
+    }
+}

+ 16 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/AlgorithmConfigTrackMapper.java

@@ -0,0 +1,16 @@
+package com.taais.biz.mapper;
+
+import com.mybatisflex.core.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.taais.biz.domain.AlgorithmConfigTrack;
+
+/**
+ * 算法配置Mapper接口
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+@Mapper
+public interface AlgorithmConfigTrackMapper extends BaseMapper<AlgorithmConfigTrack> {
+
+}

+ 16 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/AlgorithmModelTrackMapper.java

@@ -0,0 +1,16 @@
+package com.taais.biz.mapper;
+
+import com.mybatisflex.core.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.taais.biz.domain.AlgorithmModelTrack;
+
+/**
+ * 算法模型配置Mapper接口
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+@Mapper
+public interface AlgorithmModelTrackMapper extends BaseMapper<AlgorithmModelTrack> {
+
+}

+ 9 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/DataAmplificationTaskMapper.java

@@ -0,0 +1,9 @@
+package com.taais.biz.mapper;
+
+import com.mybatisflex.core.BaseMapper;
+import com.taais.biz.domain.DataAmplificationTask;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface DataAmplificationTaskMapper extends BaseMapper<DataAmplificationTask> {
+}

+ 16 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/DataSeqMapper.java

@@ -0,0 +1,16 @@
+package com.taais.biz.mapper;
+
+import com.mybatisflex.core.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.taais.biz.domain.DataSeq;
+
+/**
+ * 数据管理Mapper接口
+ *
+ * @author wangkang
+ * 2024-10-08
+ */
+@Mapper
+public interface DataSeqMapper extends BaseMapper<DataSeq> {
+
+}

+ 16 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/TargetDetectionMapper.java

@@ -0,0 +1,16 @@
+package com.taais.biz.mapper;
+
+import com.mybatisflex.core.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.taais.biz.domain.TargetDetection;
+
+/**
+ * 目标检测Mapper接口
+ *
+ * @author wangkang
+ * 2024-09-29
+ */
+@Mapper
+public interface TargetDetectionMapper extends BaseMapper<TargetDetection> {
+
+}

+ 15 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/ToInfraredMapper.java

@@ -0,0 +1,15 @@
+package com.taais.biz.mapper;
+import com.mybatisflex.core.BaseMapper;
+import com.taais.biz.domain.ToInfrared;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 可见光转红外Mapper接口
+ *
+ * @author 0
+ * 2024-09-20
+ */
+@Mapper
+public interface ToInfraredMapper extends BaseMapper<ToInfrared> {
+
+}

+ 16 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/TrackSequenceMapper.java

@@ -0,0 +1,16 @@
+package com.taais.biz.mapper;
+
+import com.mybatisflex.core.BaseMapper;
+import com.taais.biz.domain.TrackSequence;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 注视轨迹序列Mapper接口
+ *
+ * @author wangkang
+ * 2024-09-22
+ */
+@Mapper
+public interface TrackSequenceMapper extends BaseMapper<TrackSequence> {
+
+}

+ 67 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/IAlgorithmConfigTrackService.java

@@ -0,0 +1,67 @@
+package com.taais.biz.service;
+
+import java.util.List;
+
+import com.taais.biz.domain.AlgorithmConfigTrack;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
+import com.taais.biz.domain.bo.AlgorithmConfigTrackBo;
+import com.taais.common.orm.core.service.IBaseService;
+import com.taais.common.core.core.page.PageResult;
+
+/**
+ * 算法配置Service接口
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+public interface IAlgorithmConfigTrackService extends IBaseService<AlgorithmConfigTrack> {
+    /**
+     * 查询算法配置
+     *
+     * @param id 算法配置主键
+     * @return 算法配置
+     */
+        AlgorithmConfigTrackVo selectById(Long id);
+
+    /**
+     * 查询算法配置列表
+     *
+     * @param algorithmConfigTrackBo 算法配置Bo
+     * @return 算法配置集合
+     */
+    List<AlgorithmConfigTrackVo> selectList(AlgorithmConfigTrackBo algorithmConfigTrackBo);
+
+    /**
+     * 分页查询算法配置列表
+     *
+     * @param algorithmConfigTrackBo 算法配置Bo
+     * @return 分页算法配置集合
+     */
+    PageResult<AlgorithmConfigTrackVo> selectPage(AlgorithmConfigTrackBo algorithmConfigTrackBo);
+
+    /**
+     * 新增算法配置
+     *
+     * @param algorithmConfigTrackBo 算法配置Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    boolean insert(AlgorithmConfigTrackBo algorithmConfigTrackBo);
+
+    /**
+     * 修改算法配置
+     *
+     * @param algorithmConfigTrackBo 算法配置Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    boolean update(AlgorithmConfigTrackBo algorithmConfigTrackBo);
+
+    /**
+     * 批量删除算法配置
+     *
+     * @param ids 需要删除的算法配置主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    boolean deleteByIds(Long[] ids);
+
+    List<Object> getEnums();
+}

+ 68 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/IAlgorithmModelTrackService.java

@@ -0,0 +1,68 @@
+package com.taais.biz.service;
+
+import java.util.List;
+
+import com.taais.biz.domain.AlgorithmModelTrack;
+import com.taais.biz.domain.vo.AlgorithmModelTrackVo;
+import com.taais.biz.domain.bo.AlgorithmModelTrackBo;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.orm.core.service.IBaseService;
+import com.taais.common.core.core.page.PageResult;
+
+/**
+ * 算法模型配置Service接口
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+public interface IAlgorithmModelTrackService extends IBaseService<AlgorithmModelTrack> {
+    /**
+     * 查询算法模型配置
+     *
+     * @param id 算法模型配置主键
+     * @return 算法模型配置
+     */
+        AlgorithmModelTrackVo selectById(Long id);
+
+    /**
+     * 查询算法模型配置列表
+     *
+     * @param algorithmModelTrackBo 算法模型配置Bo
+     * @return 算法模型配置集合
+     */
+    List<AlgorithmModelTrackVo> selectList(AlgorithmModelTrackBo algorithmModelTrackBo);
+
+    /**
+     * 分页查询算法模型配置列表
+     *
+     * @param algorithmModelTrackBo 算法模型配置Bo
+     * @return 分页算法模型配置集合
+     */
+    PageResult<AlgorithmModelTrackVo> selectPage(AlgorithmModelTrackBo algorithmModelTrackBo);
+
+    /**
+     * 新增算法模型配置
+     *
+     * @param algorithmModelTrackBo 算法模型配置Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    CommonResult<String> insert(AlgorithmModelTrackBo algorithmModelTrackBo);
+
+    /**
+     * 修改算法模型配置
+     *
+     * @param algorithmModelTrackBo 算法模型配置Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    boolean update(AlgorithmModelTrackBo algorithmModelTrackBo);
+
+    /**
+     * 批量删除算法模型配置
+     *
+     * @param ids 需要删除的算法模型配置主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    boolean deleteByIds(Long[] ids);
+
+    List<Object> enums();
+}

+ 25 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/IDataAmplificationTaskService.java

@@ -0,0 +1,25 @@
+package com.taais.biz.service;
+
+import com.taais.biz.domain.DataAmplificationTask;
+import com.taais.biz.domain.bo.DataAmplificationTaskBo;
+import com.taais.biz.domain.vo.DataAmplificationTaskVo;
+import com.taais.common.core.core.page.PageResult;
+
+import java.util.List;
+
+public interface IDataAmplificationTaskService {
+
+    DataAmplificationTaskVo selectById(Long id);
+
+    List<DataAmplificationTaskVo> selectList(DataAmplificationTaskBo taskBo);
+
+    PageResult<DataAmplificationTaskVo> selectPage(DataAmplificationTaskBo taskBo);
+
+    boolean insert(DataAmplificationTaskBo taskBo);
+
+    DataAmplificationTask insertTask(DataAmplificationTaskBo taskBo);
+
+    boolean update(DataAmplificationTaskBo taskBo);
+
+    boolean deleteByIds(Long[] ids);
+}

+ 68 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/IDataSeqService.java

@@ -0,0 +1,68 @@
+package com.taais.biz.service;
+
+import java.util.List;
+
+import com.taais.biz.domain.DataSeq;
+import com.taais.biz.domain.vo.DataSeqVo;
+import com.taais.biz.domain.bo.DataSeqBo;
+import com.taais.common.orm.core.service.IBaseService;
+import com.taais.common.core.core.page.PageResult;
+
+/**
+ * 数据管理Service接口
+ *
+ * @author wangkang
+ * 2024-10-08
+ */
+public interface IDataSeqService extends IBaseService<DataSeq> {
+    /**
+     * 查询数据管理
+     *
+     * @param id 数据管理主键
+     * @return 数据管理
+     */
+        DataSeqVo selectById(Long id);
+
+    /**
+     * 查询数据管理列表
+     *
+     * @param dataSeqBo 数据管理Bo
+     * @return 数据管理集合
+     */
+    List<DataSeqVo> selectList(DataSeqBo dataSeqBo);
+
+    /**
+     * 分页查询数据管理列表
+     *
+     * @param dataSeqBo 数据管理Bo
+     * @return 分页数据管理集合
+     */
+    PageResult<DataSeqVo> selectPage(DataSeqBo dataSeqBo);
+
+    /**
+     * 新增数据管理
+     *
+     * @param dataSeqBo 数据管理Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    boolean insert(DataSeqBo dataSeqBo);
+
+    /**
+     * 修改数据管理
+     *
+     * @param dataSeqBo 数据管理Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    boolean update(DataSeqBo dataSeqBo);
+
+    /**
+     * 批量删除数据管理
+     *
+     * @param ids 需要删除的数据管理主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    boolean deleteByIds(Long[] ids);
+
+    List<String> getAllImages(Long inputOdssId);
+    List<String> getImages(Long inputOdssId, String subsystem, Boolean ifInput, String dir);
+}

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

@@ -103,4 +103,6 @@ public interface IDataService extends IBaseService<Data> {
      * @return {@link List }<{@link String }>
      */
     List<DataSelectVo>  getFormSelects(String field);
+
+    CommonResult<Boolean> amplifyForData(String id);
 }

+ 77 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/ITargetDetectionService.java

@@ -0,0 +1,77 @@
+package com.taais.biz.service;
+
+import java.util.List;
+
+import com.taais.biz.domain.TargetDetection;
+import com.taais.biz.domain.TaskTrackResultBo;
+import com.taais.biz.domain.vo.TargetDetectionVo;
+import com.taais.biz.domain.bo.TargetDetectionBo;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.orm.core.service.IBaseService;
+import com.taais.common.core.core.page.PageResult;
+import org.springframework.core.io.Resource;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 目标检测Service接口
+ *
+ * @author wangkang
+ * 2024-09-29
+ */
+public interface ITargetDetectionService extends IBaseService<TargetDetection> {
+    /**
+     * 查询目标检测
+     *
+     * @param id 目标检测主键
+     * @return 目标检测
+     */
+        TargetDetectionVo selectById(Long id);
+
+    /**
+     * 查询目标检测列表
+     *
+     * @param targetDetectionBo 目标检测Bo
+     * @return 目标检测集合
+     */
+    List<TargetDetectionVo> selectList(TargetDetectionBo targetDetectionBo);
+
+    /**
+     * 分页查询目标检测列表
+     *
+     * @param targetDetectionBo 目标检测Bo
+     * @return 分页目标检测集合
+     */
+    PageResult<TargetDetectionVo> selectPage(TargetDetectionBo targetDetectionBo);
+
+    /**
+     * 新增目标检测
+     *
+     * @param targetDetectionBo 目标检测Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    boolean insert(TargetDetectionBo targetDetectionBo);
+
+    /**
+     * 修改目标检测
+     *
+     * @param targetDetectionBo 目标检测Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    boolean update(TargetDetectionBo targetDetectionBo);
+
+    /**
+     * 批量删除目标检测
+     *
+     * @param ids 需要删除的目标检测主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    boolean deleteByIds(Long[] ids);
+
+    CommonResult start(Long id);
+
+    CommonResult stop(Long id);
+
+    CommonResult getResult(TaskTrackResultBo taskTrackResultBo);
+
+    ResponseEntity<Resource> zipImages(Long id);
+}

+ 78 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/IToInfraredService.java

@@ -0,0 +1,78 @@
+package com.taais.biz.service;
+
+
+import com.taais.biz.domain.TaskTrackResultBo;
+import com.taais.biz.domain.ToInfrared;
+import com.taais.biz.domain.bo.ToInfraredBo;
+import com.taais.biz.domain.vo.ToInfraredVo;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.orm.core.service.IBaseService;
+import org.springframework.core.io.Resource;
+import org.springframework.http.ResponseEntity;
+
+import java.util.List;
+
+/**
+ * 可见光转红外Service接口
+ *
+ * @author 0
+ * 2024-09-20
+ */
+public interface IToInfraredService extends IBaseService<ToInfrared> {
+    /**
+     * 查询可见光转红外
+     *
+     * @param id 可见光转红外主键
+     * @return 可见光转红外
+     */
+        ToInfraredVo selectById(Long id);
+
+    /**
+     * 查询可见光转红外列表
+     *
+     * @param toInfraredBo 可见光转红外Bo
+     * @return 可见光转红外集合
+     */
+    List<ToInfraredVo> selectList(ToInfraredBo toInfraredBo);
+
+    /**
+     * 分页查询可见光转红外列表
+     *
+     * @param toInfraredBo 可见光转红外Bo
+     * @return 分页可见光转红外集合
+     */
+    PageResult<ToInfraredVo> selectPage(ToInfraredBo toInfraredBo);
+
+    /**
+     * 新增可见光转红外
+     *
+     * @param toInfraredBo 可见光转红外Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    boolean insert(ToInfraredBo toInfraredBo);
+
+    /**
+     * 修改可见光转红外
+     *
+     * @param toInfraredBo 可见光转红外Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    boolean update(ToInfraredBo toInfraredBo);
+
+    /**
+     * 批量删除可见光转红外
+     *
+     * @param ids 需要删除的可见光转红外主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    boolean deleteByIds(Long[] ids);
+
+    CommonResult start(Long id);
+
+    CommonResult stop(Long id);
+
+    CommonResult getResult(TaskTrackResultBo toInfraredStartResultBo);
+
+    ResponseEntity<Resource> zipImages(Long id);
+}

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

@@ -0,0 +1,77 @@
+package com.taais.biz.service;
+
+import java.util.List;
+
+import com.taais.biz.domain.TaskTrackResultBo;
+import com.taais.biz.domain.TrackSequence;
+import com.taais.biz.domain.vo.TrackSequenceVo;
+import com.taais.biz.domain.bo.TrackSequenceBo;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.orm.core.service.IBaseService;
+import com.taais.common.core.core.page.PageResult;
+import org.springframework.core.io.Resource;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 注视轨迹序列Service接口
+ *
+ * @author wangkang
+ * 2024-09-22
+ */
+public interface ITrackSequenceService extends IBaseService<TrackSequence> {
+    /**
+     * 查询注视轨迹序列
+     *
+     * @param id 注视轨迹序列主键
+     * @return 注视轨迹序列
+     */
+        TrackSequenceVo selectById(Long id);
+
+    /**
+     * 查询注视轨迹序列列表
+     *
+     * @param trackSequenceBo 注视轨迹序列Bo
+     * @return 注视轨迹序列集合
+     */
+    List<TrackSequenceVo> selectList(TrackSequenceBo trackSequenceBo);
+
+    /**
+     * 分页查询注视轨迹序列列表
+     *
+     * @param trackSequenceBo 注视轨迹序列Bo
+     * @return 分页注视轨迹序列集合
+     */
+    PageResult<TrackSequenceVo> selectPage(TrackSequenceBo trackSequenceBo);
+
+    /**
+     * 新增注视轨迹序列
+     *
+     * @param trackSequenceBo 注视轨迹序列Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    boolean insert(TrackSequenceBo trackSequenceBo);
+
+    /**
+     * 修改注视轨迹序列
+     *
+     * @param trackSequenceBo 注视轨迹序列Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    boolean update(TrackSequenceBo trackSequenceBo);
+
+    /**
+     * 批量删除注视轨迹序列
+     *
+     * @param ids 需要删除的注视轨迹序列主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    boolean deleteByIds(Long[] ids);
+
+    CommonResult start(Long id);
+
+    CommonResult stop(Long id);
+
+    ResponseEntity<Resource> zipImages(Long id);
+
+    CommonResult getResult(TaskTrackResultBo taskTrackResultBo);
+}

+ 161 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/AlgorithmConfigTrackServiceImpl.java

@@ -0,0 +1,161 @@
+package com.taais.biz.service.impl;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.taais.common.core.utils.MapstructUtils;
+import com.taais.common.core.utils.StringUtils;
+import com.taais.common.orm.core.page.PageQuery;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.orm.core.service.impl.BaseServiceImpl;
+import jakarta.annotation.Resource;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import com.taais.biz.mapper.AlgorithmConfigTrackMapper;
+import com.taais.biz.domain.AlgorithmConfigTrack;
+import com.taais.biz.domain.bo.AlgorithmConfigTrackBo;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
+import com.taais.biz.service.IAlgorithmConfigTrackService;
+import static com.taais.biz.domain.table.AlgorithmConfigTrackTableDef.ALGORITHM_CONFIG_TRACK;
+
+/**
+ * 算法配置Service业务层处理
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+@Service
+public class AlgorithmConfigTrackServiceImpl extends BaseServiceImpl<AlgorithmConfigTrackMapper, AlgorithmConfigTrack> implements IAlgorithmConfigTrackService {
+    @Resource
+    private AlgorithmConfigTrackMapper algorithmConfigTrackMapper;
+
+    @Override
+    public QueryWrapper query() {
+        return super.query().from(ALGORITHM_CONFIG_TRACK);
+    }
+
+    private QueryWrapper buildQueryWrapper(AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+        QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(ALGORITHM_CONFIG_TRACK.TYPE.eq
+        (algorithmConfigTrackBo.getType()));
+        queryWrapper.and(ALGORITHM_CONFIG_TRACK.PARENT_ID.eq
+        (algorithmConfigTrackBo.getParentId()));
+        queryWrapper.and(ALGORITHM_CONFIG_TRACK.SUBSYSTEM.eq
+        (algorithmConfigTrackBo.getSubsystem()));
+        queryWrapper.and(ALGORITHM_CONFIG_TRACK.ALGORITHM_NAME.like
+        (algorithmConfigTrackBo.getAlgorithmName()));
+        queryWrapper.and(ALGORITHM_CONFIG_TRACK.ALGORITHM_ADDRESS.eq
+        (algorithmConfigTrackBo.getAlgorithmAddress()));
+        queryWrapper.and(ALGORITHM_CONFIG_TRACK.PARAMETER_CONFIG.eq
+        (algorithmConfigTrackBo.getParameterConfig()));
+        queryWrapper.and(ALGORITHM_CONFIG_TRACK.REMARKS.eq
+        (algorithmConfigTrackBo.getRemarks()));
+        queryWrapper.and(ALGORITHM_CONFIG_TRACK.SYSTEM.eq
+        (algorithmConfigTrackBo.getSystem()));
+
+        return queryWrapper;
+    }
+
+    /**
+     * 查询算法配置
+     *
+     * @param id 算法配置主键
+     * @return 算法配置
+     */
+    @Override
+    public AlgorithmConfigTrackVo selectById(Long id) {
+            return this.getOneAs(query().where(ALGORITHM_CONFIG_TRACK.ID.eq(id)), AlgorithmConfigTrackVo.class);
+
+    }
+
+    /**
+     * 查询算法配置列表
+     *
+     * @param algorithmConfigTrackBo 算法配置Bo
+     * @return 算法配置集合
+     */
+    @Override
+    public List<AlgorithmConfigTrackVo> selectList(AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(algorithmConfigTrackBo);
+            return this.listAs(queryWrapper, AlgorithmConfigTrackVo.class);
+    }
+
+    /**
+     * 分页查询算法配置列表
+     *
+     * @param algorithmConfigTrackBo 算法配置Bo
+     * @return 分页算法配置集合
+     */
+    @Override
+    public PageResult<AlgorithmConfigTrackVo> selectPage(AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(algorithmConfigTrackBo);
+            Page<AlgorithmConfigTrackVo> page = this.pageAs(PageQuery.build(), queryWrapper, AlgorithmConfigTrackVo.class);
+        return PageResult.build(page);
+    }
+
+    /**
+     * 新增算法配置
+     *
+     * @param algorithmConfigTrackBo 算法配置Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    @Override
+    public boolean insert(AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+    AlgorithmConfigTrack algorithmConfigTrack =MapstructUtils.convert(algorithmConfigTrackBo, AlgorithmConfigTrack. class);
+
+        return this.save(algorithmConfigTrack);//使用全局配置的雪花算法主键生成器生成ID值
+    }
+
+    /**
+     * 修改算法配置
+     *
+     * @param algorithmConfigTrackBo 算法配置Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    @Override
+    public boolean update(AlgorithmConfigTrackBo algorithmConfigTrackBo) {
+        AlgorithmConfigTrack algorithmConfigTrack =MapstructUtils.convert(algorithmConfigTrackBo, AlgorithmConfigTrack. class);
+        if (ObjectUtil.isNotNull(algorithmConfigTrack) && ObjectUtil.isNotNull(algorithmConfigTrack.getId())){
+            boolean updated = this.updateById(algorithmConfigTrack);
+                return updated;
+        }
+        return false;
+    }
+
+    /**
+     * 批量删除算法配置
+     *
+     * @param ids 需要删除的算法配置主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    @Transactional
+    @Override
+    public boolean deleteByIds(Long[] ids) {
+        return this.removeByIds(Arrays.asList(ids));
+    }
+
+    @Override
+    public List<Object> getEnums() {
+        algorithmConfigTrackMapper.selectAll();
+
+        List<Object> result = new ArrayList<>();
+
+        for (AlgorithmConfigTrack algorithmConfigTrack : algorithmConfigTrackMapper.selectAll()) {
+            HashMap<String, Object> map = new HashMap<>();
+            map.put("label",algorithmConfigTrack.getAlgorithmName());
+            map.put("value",algorithmConfigTrack.getId());
+            map.put("type", algorithmConfigTrack.getType());
+            map.put("subsystem", algorithmConfigTrack.getSubsystem());
+
+            result.add(map);
+        }
+
+        return result;
+    }
+
+}

+ 256 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/AlgorithmModelTrackServiceImpl.java

@@ -0,0 +1,256 @@
+package com.taais.biz.service.impl;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.taais.biz.constant.BizConstant;
+import com.taais.biz.domain.AlgorithmConfigTrack;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
+import com.taais.biz.mapper.AlgorithmConfigTrackMapper;
+import com.taais.common.core.config.TaaisConfig;
+import com.taais.common.core.constant.Constants;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.core.utils.DateUtils;
+import com.taais.common.core.utils.MapstructUtils;
+import com.taais.common.core.utils.StringUtils;
+import com.taais.common.orm.core.page.PageQuery;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.orm.core.service.impl.BaseServiceImpl;
+import com.taais.system.domain.SysOss;
+import com.taais.system.domain.vo.SysOssVo;
+import com.taais.system.service.ISysOssService;
+import jakarta.annotation.Resource;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import com.taais.biz.mapper.AlgorithmModelTrackMapper;
+import com.taais.biz.domain.AlgorithmModelTrack;
+import com.taais.biz.domain.bo.AlgorithmModelTrackBo;
+import com.taais.biz.domain.vo.AlgorithmModelTrackVo;
+import com.taais.biz.service.IAlgorithmModelTrackService;
+
+import static com.taais.biz.domain.table.AlgorithmModelTrackTableDef.ALGORITHM_MODEL_TRACK;
+import static com.taais.biz.constant.BizConstant.AlgorithmType;
+import static com.taais.biz.utils.ZipUtils.unzip;
+
+/**
+ * 算法模型配置Service业务层处理
+ *
+ * @author wangkang
+ * 2024-09-26
+ */
+@Service
+public class AlgorithmModelTrackServiceImpl extends BaseServiceImpl<AlgorithmModelTrackMapper, AlgorithmModelTrack> implements IAlgorithmModelTrackService {
+    @Autowired
+    private ISysOssService ossService;
+
+    @Autowired
+    private AlgorithmConfigTrackServiceImpl algorithmConfigTrackService;
+
+    @Resource
+    private AlgorithmModelTrackMapper algorithmModelTrackMapper;
+
+    @Override
+    public QueryWrapper query() {
+        return super.query().from(ALGORITHM_MODEL_TRACK);
+    }
+
+    private QueryWrapper buildQueryWrapper(AlgorithmModelTrackBo algorithmModelTrackBo) {
+        QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(ALGORITHM_MODEL_TRACK.ALGORITHM_ID.eq
+            (algorithmModelTrackBo.getAlgorithmId()));
+        queryWrapper.and(ALGORITHM_MODEL_TRACK.MODEL_NAME.like
+            (algorithmModelTrackBo.getModelName()));
+        queryWrapper.and(ALGORITHM_MODEL_TRACK.MODEL_ADDRESS.eq
+            (algorithmModelTrackBo.getModelAddress()));
+        queryWrapper.and(ALGORITHM_MODEL_TRACK.SAMPLE_NUMBER.eq
+            (algorithmModelTrackBo.getSampleNumber()));
+        queryWrapper.and(ALGORITHM_MODEL_TRACK.CYCLE_EPOCH.eq
+            (algorithmModelTrackBo.getCycleEpoch()));
+        queryWrapper.and(ALGORITHM_MODEL_TRACK.REMARKS.eq
+            (algorithmModelTrackBo.getRemarks()));
+        queryWrapper.and(ALGORITHM_MODEL_TRACK.SYSTEM.eq
+            (algorithmModelTrackBo.getSystem()));
+        queryWrapper.and(ALGORITHM_MODEL_TRACK.ALGORITHM_TYPE.eq
+            (algorithmModelTrackBo.getAlgorithmType()));
+
+        return queryWrapper;
+    }
+
+    /**
+     * 查询算法模型配置
+     *
+     * @param id 算法模型配置主键
+     * @return 算法模型配置
+     */
+    @Override
+    public AlgorithmModelTrackVo selectById(Long id) {
+        AlgorithmModelTrackVo algorithmModelTrackVo = this.getOneAs(query().where(ALGORITHM_MODEL_TRACK.ID.eq(id)), AlgorithmModelTrackVo.class);
+
+        if (algorithmModelTrackVo == null) {
+            return null;
+        }
+
+        Long algorithmId = algorithmModelTrackVo.getAlgorithmId();
+
+        AlgorithmConfigTrackVo algorithmConfigTrackVo = algorithmConfigTrackService.selectById(algorithmId);
+        String parameterConfig = algorithmConfigTrackVo.getParameterConfig();
+
+        algorithmModelTrackVo.setParameterConfig(parameterConfig);
+
+        return algorithmModelTrackVo;
+    }
+
+    /**
+     * 查询算法模型配置列表
+     *
+     * @param algorithmModelTrackBo 算法模型配置Bo
+     * @return 算法模型配置集合
+     */
+    @Override
+    public List<AlgorithmModelTrackVo> selectList(AlgorithmModelTrackBo algorithmModelTrackBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(algorithmModelTrackBo);
+        return this.listAs(queryWrapper, AlgorithmModelTrackVo.class);
+    }
+
+    /**
+     * 分页查询算法模型配置列表
+     *
+     * @param algorithmModelTrackBo 算法模型配置Bo
+     * @return 分页算法模型配置集合
+     */
+    @Override
+    public PageResult<AlgorithmModelTrackVo> selectPage(AlgorithmModelTrackBo algorithmModelTrackBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(algorithmModelTrackBo);
+        Page<AlgorithmModelTrackVo> page = this.pageAs(PageQuery.build(), queryWrapper, AlgorithmModelTrackVo.class);
+        page.getRecords().forEach(model -> {
+            Long algorithmId = model.getAlgorithmId();
+
+            AlgorithmConfigTrackVo algorithmConfig = algorithmConfigTrackService.selectById(algorithmId);
+            model.setType(algorithmConfig.getType());
+            model.setSubsystem(algorithmConfig.getSubsystem());
+        });
+
+        return PageResult.build(page);
+    }
+
+    /**
+     * 新增算法模型配置
+     *
+     * @param algorithmModelTrackBo 算法模型配置Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    @Override
+    public CommonResult<String> insert(AlgorithmModelTrackBo algorithmModelTrackBo) {
+        AlgorithmConfigTrackVo algorithmConfigTrackVo = algorithmConfigTrackService.selectById(algorithmModelTrackBo.getAlgorithmId());
+        if (algorithmConfigTrackVo.getType().equals(AlgorithmType.REASONING) && ObjectUtil.isEmpty(algorithmModelTrackBo.getModelInputOssId())) {
+            return CommonResult.fail("预测算法必须上传模型文件");
+        }
+
+        AlgorithmModelTrack algorithmModelTrack = MapstructUtils.convert(algorithmModelTrackBo, AlgorithmModelTrack.class);
+
+        String resourcePath = null;
+        if (algorithmModelTrackBo.getModelInputOssId() != null) {
+            SysOssVo inputOssEntity = ossService.getById(algorithmModelTrackBo.getModelInputOssId());
+
+            String filePath = inputOssEntity.getFileName();
+            String localPath = TaaisConfig.getProfile();
+            resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+
+
+            if (resourcePath.endsWith(".zip")) {
+                String modelAddress = resourcePath.substring(0, resourcePath.lastIndexOf("."));
+                File file = new File(modelAddress);
+                if (!file.exists()) {
+                    unzip(resourcePath, modelAddress);
+                }
+                algorithmModelTrack.setModelAddress(modelAddress);
+            } else if (resourcePath.endsWith(".pt")) {
+                algorithmModelTrack.setModelAddress(resourcePath);
+            } else {
+                return CommonResult.fail("模型格式不正确,请上传.zip或.pt文件");
+            }
+        } else {
+            // String localPath = TaaisConfig.getUploadPath();
+            // String path = DateUtils.datePath() + "/" + IdUtil.fastSimpleUUID();
+            // resourcePath = localPath + "/" + path + ".pt";
+            // 本来这里是默认整一个虚拟模型地址,后面发现不合适便去掉了
+        }
+
+        if (AlgorithmType.REASONING.equals(algorithmConfigTrackVo.getType()) || AlgorithmType.TEST.equals(algorithmConfigTrackVo.getType())) {
+            algorithmModelTrack.setModelStatus(BizConstant.ModelStatus.END);
+        } else if (AlgorithmType.TRAIN.equals(algorithmConfigTrackVo.getType())) {
+            algorithmModelTrack.setModelStatus(BizConstant.ModelStatus.NOT_START);
+        } else {
+            return CommonResult.fail("算法类型不正确");
+        }
+
+
+        algorithmModelTrack.setAlgorithmId(algorithmModelTrackBo.getAlgorithmId());
+        algorithmModelTrack.setAlgorithmType(algorithmConfigTrackVo.getAlgorithmName());
+
+        boolean inserted = this.save(algorithmModelTrack); // 使用全局配置的雪花算法主键生成器生成ID值
+        if (inserted) {
+            return CommonResult.success("新增算法模型配置成功");
+        }
+        return CommonResult.fail("新增算法模型配置失败");
+    }
+
+    /**
+     * 修改算法模型配置
+     *
+     * @param algorithmModelTrackBo 算法模型配置Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    @Override
+    public boolean update(AlgorithmModelTrackBo algorithmModelTrackBo) {
+        AlgorithmModelTrack algorithmModelTrack = MapstructUtils.convert(algorithmModelTrackBo, AlgorithmModelTrack.class);
+        if (ObjectUtil.isNotNull(algorithmModelTrack) && ObjectUtil.isNotNull(algorithmModelTrack.getId())) {
+            boolean updated = this.updateById(algorithmModelTrack);
+            return updated;
+        }
+        return false;
+    }
+
+    /**
+     * 批量删除算法模型配置
+     *
+     * @param ids 需要删除的算法模型配置主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    @Transactional
+    @Override
+    public boolean deleteByIds(Long[] ids) {
+        return this.removeByIds(Arrays.asList(ids));
+    }
+
+    @Override
+    public List<Object> enums() {
+        List<AlgorithmModelTrack> algorithmModelTracks = algorithmModelTrackMapper.selectAll();
+
+        List<Object> result = new ArrayList<>();
+
+        for (AlgorithmModelTrack algorithmModelTrack : algorithmModelTracks) {
+            HashMap<String, Object> map = new HashMap<>();
+            map.put("value", algorithmModelTrack.getId());
+            map.put("label", algorithmModelTrack.getModelName());
+
+            AlgorithmConfigTrack config = algorithmConfigTrackService.getById(algorithmModelTrack.getAlgorithmId());
+            map.put("algorithmName", config.getAlgorithmName());
+            map.put("type", config.getType());
+            map.put("subsystem", config.getSubsystem());
+
+            result.add(map);
+        }
+
+        return result;
+    }
+
+}

+ 95 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataAmplificationTaskServiceImpl.java

@@ -0,0 +1,95 @@
+package com.taais.biz.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.taais.biz.domain.DataAmplificationTask;
+import com.taais.biz.domain.bo.DataAmplificationTaskBo;
+import com.taais.biz.domain.vo.DataAmplificationTaskVo;
+import com.taais.biz.mapper.DataAmplificationTaskMapper;
+import com.taais.biz.service.IDataAmplificationTaskService;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.core.utils.MapstructUtils;
+import com.taais.common.orm.core.page.PageQuery;
+import com.taais.common.orm.core.service.impl.BaseServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import jakarta.annotation.Resource;
+import java.util.Arrays;
+import java.util.List;
+
+import static com.taais.biz.domain.table.DataAmplificationTaskTableDef.DATA_AMPLIFICATION_TASK;
+
+/**
+ * 数据扩增任务 Service 业务层处理
+ */
+@Service
+@Slf4j
+public class DataAmplificationTaskServiceImpl extends BaseServiceImpl<DataAmplificationTaskMapper, DataAmplificationTask> implements IDataAmplificationTaskService {
+
+    @Resource
+    private DataAmplificationTaskMapper dataAmplificationTaskMapper;
+
+    @Override
+    public QueryWrapper query() {
+        return super.query().from(DATA_AMPLIFICATION_TASK);
+    }
+
+    private QueryWrapper buildQueryWrapper(DataAmplificationTaskBo taskBo) {
+        QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(DATA_AMPLIFICATION_TASK.SUB_TASK_ID.eq(taskBo.getSubTaskId()));
+        queryWrapper.and(DATA_AMPLIFICATION_TASK.NAME.like(taskBo.getName()));
+        queryWrapper.and(DATA_AMPLIFICATION_TASK.STATUS.eq(taskBo.getStatus()));
+        queryWrapper.and(DATA_AMPLIFICATION_TASK.REMARKS.like(taskBo.getRemarks()));
+        return queryWrapper;
+    }
+
+    @Override
+    public DataAmplificationTaskVo selectById(Long id) {
+        return this.getOneAs(query().where(DATA_AMPLIFICATION_TASK.ID.eq(id)), DataAmplificationTaskVo.class);
+    }
+
+    @Override
+    public List<DataAmplificationTaskVo> selectList(DataAmplificationTaskBo taskBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(taskBo);
+        return this.listAs(queryWrapper, DataAmplificationTaskVo.class);
+    }
+
+    @Override
+    public PageResult<DataAmplificationTaskVo> selectPage(DataAmplificationTaskBo taskBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(taskBo);
+        Page<DataAmplificationTaskVo> page = this.pageAs(PageQuery.build(), queryWrapper, DataAmplificationTaskVo.class);
+        return PageResult.build(page);
+    }
+
+    @Override
+    public boolean insert(DataAmplificationTaskBo taskBo) {
+        DataAmplificationTask task = MapstructUtils.convert(taskBo, DataAmplificationTask.class);
+        return this.save(task);
+    }
+
+    @Override
+    public DataAmplificationTask insertTask(DataAmplificationTaskBo taskBo) {
+        DataAmplificationTask task = MapstructUtils.convert(taskBo, DataAmplificationTask.class);
+        this.save(task);
+        return task;
+    }
+
+    @Override
+    public boolean update(DataAmplificationTaskBo taskBo) {
+        DataAmplificationTask task = MapstructUtils.convert(taskBo, DataAmplificationTask.class);
+        if (ObjectUtil.isNotNull(task) && ObjectUtil.isNotNull(task.getId())) {
+            return this.updateById(task);
+        }
+        return false;
+    }
+
+    @Transactional
+    @Override
+    public boolean deleteByIds(Long[] ids) {
+        return this.removeByIds(Arrays.asList(ids));
+    }
+
+}

+ 268 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataSeqServiceImpl.java

@@ -0,0 +1,268 @@
+package com.taais.biz.service.impl;
+
+import java.io.File;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.taais.biz.constant.BizConstant;
+import com.taais.common.core.config.TaaisConfig;
+import com.taais.common.core.constant.Constants;
+import com.taais.common.core.utils.MapstructUtils;
+import com.taais.common.core.utils.StringUtils;
+import com.taais.common.orm.core.page.PageQuery;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.orm.core.service.impl.BaseServiceImpl;
+import com.taais.system.domain.vo.SysOssVo;
+import com.taais.system.service.ISysOssService;
+import jakarta.annotation.Resource;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import com.taais.biz.mapper.DataSeqMapper;
+import com.taais.biz.domain.DataSeq;
+import com.taais.biz.domain.bo.DataSeqBo;
+import com.taais.biz.domain.vo.DataSeqVo;
+import com.taais.biz.service.IDataSeqService;
+
+import static com.taais.biz.domain.table.DataSeqTableDef.DATA_SEQ;
+import static com.taais.biz.service.impl.VideoStableServiceImpl.removeFileExtension;
+import static com.taais.biz.utils.ZipUtils.unzip;
+
+/**
+ * 数据管理Service业务层处理
+ *
+ * @author wangkang
+ * 2024-10-08
+ */
+@Service
+public class DataSeqServiceImpl extends BaseServiceImpl<DataSeqMapper, DataSeq> implements IDataSeqService {
+    @Autowired
+    private ISysOssService ossService;
+    @Resource
+    private DataSeqMapper dataSeqMapper;
+
+    @Override
+    public QueryWrapper query() {
+        return super.query().from(DATA_SEQ);
+    }
+
+    private QueryWrapper buildQueryWrapper(DataSeqBo dataSeqBo) {
+        QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(DATA_SEQ.NAME.like
+            (dataSeqBo.getName()));
+        queryWrapper.and(DATA_SEQ.DATA_TYPE.eq
+            (dataSeqBo.getDataType()));
+        queryWrapper.and(DATA_SEQ.FILE_TYPE.eq
+            (dataSeqBo.getFileType()));
+        queryWrapper.and(DATA_SEQ.OBJECT_TYPE.eq
+            (dataSeqBo.getObjectType()));
+        queryWrapper.and(DATA_SEQ.OBJECT_SUBTYPE.eq
+            (dataSeqBo.getObjectSubtype()));
+        queryWrapper.and(DATA_SEQ.BATCH_NUM.eq
+            (dataSeqBo.getBatchNum()));
+        queryWrapper.and(DATA_SEQ.SCENE.eq
+            (dataSeqBo.getScene()));
+        queryWrapper.and(DATA_SEQ.DATA_SOURCE.eq
+            (dataSeqBo.getDataSource()));
+        queryWrapper.and(DATA_SEQ.GATHER_TIME.eq
+            (dataSeqBo.getGatherTime()));
+        queryWrapper.and(DATA_SEQ.GATHER_SPOT.eq
+            (dataSeqBo.getGatherSpot()));
+        queryWrapper.and(DATA_SEQ.URL.eq
+            (dataSeqBo.getUrl()));
+        queryWrapper.and(DATA_SEQ.LOG.eq
+            (dataSeqBo.getLog()));
+        queryWrapper.and(DATA_SEQ.REMARKS.eq
+            (dataSeqBo.getRemarks()));
+        queryWrapper.and(DATA_SEQ.SUBSYSTEM.eq
+            (dataSeqBo.getSubsystem()));
+
+        return queryWrapper;
+    }
+
+    /**
+     * 查询数据管理
+     *
+     * @param id 数据管理主键
+     * @return 数据管理
+     */
+    @Override
+    public DataSeqVo selectById(Long id) {
+        return this.getOneAs(query().where(DATA_SEQ.ID.eq(id)), DataSeqVo.class);
+
+    }
+
+    /**
+     * 查询数据管理列表
+     *
+     * @param dataSeqBo 数据管理Bo
+     * @return 数据管理集合
+     */
+    @Override
+    public List<DataSeqVo> selectList(DataSeqBo dataSeqBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(dataSeqBo);
+        return this.listAs(queryWrapper, DataSeqVo.class);
+    }
+
+    /**
+     * 分页查询数据管理列表
+     *
+     * @param dataSeqBo 数据管理Bo
+     * @return 分页数据管理集合
+     */
+    @Override
+    public PageResult<DataSeqVo> selectPage(DataSeqBo dataSeqBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(dataSeqBo);
+        Page<DataSeqVo> page = this.pageAs(PageQuery.build(), queryWrapper, DataSeqVo.class);
+        return PageResult.build(page);
+    }
+
+    /**
+     * 新增数据管理
+     *
+     * @param dataSeqBo 数据管理Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    @Override
+    public boolean insert(DataSeqBo dataSeqBo) {
+        // 检查input_oss_id是否存在
+        if (ObjectUtil.isNull(dataSeqBo.getInputOssId())) {
+            return false;
+        }
+
+        SysOssVo ossEntity = ossService.getById(dataSeqBo.getInputOssId());
+        if (ObjectUtil.isNull(ossEntity)) {
+            return false;
+        }
+        DataSeq dataSeq = MapstructUtils.convert(dataSeqBo, DataSeq.class);
+
+        String filePath = ossEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+        dataSeq.setFilePath(resourcePath);
+
+        String unzipPath = resourcePath.substring(0, resourcePath.lastIndexOf(".")) + BizConstant.UNZIP_SUFFIX;
+        unzip(dataSeq.getFilePath(), unzipPath);
+        dataSeq.setUnzipPath(unzipPath);
+
+        dataSeq.setUrl(ossEntity.getUrl());
+        return this.save(dataSeq);// 使用全局配置的雪花算法主键生成器生成ID值
+    }
+
+    /**
+     * 修改数据管理
+     *
+     * @param dataSeqBo 数据管理Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    @Override
+    public boolean update(DataSeqBo dataSeqBo) {
+        DataSeq dataSeq = MapstructUtils.convert(dataSeqBo, DataSeq.class);
+        if (ObjectUtil.isNotNull(dataSeq) && ObjectUtil.isNotNull(dataSeq.getId())) {
+            boolean updated = this.updateById(dataSeq);
+            return updated;
+        }
+        return false;
+    }
+
+    /**
+     * 批量删除数据管理
+     *
+     * @param ids 需要删除的数据管理主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    @Transactional
+    @Override
+    public boolean deleteByIds(Long[] ids) {
+        return this.removeByIds(Arrays.asList(ids));
+    }
+
+    @Override
+    public List<String> getAllImages(Long inputOdssId) {
+        // 检查input_oss_id是否存在
+        if (ObjectUtil.isNull(inputOdssId)) {
+            return null;
+        }
+        SysOssVo ossEntity = ossService.getById(inputOdssId);
+        if (ObjectUtil.isNull(ossEntity)) {
+            return null;
+        }
+
+        String filePath = ossEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+        String unzipPath = resourcePath.substring(0, resourcePath.lastIndexOf(".")) + BizConstant.UNZIP_SUFFIX;
+
+        String urlPrefix = ossEntity.getUrl().substring(0, ossEntity.getUrl().lastIndexOf(".")) + BizConstant.UNZIP_SUFFIX;
+
+        // 列出unzipPath下所有图片文件
+        File directory = new File(unzipPath);
+        File[] files = directory.listFiles();
+        List<String> imageList = Arrays.asList(files).stream().filter(file -> file.isFile() && isImageFile(file)).map(file -> urlPrefix + "/" + file.getName()).toList();
+        return imageList;
+    }
+
+    @Override
+    public List<String> getImages(Long inputOdssId, String subsystem, Boolean isInput, String dir) {
+        // 检查input_oss_id是否存在
+        if (ObjectUtil.isNull(inputOdssId)) {
+            return null;
+        }
+        SysOssVo ossEntity = ossService.getById(inputOdssId);
+        if (ObjectUtil.isNull(ossEntity)) {
+            return null;
+        }
+
+        String filePath = ossEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+        String unzipPath = resourcePath.substring(0, resourcePath.lastIndexOf(".")) + BizConstant.UNZIP_SUFFIX + "/" + dir;
+        String resultPath = resourcePath.substring(0, resourcePath.lastIndexOf(".")) + subsystem + "/" + dir;
+
+        try {
+            if (isInput) {
+                String urlPrefix = ossEntity.getUrl().substring(0, ossEntity.getUrl().lastIndexOf(".")) + BizConstant.UNZIP_SUFFIX + "/" + dir;
+                // 列出unzipPath下所有图片文件
+                File directory = new File(unzipPath);
+                File[] files = directory.listFiles();
+                List<String> imageList = Arrays.asList(files).stream().filter(file -> isImageFile(file)).map(file -> urlPrefix + "/" + file.getName()).toList();
+                return imageList;
+            } else {
+                String urlPrefix = ossEntity.getUrl().substring(0, ossEntity.getUrl().lastIndexOf(".")) + subsystem + "/" + dir;
+                // 列出unzipPath下所有图片文件
+                File directory = new File(resultPath);
+                File[] files = directory.listFiles();
+                List<String> imageList = Arrays.asList(files).stream().filter(file -> isImageFile(file)).map(file -> urlPrefix + "/" + file.getName()).toList();
+                return imageList;
+            }
+        } catch (Exception e) {
+            System.out.println("getImages error: " + e.getMessage());
+            return new ArrayList<>();
+        }
+    }
+
+    // 常见图片格式的后缀
+    private static final String[] IMAGE_EXTENSIONS = {
+        ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".tif", ".webp"
+    };
+
+    // 判断文件是否为常见图片格式
+    private static boolean isImageFile(File file) {
+        if (file.isDirectory()) {
+            return false;
+        }
+        String fileName = file.getName().toLowerCase();
+        for (String extension : IMAGE_EXTENSIONS) {
+            if (fileName.endsWith(extension)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}

+ 166 - 9
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataServiceImpl.java

@@ -2,19 +2,21 @@ package com.taais.biz.service.impl;
 
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.http.HttpRequest;
-import cn.hutool.http.HttpUtil;
-import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.mybatisflex.core.paginate.Page;
 import com.mybatisflex.core.query.QueryWrapper;
+import com.taais.biz.constant.BizConstant;
 import com.taais.biz.domain.Data;
+import com.taais.biz.domain.bo.DataAmplificationTaskBo;
 import com.taais.biz.domain.bo.DataBo;
 import com.taais.biz.domain.vo.BatchDataResult;
 import com.taais.biz.domain.dto.DataAmplifyDto;
+import com.taais.biz.domain.vo.DataAmplificationTaskVo;
 import com.taais.biz.domain.vo.DataSelectVo;
 import com.taais.biz.domain.vo.DataVo;
 import com.taais.biz.mapper.DataMapper;
+import com.taais.biz.service.IDataAmplificationTaskService;
 import com.taais.biz.service.IDataService;
 import com.taais.common.core.config.TaaisConfig;
 import com.taais.common.core.core.domain.CommonResult;
@@ -34,6 +36,7 @@ import org.redisson.api.RedissonClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
@@ -48,7 +51,9 @@ import java.time.Instant;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
 import java.util.stream.Collectors;
 
 import static com.taais.biz.domain.table.DataTableDef.DATA;
@@ -68,13 +73,16 @@ public class DataServiceImpl extends BaseServiceImpl<DataMapper, Data> implement
     private static final String RAR = ".rar";
     private static final String TXT = ".txt";
     private static final String[] VALID_EXTENSIONS = {".jpg", ".jpeg", ".png"};
-    private static final String PYTHON_DATA_AMPLIFY_API = "http://127.0.0.1:9096/api/data/amplify";
+    private static final String PYTHON_DATA_AMPLIFY_API = "http://127.0.0.1:11001/augment";
     private static final String RESULT_CODE = "status";
     private static final String RESULT_STATUS = "200";
     private static final String AMPLIFY = "/AMPLIFY/";
     @Resource
     private DataMapper dataMapper;
 
+    @Resource
+    private IDataAmplificationTaskService dataAmplificationTaskService;
+
     @Override
     public QueryWrapper query() {
         return super.query().from(DATA);
@@ -278,7 +286,6 @@ public class DataServiceImpl extends BaseServiceImpl<DataMapper, Data> implement
         if (dataList.isEmpty()) {
             return CommonResult.fail("该批次下没有文件数据,请重新选择批次!");
         }
-        //TODO: 此处需要定义任务开始,把相关任务信息添加上(任务名称、任务开始时间、任务类型),然后再处理文件。
 
         List<Data> dataListInfo = dataList.stream().filter(data -> !StringUtils.isEmpty(data.getUrl())).toList();
         if (dataListInfo.isEmpty()) {
@@ -291,6 +298,9 @@ public class DataServiceImpl extends BaseServiceImpl<DataMapper, Data> implement
         String formattedDate = currentDate.format(formatter);
         filePath = filePath + File.separator + formattedDate;
         String finalFilePath = filePath;
+        Date startTime = new Date();
+        AtomicBoolean success = new AtomicBoolean(true);
+        AtomicReference<String> message = new AtomicReference<>("");
         dataListInfo.forEach(dataInfo -> {
             try {
                 //循环调用Python扩增接口
@@ -305,23 +315,33 @@ public class DataServiceImpl extends BaseServiceImpl<DataMapper, Data> implement
                 bodyJson.put("outputImagePath", outputImagePath);
                 bodyJson.put("otherParams", dataAmplifyDto.getOtherParams());
                 //实际请求接口,接口未提供,暂且注释
-//                String response = HttpRequest.post(PYTHON_DATA_AMPLIFY_API)
-//                        .body(JsonUtils.toJsonString(bodyJson))
-//                        .execute().body();
-                String response = "{\"status\":200,\"msg\":\"扩增成功\"}";
+                String response = HttpRequest.post(PYTHON_DATA_AMPLIFY_API)
+                    .body(JsonUtils.toJsonString(bodyJson))
+                    .execute().body();
+//                String response = "{\"status\":200,\"msg\":\"扩增成功\"}";
                 ObjectMapper objectMapper = new ObjectMapper();
                 JsonNode rootNode = objectMapper.readTree(response);
                 String resultCode = rootNode.path(RESULT_CODE).asText();
                 //判断接口是否响应成功
                 if (!RESULT_STATUS.equals(resultCode)) {
-                    throw new RuntimeException("调用Python接口返回扩增失败");
+                    success.set(true);
                 }
+                message.set(rootNode.path("msg").asText());
                 //处理当前目录文件,并进行入库
                 saveDataInfo(outputImagePath, dataInfo);
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }
         });
+        Date endTime = new Date();
+        DataAmplificationTaskBo update = new DataAmplificationTaskBo();
+        update.setId(Long.valueOf(dataAmplifyDto.getId()));
+        update.setStartTime(startTime);
+        update.setEndTime(endTime);
+        update.setCostSecond((int) (endTime.getTime() - startTime.getTime()));
+        update.setStatus(success.get() ? BizConstant.TASK_STATUS_SUCCEED : BizConstant.TASK_STATUS_FAILED);
+        update.setLog(message.get());
+        dataAmplificationTaskService.update(update);
         return CommonResult.fail("该批次下没有文件数据,请重新选择批次!");
     }
 
@@ -436,6 +456,143 @@ public class DataServiceImpl extends BaseServiceImpl<DataMapper, Data> implement
         return cacheList;
     }
 
+    @Override
+    @Transactional
+    public CommonResult<Boolean> amplifyForData(String id) {
+        DataAmplificationTaskVo taskVo = dataAmplificationTaskService.selectById(Long.valueOf(id));
+        DataAmplifyDto dataAmplifyDto = new DataAmplifyDto();
+        dataAmplifyDto.setId(taskVo.getId().toString());
+        dataAmplifyDto.setAugmentationType(taskVo.getAugmentationType());
+        List<Map<String, String>> maps = JsonUtils.parseArray(taskVo.getParameters(), Map.class);
+        dataAmplifyDto.setOtherParams(maps);
+        dataAmplifyDto.setBatchNum(taskVo.getDataBatchNums());
+        return this.doAmplify(dataAmplifyDto);
+    }
+
+    @Value("${taais.profile}")
+    private String profile;
+
+    private CommonResult<Boolean> doAmplify(DataAmplifyDto dataAmplifyDto) {
+        this.updateEmp(Long.valueOf(dataAmplifyDto.getId()));
+        String[] split = dataAmplifyDto.getBatchNum().split(",");
+        for (String batchNum : split) {
+            QueryWrapper query = query();
+            query.eq(Data::getBatchNum, batchNum);
+            List<Data> dataList = dataMapper.selectListByQuery(query);
+            if (dataList.isEmpty()) {
+                this.updateFail(Long.valueOf(dataAmplifyDto.getId()));
+                continue;
+            }
+
+            List<Data> dataListInfo = dataList.stream().filter(data -> !StringUtils.isEmpty(data.getUrl())).toList();
+            if (dataListInfo.isEmpty()) {
+                this.updateFail(Long.valueOf(dataAmplifyDto.getId()));
+                continue;
+            }
+            String filePath = TaaisConfig.getUploadPath();
+            LocalDate currentDate = LocalDate.now();
+            // 定义日期格式器
+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
+            String formattedDate = currentDate.format(formatter);
+            filePath = filePath + File.separator + formattedDate;
+            String finalFilePath = filePath;
+            Map<String, String> otherParams = new HashMap<>();
+            for (Map<String, String> param : dataAmplifyDto.getOtherParams()) {
+                otherParams.put(param.get("agName"), param.get("defaultValue"));
+            }
+            Map<String, String> param = dataAmplifyDto.getOtherParams()
+                .stream().collect(Collectors.toMap(item -> item.get("agName"), item -> item.get("defaultValue")));
+            dataListInfo.forEach(dataInfo -> {
+                try {
+                    boolean success = true;
+                    String message = "";
+                    Date startTime = new Date();
+
+                    //循环调用Python扩增接口
+                    Map<String, Object> bodyJson = new HashMap<>();
+                    bodyJson.put("bizType", "数据扩增");
+                    bodyJson.put("bizId", dataAmplifyDto.getId());
+                    bodyJson.put("augmentationType", dataAmplifyDto.getAugmentationType());
+                    bodyJson.put("inputImagePath", dataInfo.getUrl());
+                    String outputImagePath = finalFilePath + AMPLIFY + System.currentTimeMillis();
+                    File desc = new File(outputImagePath);
+                    if (!desc.exists()) {
+                        log.info("创建文件目录: {}", desc.mkdirs());
+                    }
+                    bodyJson.put("outputImagePath", outputImagePath);
+                    bodyJson.put("otherParams", otherParams);
+                    String logPath = profile + "/task/log/" + dataAmplifyDto.getId() + "_log.log";
+                    System.out.println("logPath===>" + logPath);
+                    bodyJson.put("logPath", logPath);
+                    //实际请求接口,接口未提供,暂且注释
+                    String response = HttpRequest.post(PYTHON_DATA_AMPLIFY_API)
+                        .body(JsonUtils.toJsonString(bodyJson))
+                        .execute().body();
+//                String response = "{\"status\":200,\"msg\":\"扩增成功\"}";
+                    ObjectMapper objectMapper = new ObjectMapper();
+                    JsonNode rootNode = objectMapper.readTree(response);
+                    String resultCode = rootNode.path(RESULT_CODE).asText();
+                    //判断接口是否响应成功
+                    if (!RESULT_STATUS.equals(resultCode)) {
+                        success = false;
+                    }
+                    message = rootNode.path("msg").asText();
+                    //处理当前目录文件,并进行入库
+                    saveDataInfo(outputImagePath, dataInfo);
+
+                    DataAmplificationTaskVo taskVo = dataAmplificationTaskService.selectById(Long.valueOf(dataAmplifyDto.getId()));
+                    Date endTime = new Date();
+                    DataAmplificationTaskBo update = new DataAmplificationTaskBo();
+                    if (taskVo.getInputImagePath() != null) {
+                        update.setInputImagePath(taskVo.getInputImagePath()+"|" + dataInfo.getUrl());
+                    } else {
+                        update.setInputImagePath(dataInfo.getUrl());
+                    }
+                    if (taskVo.getOutputImagePath() != null) {
+                        update.setOutputImagePath(taskVo.getOutputImagePath()+"|" + outputImagePath);
+                    } else {
+                        update.setOutputImagePath(outputImagePath);
+                    }
+                    update.setId(Long.valueOf(dataAmplifyDto.getId()));
+                    update.setStartTime(startTime);
+                    update.setEndTime(endTime);
+                    update.setCostSecond((int) (endTime.getTime() - startTime.getTime()));
+                    update.setStatus(success ? BizConstant.TASK_STATUS_SUCCEED : BizConstant.TASK_STATUS_FAILED);
+                    update.setLog(taskVo.getLog() + "|" + message);
+                    update.setVersion(taskVo.getVersion());
+                    update.setRemarks(taskVo.getRemarks() + "|" + (int) (endTime.getTime() - startTime.getTime()));
+                    dataAmplificationTaskService.update(update);
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+            });
+        }
+        //根据批次号获取该批次的所有文件数据
+        return CommonResult.success();
+    }
+
+    private void updateEmp(Long id) {
+        DataAmplificationTaskVo taskVo = dataAmplificationTaskService.selectById(id);
+        DataAmplificationTaskBo update = new DataAmplificationTaskBo();
+        update.setOutputImagePath("");
+        update.setInputImagePath("");
+        update.setId(id);
+        update.setLog("");
+        update.setVersion(taskVo.getVersion());
+        update.setRemarks("");
+        dataAmplificationTaskService.update(update);
+    }
+
+    private void updateFail(Long id) {
+        DataAmplificationTaskVo taskVo = dataAmplificationTaskService.selectById(id);
+        DataAmplificationTaskBo update = new DataAmplificationTaskBo();
+        update.setId(taskVo.getId());
+        update.setStatus(BizConstant.TASK_STATUS_FAILED);
+        update.setLog(taskVo.getLog() + "|" + "该批次下没有文件数据,请重新选择批次!");
+        update.setVersion(taskVo.getVersion());
+        dataAmplificationTaskService.update(update);
+    }
+
 
     /**
      * 解析目标目录所有文件,进行文件更名并入库

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

@@ -0,0 +1,395 @@
+package com.taais.biz.service.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.taais.biz.constant.BizConstant;
+import com.taais.biz.domain.*;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
+import com.taais.biz.domain.vo.AlgorithmModelTrackVo;
+import com.taais.biz.domain.vo.StartToInfraredTask;
+import com.taais.biz.mapper.ToInfraredMapper;
+import com.taais.biz.utils.ZipUtils;
+import com.taais.common.core.config.TaaisConfig;
+import com.taais.common.core.constant.Constants;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.core.utils.MapstructUtils;
+import com.taais.common.core.utils.StringUtils;
+import com.taais.common.orm.core.page.PageQuery;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.orm.core.service.impl.BaseServiceImpl;
+import com.taais.system.domain.vo.SysOssVo;
+import com.taais.system.service.ISysOssService;
+import jakarta.annotation.Resource;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import com.taais.biz.mapper.TargetDetectionMapper;
+import com.taais.biz.domain.bo.TargetDetectionBo;
+import com.taais.biz.domain.vo.TargetDetectionVo;
+import com.taais.biz.service.ITargetDetectionService;
+
+import static com.taais.biz.constant.BizConstant.VideoStatus.NOT_START;
+import static com.taais.biz.domain.table.TargetDetectionTableDef.TARGET_DETECTION;
+import static com.taais.biz.service.impl.VideoStableServiceImpl.*;
+import static com.taais.biz.service.impl.VideoStableServiceImpl.sendPostMsg;
+
+import com.alibaba.fastjson2.JSON;
+
+/**
+ * 目标检测Service业务层处理
+ *
+ * @author wangkang
+ * 2024-09-29
+ */
+@Service
+public class TargetDetectionServiceImpl extends BaseServiceImpl<TargetDetectionMapper, TargetDetection> implements ITargetDetectionService {
+    @Value("${server.task_stop_url}")
+    private String task_stop_url;
+
+    @Resource
+    private TargetDetectionMapper targetDetectionMapper;
+    @Autowired
+    private ISysOssService ossService;
+
+    @Autowired
+    private AlgorithmConfigTrackServiceImpl algorithmConfigTrackService;
+    @Autowired
+    private AlgorithmModelTrackServiceImpl algorithmModelTrackService;
+
+    @Override
+    public QueryWrapper query() {
+        return super.query().from(TARGET_DETECTION);
+    }
+
+    private QueryWrapper buildQueryWrapper(TargetDetectionBo targetDetectionBo) {
+        QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(TARGET_DETECTION.NAME.like
+            (targetDetectionBo.getName()));
+        queryWrapper.and(TARGET_DETECTION.STATUS.eq
+            (targetDetectionBo.getStatus()));
+        queryWrapper.and(TARGET_DETECTION.START_TIME.eq
+            (targetDetectionBo.getStartTime()));
+        queryWrapper.and(TARGET_DETECTION.END_TIME.eq
+            (targetDetectionBo.getEndTime()));
+        queryWrapper.and(TARGET_DETECTION.COST_SECOND.eq
+            (targetDetectionBo.getCostSecond()));
+        queryWrapper.and(TARGET_DETECTION.LOG.eq
+            (targetDetectionBo.getLog()));
+        queryWrapper.and(TARGET_DETECTION.REMARKS.eq
+            (targetDetectionBo.getRemarks()));
+        queryWrapper.and(TARGET_DETECTION.URL.eq
+            (targetDetectionBo.getUrl()));
+        queryWrapper.and(TARGET_DETECTION.INPUT_OSS_ID.eq
+            (targetDetectionBo.getInputOssId()));
+        queryWrapper.and(TARGET_DETECTION.INPUT_PATH.eq
+            (targetDetectionBo.getInputPath()));
+        queryWrapper.and(TARGET_DETECTION.OUTPUT_PATH.eq
+            (targetDetectionBo.getOutputPath()));
+        queryWrapper.and(TARGET_DETECTION.ZIP_FILE_PATH.eq
+            (targetDetectionBo.getZipFilePath()));
+        queryWrapper.and(TARGET_DETECTION.ALGORITHM_MODEL_ID.eq
+            (targetDetectionBo.getAlgorithmModelId()));
+
+        return queryWrapper;
+    }
+
+    /**
+     * 查询目标检测
+     *
+     * @param id 目标检测主键
+     * @return 目标检测
+     */
+    @Override
+    public TargetDetectionVo selectById(Long id) {
+        return this.getOneAs(query().where(TARGET_DETECTION.ID.eq(id)), TargetDetectionVo.class);
+
+    }
+
+    /**
+     * 查询目标检测列表
+     *
+     * @param targetDetectionBo 目标检测Bo
+     * @return 目标检测集合
+     */
+    @Override
+    public List<TargetDetectionVo> selectList(TargetDetectionBo targetDetectionBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(targetDetectionBo);
+        return this.listAs(queryWrapper, TargetDetectionVo.class);
+    }
+
+    /**
+     * 分页查询目标检测列表
+     *
+     * @param targetDetectionBo 目标检测Bo
+     * @return 分页目标检测集合
+     */
+    @Override
+    public PageResult<TargetDetectionVo> selectPage(TargetDetectionBo targetDetectionBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(targetDetectionBo);
+        Page<TargetDetectionVo> page = this.pageAs(PageQuery.build(), queryWrapper, TargetDetectionVo.class);
+        page.getRecords().forEach(entity -> {
+            Long modelId = entity.getAlgorithmModelId();
+            AlgorithmModelTrackVo model = algorithmModelTrackService.selectById(modelId);
+            if (ObjectUtil.isNotNull(model)) {
+                AlgorithmConfigTrackVo config = algorithmConfigTrackService.selectById(model.getAlgorithmId());
+                entity.setType(config.getType());
+                entity.setSubsystem(config.getSubsystem());
+                entity.setAlgorithmName(config.getAlgorithmName());
+                entity.setModelName(model.getModelName());
+            }
+        });
+        return PageResult.build(page);
+    }
+
+    /**
+     * 新增目标检测
+     *
+     * @param targetDetectionBo 目标检测Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    @Override
+    public boolean insert(TargetDetectionBo targetDetectionBo) {
+        // 检查input_oss_id是否存在
+        if (ObjectUtil.isNull(targetDetectionBo.getInputOssId())) {
+            return false;
+        }
+
+        SysOssVo ossEntity = ossService.getById(targetDetectionBo.getInputOssId());
+        if (ObjectUtil.isNull(ossEntity)) {
+            return false;
+        }
+
+        TargetDetection targetDetection = new TargetDetection();
+
+        targetDetection.setInputOssId(targetDetectionBo.getInputOssId());
+        targetDetection.setUrl(ossEntity.getUrl());
+
+        String filePath = ossEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+        targetDetection.setInputPath(resourcePath);
+
+        String fileName = StringUtils.substringAfterLast(filePath, "/");
+        String fileName_without_suffix = removeFileExtension(fileName);
+
+        Path path = Paths.get(resourcePath);
+        Path outPath = path.resolveSibling(fileName_without_suffix + "_images" + System.currentTimeMillis());
+        targetDetection.setOutputPath(outPath.toString());
+
+        targetDetection.setZipFilePath(path.resolveSibling(fileName_without_suffix + ".zip").toString());
+
+        targetDetection.setName(targetDetectionBo.getName());
+        targetDetection.setStatus(NOT_START);
+        targetDetection.setRemarks(targetDetectionBo.getRemarks());
+
+        targetDetection.setAlgorithmModelId(targetDetectionBo.getAlgorithmModelId());
+
+        return this.save(targetDetection);// 使用全局配置的雪花算法主键生成器生成ID值
+    }
+
+    /**
+     * 修改目标检测
+     *
+     * @param targetDetectionBo 目标检测Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    @Override
+    public boolean update(TargetDetectionBo targetDetectionBo) {
+        TargetDetection targetDetection = MapstructUtils.convert(targetDetectionBo, TargetDetection.class);
+        if (ObjectUtil.isNotNull(targetDetection) && ObjectUtil.isNotNull(targetDetection.getId())) {
+            boolean updated = this.updateById(targetDetection);
+            return updated;
+        }
+        return false;
+    }
+
+    /**
+     * 批量删除目标检测
+     *
+     * @param ids 需要删除的目标检测主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    @Transactional
+    @Override
+    public boolean deleteByIds(Long[] ids) {
+        return this.removeByIds(Arrays.asList(ids));
+    }
+
+    @Override
+    public CommonResult start(Long id) {
+        TargetDetection entity = getById(id);
+
+        SysOssVo inputOssEntity = ossService.getById(entity.getInputOssId());
+
+        String filePath = inputOssEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+
+        String fileName = StringUtils.substringAfterLast(filePath, "/");
+        String fileName_without_suffix = removeFileExtension(fileName);
+
+        Path path = Paths.get(resourcePath);
+        Path inputPath = path.resolveSibling(fileName_without_suffix + BizConstant.UNZIP_SUFFIX);
+        Path outputPath = path.resolveSibling(fileName_without_suffix + BizConstant.TARGET_DETECTION_SUFFIX);
+
+        makeDir(inputPath.toString());
+        makeDir(outputPath.toString());
+
+        File file = new File(resourcePath);
+        if (!file.exists()) {
+            ZipUtils.unzip(resourcePath, inputPath.toString());
+        }
+
+        entity.setInputPath(inputPath.toString());
+        entity.setOutputPath(outputPath.toString());
+
+        entity.setStartTime(new Date());
+
+        AlgorithmModelTrack algorithmModelTrack = algorithmModelTrackService.getById(entity.getAlgorithmModelId());
+        AlgorithmConfigTrack algorithmConfigTrack = algorithmConfigTrackService.getById(algorithmModelTrack.getAlgorithmId());
+
+        StartToInfraredTask startToInfraredTask = new StartToInfraredTask();
+        startToInfraredTask.setBizType(BizConstant.BizType.TARGET_DETECTION);
+        startToInfraredTask.setBizId(entity.getId());
+
+        startToInfraredTask.setOtherParams(algorithmConfigTrack.getParameterConfig());
+
+        startToInfraredTask.setSource_dir(entity.getInputPath());
+        startToInfraredTask.setResult_dir(entity.getOutputPath());
+
+        if (BizConstant.AlgorithmType.REASONING.equals(algorithmConfigTrack.getType())) {
+            String modelPath = algorithmModelTrack.getModelAddress() + File.separator + algorithmModelTrack.getModelName();
+            startToInfraredTask.setModel_path(modelPath);
+        }
+
+
+        HttpResponseEntity responseEntity = sendPostMsg(algorithmConfigTrack.getAlgorithmAddress(), startToInfraredTask);
+        if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
+            entity.setStatus(BizConstant.VideoStatus.RUNNING);
+            updateById(entity);
+            return CommonResult.success("任务开始成功,请等待完成");
+        } else {
+            entity.setStatus(BizConstant.VideoStatus.FAILED);
+            updateById(entity);
+            return CommonResult.fail("任务开始失败,请检查!");
+        }
+    }
+
+    @Override
+    public CommonResult stop(Long id) {
+        TargetDetection entity = getById(id);
+
+        StartToInfraredTask startToInfraredTask = new StartToInfraredTask();
+        startToInfraredTask.setBizType(BizConstant.BizType.TO_INFRARED);
+        startToInfraredTask.setBizId(entity.getId());
+
+        HttpResponseEntity responseEntity = sendPostMsg(task_stop_url, startToInfraredTask);
+        if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
+            entity.setStatus(BizConstant.VideoStatus.INTERRUPTED);
+            updateById(entity);
+            return CommonResult.success("终止任务成功");
+        } else {
+            return CommonResult.fail("终止任务失败");
+        }
+    }
+
+    @Override
+    public CommonResult getResult(TaskTrackResultBo taskTrackResultBo) {
+        Long id = taskTrackResultBo.getBizId();
+        String status = taskTrackResultBo.getStatus();
+        String msg = taskTrackResultBo.getMsg();
+        TargetDetection entity = getById(id);
+        entity.setLog(msg);
+        entity.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
+        entity.setEndTime(new Date());
+        try {
+            entity.setCostSecond((entity.getEndTime().getTime() - entity.getStartTime().getTime()) / 1000);
+        } catch (Exception e) {
+            entity.setCostSecond(null);
+        }
+        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();
+            }
+        }
+        */
+        return CommonResult.success();
+    }
+
+    @Override
+    public ResponseEntity<org.springframework.core.io.Resource> zipImages(Long id) {
+        TargetDetection targetDetection = this.getById(id);
+        if (ObjectUtil.isNull(targetDetection)) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+        String outputPath = targetDetection.getOutputPath();
+        String zipFilePath = outputPath + ".zip";
+
+        File file = new File(zipFilePath);
+        if (!file.exists()) {
+            try {
+                ZipUtils.zipFolderFiles(outputPath, zipFilePath);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        if (!file.exists() || !file.isFile()) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+        org.springframework.core.io.Resource resource = new FileSystemResource(file);
+        return ResponseEntity.ok()
+            .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"")
+            .header(HttpHeaders.CONTENT_TYPE, "application/octet-stream")
+            .body(resource);
+    }
+}

+ 34 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TargetIdentificationTaskServiceImpl.java

@@ -10,8 +10,10 @@ import com.mybatisflex.core.paginate.Page;
 import com.mybatisflex.core.query.QueryWrapper;
 import com.taais.biz.constant.BizConstant;
 import com.taais.biz.domain.TargetIdentificationSubtask;
+import com.taais.biz.domain.bo.DataAmplificationTaskBo;
 import com.taais.biz.domain.bo.TargetIdentificationSubtaskBo;
 import com.taais.biz.domain.bo.TargetIdentificationSubtaskDetailsBo;
+import com.taais.biz.domain.dto.DataAmplifyDto;
 import com.taais.biz.domain.dto.task.CreateTargetIdentificationTaskDto;
 import com.taais.biz.domain.dto.task.TaskDto;
 import com.taais.biz.domain.vo.AlgorithmModelVo;
@@ -21,6 +23,7 @@ import com.taais.biz.service.*;
 import com.taais.common.core.utils.MapstructUtils;
 import com.taais.common.core.utils.StringUtils;
 import com.taais.common.core.utils.uuid.UUID;
+import com.taais.common.json.utils.JsonUtils;
 import com.taais.common.orm.core.page.PageQuery;
 import com.taais.common.core.core.page.PageResult;
 import com.taais.common.orm.core.service.impl.BaseServiceImpl;
@@ -61,6 +64,9 @@ public class TargetIdentificationTaskServiceImpl extends BaseServiceImpl<TargetI
     @Resource
     private DataServiceImpl dataService;
 
+    @Resource
+    private IDataAmplificationTaskService dataAmplificationTaskService;
+
     @Override
     public QueryWrapper query() {
         return super.query().from(TARGET_IDENTIFICATION_TASK);
@@ -211,6 +217,11 @@ public class TargetIdentificationTaskServiceImpl extends BaseServiceImpl<TargetI
         if (taskDto.getTaskItemList().contains("2")){
             createTestTask(taskBo.getId(),taskDto, records);
         }
+
+        // 创建扩增子任务
+        if (taskDto.getHasTrainAugmentation()) {
+            createDataAmplifyTask(taskBo.getId(), taskDto);
+        }
         return null;
     }
 
@@ -501,6 +512,29 @@ public class TargetIdentificationTaskServiceImpl extends BaseServiceImpl<TargetI
         }
     }
 
+    private void createDataAmplifyTask(Long taskId, CreateTargetIdentificationTaskDto taskDto) {
+        List<String> trainBatchNumList = taskDto.getTrainBatchNumList();
+        for (String batchNumber : trainBatchNumList) {
+            TargetIdentificationSubtaskBo subtask = new TargetIdentificationSubtaskBo();
+            subtask.setName("数据扩增");
+            subtask.setStatus(BizConstant.TASK_STATUS_PENDING);
+            subtask.setTaskId(taskId);
+            subtask.setRemarks("DEFAULT_REMARK");
+            TargetIdentificationSubtask insertSubtask = subtaskService.insertSubtask(subtask);
+
+            DataAmplifyDto amplifyDto = taskDto.getTrainAugmentationParams();
+            DataAmplificationTaskBo dataAmplificationTaskBo = new DataAmplificationTaskBo();
+            dataAmplificationTaskBo.setSubTaskId(insertSubtask.getId());
+            dataAmplificationTaskBo.setName(amplifyDto.getTaskName());
+            dataAmplificationTaskBo.setStatus(BizConstant.TASK_STATUS_PENDING);
+            dataAmplificationTaskBo.setDataBatchNums(batchNumber);
+            dataAmplificationTaskBo.setAugmentationType(amplifyDto.getAugmentationType());
+            dataAmplificationTaskBo.setParameters(JsonUtils.toJsonString(amplifyDto.getOtherParams()));
+            dataAmplificationTaskBo.setDelFlag(0);
+            dataAmplificationTaskService.insert(dataAmplificationTaskBo);
+        }
+    }
+
 
     // todo 检查数据是否有问题
     private String checkTask(CreateTargetIdentificationTaskDto taskDto) {

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

@@ -0,0 +1,465 @@
+package com.taais.biz.service.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.taais.biz.constant.BizConstant;
+import com.taais.biz.domain.*;
+import com.taais.biz.domain.ToInfrared;
+import com.taais.biz.domain.bo.ToInfraredBo;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
+import com.taais.biz.domain.vo.AlgorithmModelTrackVo;
+import com.taais.biz.domain.vo.StartToInfraredTask;
+import com.taais.biz.domain.vo.ToInfraredVo;
+import com.taais.biz.mapper.ToInfraredMapper;
+import com.taais.biz.service.IToInfraredService;
+import com.taais.biz.utils.ZipUtils;
+import com.taais.common.core.config.TaaisConfig;
+import com.taais.common.core.constant.Constants;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.core.utils.MapstructUtils;
+import com.taais.common.core.utils.StringUtils;
+import com.taais.common.orm.core.page.PageQuery;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.orm.core.service.impl.BaseServiceImpl;
+import com.taais.system.domain.vo.SysOssVo;
+import com.taais.system.service.ISysOssService;
+import jakarta.annotation.Resource;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import static com.taais.biz.constant.BizConstant.VideoStatus.NOT_START;
+import static com.taais.biz.domain.table.ToInfraredTableDef.TO_INFRARED;
+import static com.taais.biz.service.impl.VideoStableServiceImpl.*;
+
+/**
+ * 可见光转红外Service业务层处理
+ *
+ * @author 0
+ * 2024-09-20
+ */
+@Service
+@Log4j2
+public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToInfrared> implements IToInfraredService {
+    @Value("${server.task_stop_url}")
+    private String task_stop_url;
+
+    @Autowired
+    private ISysOssService ossService;
+
+    @Resource
+    private ToInfraredMapper toInfraredMapper;
+    @Autowired
+    private AlgorithmConfigTrackServiceImpl algorithmConfigTrackService;
+    @Autowired
+    private AlgorithmModelTrackServiceImpl algorithmModelTrackService;
+
+    @Override
+    public QueryWrapper query() {
+        return super.query().from(TO_INFRARED);
+    }
+
+    private QueryWrapper buildQueryWrapper(ToInfraredBo toInfraredBo) {
+        QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(TO_INFRARED.NAME.like
+            (toInfraredBo.getName()));
+        queryWrapper.and(TO_INFRARED.STATUS.eq
+            (toInfraredBo.getStatus()));
+        queryWrapper.and(TO_INFRARED.START_TIME.eq
+            (toInfraredBo.getStartTime()));
+        queryWrapper.and(TO_INFRARED.END_TIME.eq
+            (toInfraredBo.getEndTime()));
+        queryWrapper.and(TO_INFRARED.COST_SECOND.eq
+            (toInfraredBo.getCostSecond()));
+        queryWrapper.and(TO_INFRARED.LOG.eq
+            (toInfraredBo.getLog()));
+        queryWrapper.and(TO_INFRARED.REMARKS.eq
+            (toInfraredBo.getRemarks()));
+        queryWrapper.and(TO_INFRARED.URL.eq
+            (toInfraredBo.getUrl()));
+        queryWrapper.and(TO_INFRARED.INPUT_OSS_ID.eq
+            (toInfraredBo.getInputOssId()));
+        queryWrapper.and(TO_INFRARED.INPUT_PATH.eq
+            (toInfraredBo.getInputPath()));
+        queryWrapper.and(TO_INFRARED.OUTPUT_PATH.eq
+            (toInfraredBo.getOutputPath()));
+
+        return queryWrapper;
+    }
+
+    /**
+     * 查询可见光转红外
+     *
+     * @param id 可见光转红外主键
+     * @return 可见光转红外
+     */
+    @Override
+    public ToInfraredVo selectById(Long id) {
+        return this.getOneAs(query().where(TO_INFRARED.ID.eq(id)), ToInfraredVo.class);
+
+    }
+
+    /**
+     * 查询可见光转红外列表
+     *
+     * @param toInfraredBo 可见光转红外Bo
+     * @return 可见光转红外集合
+     */
+    @Override
+    public List<ToInfraredVo> selectList(ToInfraredBo toInfraredBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(toInfraredBo);
+        return this.listAs(queryWrapper, ToInfraredVo.class);
+    }
+
+    /**
+     * 分页查询可见光转红外列表
+     *
+     * @param toInfraredBo 可见光转红外Bo
+     * @return 分页可见光转红外集合
+     */
+    @Override
+    public PageResult<ToInfraredVo> selectPage(ToInfraredBo toInfraredBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(toInfraredBo);
+        Page<ToInfraredVo> page = this.pageAs(PageQuery.build(), queryWrapper, ToInfraredVo.class);
+        page.getRecords().forEach(entity -> {
+            Long modelId = entity.getAlgorithmModelId();
+            AlgorithmModelTrackVo model = algorithmModelTrackService.selectById(modelId);
+            if (ObjectUtil.isNotNull(model)) {
+                AlgorithmConfigTrackVo config = algorithmConfigTrackService.selectById(model.getAlgorithmId());
+                entity.setType(config.getType());
+                entity.setSubsystem(config.getSubsystem());
+                entity.setAlgorithmName(config.getAlgorithmName());
+                entity.setModelName(model.getModelName());
+            }
+        });
+        return PageResult.build(page);
+    }
+
+    /**
+     * 新增可见光转红外
+     *
+     * @param toInfraredBo 可见光转红外Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    @Override
+    public boolean insert(ToInfraredBo toInfraredBo) {
+        // 检查input_oss_id是否存在
+        if (ObjectUtil.isNull(toInfraredBo.getInputOssId())) {
+            return false;
+        }
+
+        SysOssVo ossEntity = ossService.getById(toInfraredBo.getInputOssId());
+        if (ObjectUtil.isNull(ossEntity)) {
+            return false;
+        }
+
+        ToInfrared toInfrared = new ToInfrared();
+
+        toInfrared.setInputOssId(toInfraredBo.getInputOssId());
+        toInfrared.setUrl(ossEntity.getUrl());
+
+        String filePath = ossEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+        toInfrared.setInputPath(resourcePath);
+
+        String fileName = StringUtils.substringAfterLast(filePath, "/");
+        String fileName_without_suffix = removeFileExtension(fileName);
+
+        Path path = Paths.get(resourcePath);
+        Path outPath = path.resolveSibling(fileName_without_suffix + "_images" + System.currentTimeMillis());
+        toInfrared.setOutputPath(outPath.toString());
+
+        toInfrared.setZipFilePath(path.resolveSibling(fileName_without_suffix + ".zip").toString());
+
+        toInfrared.setName(toInfraredBo.getName());
+        toInfrared.setStatus(NOT_START);
+        toInfrared.setRemarks(toInfraredBo.getRemarks());
+
+        toInfrared.setAlgorithmModelId(toInfraredBo.getAlgorithmModelId());
+
+        return this.save(toInfrared);// 使用全局配置的雪花算法主键生成器生成ID值
+    }
+
+    /**
+     * 修改可见光转红外
+     *
+     * @param toInfraredBo 可见光转红外Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    @Override
+    public boolean update(ToInfraredBo toInfraredBo) {
+        ToInfrared toInfrared = MapstructUtils.convert(toInfraredBo, ToInfrared.class);
+        if (ObjectUtil.isNotNull(toInfrared) && ObjectUtil.isNotNull(toInfrared.getId())) {
+            boolean updated = this.updateById(toInfrared);
+            return updated;
+        }
+        return false;
+    }
+
+    /**
+     * 批量删除可见光转红外
+     *
+     * @param ids 需要删除的可见光转红外主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    @Transactional
+    @Override
+    public boolean deleteByIds(Long[] ids) {
+        return this.removeByIds(Arrays.asList(ids));
+    }
+
+    @Override
+    public CommonResult start(Long id) {
+        ToInfrared toInfrared = getById(id);
+
+        SysOssVo inputOssEntity = ossService.getById(toInfrared.getInputOssId());
+
+        String filePath = inputOssEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+
+        String fileName = StringUtils.substringAfterLast(filePath, "/");
+        String fileName_without_suffix = removeFileExtension(fileName);
+
+        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);
+
+        makeDir(inputPath.toString());
+        makeDir(outputPath.toString());
+
+        File file = new File(resourcePath);
+        if (!file.exists()) {
+            ZipUtils.unzip(resourcePath, inputPath.toString());
+        }
+
+        toInfrared.setInputPath(inputPath.toString());
+        toInfrared.setOutputPath(outputPath.toString());
+
+        toInfrared.setStartTime(new Date());
+
+        AlgorithmModelTrack algorithmModelTrack = algorithmModelTrackService.getById(toInfrared.getAlgorithmModelId());
+        AlgorithmConfigTrack algorithmConfigTrack = algorithmConfigTrackService.getById(algorithmModelTrack.getAlgorithmId());
+
+        StartToInfraredTask startToInfraredTask = new StartToInfraredTask();
+        startToInfraredTask.setBizType(BizConstant.BizType.TO_INFRARED);
+        startToInfraredTask.setBizId(toInfrared.getId());
+
+        startToInfraredTask.setOtherParams(algorithmConfigTrack.getParameterConfig());
+
+//        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 (BizConstant.AlgorithmType.REASONING.equals(algorithmConfigTrack.getType())) {
+            startToInfraredTask.setModel_path(algorithmModelTrack.getModelAddress());
+        }
+
+
+        HttpResponseEntity responseEntity = sendPostMsg(algorithmConfigTrack.getAlgorithmAddress(), startToInfraredTask);
+        if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
+            toInfrared.setStatus(BizConstant.VideoStatus.RUNNING);
+            updateById(toInfrared);
+            return CommonResult.success("任务开始成功,请等待完成");
+        } else {
+            toInfrared.setStatus(BizConstant.VideoStatus.FAILED);
+            updateById(toInfrared);
+            return CommonResult.fail("任务开始失败,请检查!");
+        }
+    }
+
+    @Override
+    public CommonResult stop(Long id) {
+        ToInfrared toInfrared = getById(id);
+
+        StartToInfraredTask startToInfraredTask = new StartToInfraredTask();
+        startToInfraredTask.setBizType(BizConstant.BizType.TO_INFRARED);
+        startToInfraredTask.setBizId(toInfrared.getId());
+
+        HttpResponseEntity responseEntity = sendPostMsg(task_stop_url, startToInfraredTask);
+        if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
+            toInfrared.setStatus(BizConstant.VideoStatus.INTERRUPTED);
+            updateById(toInfrared);
+            return CommonResult.success("终止任务成功");
+        } else {
+            return CommonResult.fail("终止任务失败");
+        }
+    }
+
+    @Override
+    public CommonResult getResult(TaskTrackResultBo taskTrackResultBo) {
+        Long id = taskTrackResultBo.getBizId();
+        String status = taskTrackResultBo.getStatus();
+        String msg = taskTrackResultBo.getMsg();
+        ToInfrared entity = getById(id);
+        entity.setLog(msg);
+        entity.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
+        entity.setEndTime(new Date());
+        try {
+            entity.setCostSecond((entity.getEndTime().getTime() - entity.getStartTime().getTime()) / 1000);
+        } catch (Exception e) {
+            entity.setCostSecond(null);
+        }
+        updateById(entity);
+        /*
+         * 这里有很多需要做的: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();
+            }
+        }
+*/
+
+
+        return CommonResult.success();
+    }
+
+    @Override
+    public ResponseEntity<org.springframework.core.io.Resource> zipImages(Long id) {
+        ToInfrared toInfrared = this.getById(id);
+        if (ObjectUtil.isNull(toInfrared)) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+//        String osName = System.getProperty("os.name");
+//        if (osName.toLowerCase().contains("windows")) {
+//            outputPath = outputPath;
+//        }
+
+        AlgorithmModelTrackVo model = algorithmModelTrackService.selectById(toInfrared.getAlgorithmModelId());
+        AlgorithmConfigTrackVo config = algorithmConfigTrackService.selectById(model.getAlgorithmId());
+
+        if (BizConstant.AlgorithmType.TRAIN.equals(config.getType())) { // 如果是训练类型,返回模型
+            return getLastModelFile(toInfrared);
+        } else if (BizConstant.AlgorithmType.REASONING.equals(config.getType())) { // 如果是推理类型,返回图片集
+            return getPredictImages(toInfrared);
+        } else {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+    }
+
+    private ResponseEntity<org.springframework.core.io.Resource> getPredictImages(ToInfrared toInfrared) {
+        String outputPath = toInfrared.getOutputPath();
+        String predictDir = outputPath + File.separator + BizConstant.PREDICT_PATH;
+
+        String zipFilePath = outputPath + File.separator + "predict.zip";
+
+        File file = new File(zipFilePath);
+        if (!file.exists()) {
+            try {
+                ZipUtils.zipFolderFiles(predictDir, zipFilePath);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+
+        if (!file.exists() || !file.isFile()) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+        org.springframework.core.io.Resource resource = new FileSystemResource(file);
+        return ResponseEntity.ok()
+            .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"")
+            .header(HttpHeaders.CONTENT_TYPE, "application/octet-stream")
+            .body(resource);
+    }
+
+    public ResponseEntity<org.springframework.core.io.Resource> getLastModelFile(ToInfrared toInfrared) {
+        String outputPath = toInfrared.getOutputPath();
+        File modelDir = new File(outputPath + File.separator + BizConstant.MODEL_PATH);
+
+        if (!modelDir.exists() || !modelDir.isDirectory()) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+        File[] modelFiles = modelDir.listFiles();
+        if (modelFiles == null || modelFiles.length == 0) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+        for (int i = 0; i < modelFiles.length; i++) {
+            System.out.println(modelFiles[i].getName());
+        }
+
+        File returnFile = modelFiles[modelFiles.length - 1];
+
+        org.springframework.core.io.Resource resource = new FileSystemResource(returnFile);
+        return ResponseEntity.ok()
+            .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + returnFile.getName() + "\"")
+            .header(HttpHeaders.CONTENT_TYPE, "application/octet-stream")
+            .body(resource);
+    }
+
+//    @Override
+//    public ResponseEntity<org.springframework.core.io.Resource> zipImages(Long id) {
+//        ToInfrared toInfrared = this.getById(id);
+//        if (ObjectUtil.isNull(toInfrared)) {
+//            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+//        }
+//
+//        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) {
+//            throw new RuntimeException(e);
+//        }
+//
+//        File file = new File(zipFilePath);
+//
+//        if (!file.exists() || !file.isFile()) {
+//            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+//        }
+//
+//        org.springframework.core.io.Resource resource = new FileSystemResource(file);
+//        return ResponseEntity.ok()
+//            .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"")
+//            .header(HttpHeaders.CONTENT_TYPE, "application/octet-stream")
+//            .body(resource);
+//    }
+}

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

@@ -0,0 +1,395 @@
+package com.taais.biz.service.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson2.JSON;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.taais.biz.constant.BizConstant;
+import com.taais.biz.domain.*;
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
+import com.taais.biz.domain.vo.AlgorithmModelTrackVo;
+import com.taais.biz.domain.vo.StartToInfraredTask;
+import com.taais.biz.utils.ZipUtils;
+import com.taais.common.core.config.TaaisConfig;
+import com.taais.common.core.constant.Constants;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.core.utils.MapstructUtils;
+import com.taais.common.core.utils.StringUtils;
+import com.taais.common.orm.core.page.PageQuery;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.orm.core.service.impl.BaseServiceImpl;
+import com.taais.system.domain.vo.SysOssVo;
+import com.taais.system.service.ISysOssService;
+import jakarta.annotation.Resource;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import com.taais.biz.mapper.TrackSequenceMapper;
+import com.taais.biz.domain.bo.TrackSequenceBo;
+import com.taais.biz.domain.vo.TrackSequenceVo;
+import com.taais.biz.service.ITrackSequenceService;
+
+import static com.taais.biz.constant.BizConstant.VideoStatus.NOT_START;
+import static com.taais.biz.domain.table.TrackSequenceTableDef.TRACK_SEQUENCE;
+import static com.taais.biz.service.impl.VideoStableServiceImpl.*;
+import static com.taais.biz.service.impl.VideoStableServiceImpl.makeDir;
+
+/**
+ * 注视轨迹序列Service业务层处理
+ *
+ * @author wangkang
+ * 2024-09-22
+ */
+@Service
+public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMapper, TrackSequence> implements ITrackSequenceService {
+    @Value("${server.task_stop_url}")
+    private String task_stop_url;
+
+    @Autowired
+    private AlgorithmConfigTrackServiceImpl algorithmConfigTrackService;
+    @Autowired
+    private AlgorithmModelTrackServiceImpl algorithmModelTrackService;
+
+    @Autowired
+    private ISysOssService ossService;
+
+    @Resource
+    private TrackSequenceMapper trackSequenceMapper;
+
+    @Override
+    public QueryWrapper query() {
+        return super.query().from(TRACK_SEQUENCE);
+    }
+
+    private QueryWrapper buildQueryWrapper(TrackSequenceBo trackSequenceBo) {
+        QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(TRACK_SEQUENCE.NAME.like
+            (trackSequenceBo.getName()));
+        queryWrapper.and(TRACK_SEQUENCE.STATUS.eq
+            (trackSequenceBo.getStatus()));
+        queryWrapper.and(TRACK_SEQUENCE.START_TIME.eq
+            (trackSequenceBo.getStartTime()));
+        queryWrapper.and(TRACK_SEQUENCE.END_TIME.eq
+            (trackSequenceBo.getEndTime()));
+        queryWrapper.and(TRACK_SEQUENCE.COST_SECOND.eq
+            (trackSequenceBo.getCostSecond()));
+        queryWrapper.and(TRACK_SEQUENCE.LOG.eq
+            (trackSequenceBo.getLog()));
+        queryWrapper.and(TRACK_SEQUENCE.REMARKS.eq
+            (trackSequenceBo.getRemarks()));
+        queryWrapper.and(TRACK_SEQUENCE.URL.eq
+            (trackSequenceBo.getUrl()));
+        queryWrapper.and(TRACK_SEQUENCE.INPUT_OSS_ID.eq
+            (trackSequenceBo.getInputOssId()));
+        queryWrapper.and(TRACK_SEQUENCE.INPUT_PATH.eq
+            (trackSequenceBo.getInputPath()));
+        queryWrapper.and(TRACK_SEQUENCE.OUTPUT_PATH.eq
+            (trackSequenceBo.getOutputPath()));
+        queryWrapper.and(TRACK_SEQUENCE.ZIP_FILE_PATH.eq
+            (trackSequenceBo.getZipFilePath()));
+
+        return queryWrapper;
+    }
+
+    /**
+     * 查询注视轨迹序列
+     *
+     * @param id 注视轨迹序列主键
+     * @return 注视轨迹序列
+     */
+    @Override
+    public TrackSequenceVo selectById(Long id) {
+        return this.getOneAs(query().where(TRACK_SEQUENCE.ID.eq(id)), TrackSequenceVo.class);
+
+    }
+
+    /**
+     * 查询注视轨迹序列列表
+     *
+     * @param trackSequenceBo 注视轨迹序列Bo
+     * @return 注视轨迹序列集合
+     */
+    @Override
+    public List<TrackSequenceVo> selectList(TrackSequenceBo trackSequenceBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(trackSequenceBo);
+        return this.listAs(queryWrapper, TrackSequenceVo.class);
+    }
+
+    /**
+     * 分页查询注视轨迹序列列表
+     *
+     * @param trackSequenceBo 注视轨迹序列Bo
+     * @return 分页注视轨迹序列集合
+     */
+    @Override
+    public PageResult<TrackSequenceVo> selectPage(TrackSequenceBo trackSequenceBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(trackSequenceBo);
+        Page<TrackSequenceVo> page = this.pageAs(PageQuery.build(), queryWrapper, TrackSequenceVo.class);
+        page.getRecords().forEach(entity -> {
+            Long modelId = entity.getAlgorithmModelId();
+            AlgorithmModelTrackVo model = algorithmModelTrackService.selectById(modelId);
+            if (ObjectUtil.isNotNull(model)) {
+                AlgorithmConfigTrackVo config = algorithmConfigTrackService.selectById(model.getAlgorithmId());
+                entity.setType(config.getType());
+                entity.setSubsystem(config.getSubsystem());
+                entity.setAlgorithmName(config.getAlgorithmName());
+                entity.setModelName(model.getModelName());
+            }
+        });
+        return PageResult.build(page);
+    }
+
+    /**
+     * 新增注视轨迹序列
+     *
+     * @param trackSequenceBo 注视轨迹序列Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    @Override
+    public boolean insert(TrackSequenceBo trackSequenceBo) {
+        // 检查input_oss_id是否存在
+        if (ObjectUtil.isNull(trackSequenceBo.getInputOssId())) {
+            return false;
+        }
+
+        SysOssVo ossEntity = ossService.getById(trackSequenceBo.getInputOssId());
+        if (ObjectUtil.isNull(ossEntity)) {
+            return false;
+        }
+
+        TrackSequence trackSequence = new TrackSequence();
+
+        trackSequence.setInputOssId(trackSequenceBo.getInputOssId());
+        trackSequence.setUrl(ossEntity.getUrl());
+
+        String filePath = ossEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+        trackSequence.setInputPath(resourcePath);
+
+        String fileName = StringUtils.substringAfterLast(filePath, "/");
+        String fileName_without_suffix = removeFileExtension(fileName);
+
+        Path path = Paths.get(resourcePath);
+        Path outPath = path.resolveSibling(fileName_without_suffix + "_images" + System.currentTimeMillis());
+        trackSequence.setOutputPath(outPath.toString());
+
+        trackSequence.setZipFilePath(path.resolveSibling(fileName_without_suffix + ".zip").toString());
+
+        trackSequence.setName(trackSequenceBo.getName());
+        trackSequence.setStatus(NOT_START);
+        trackSequence.setRemarks(trackSequenceBo.getRemarks());
+
+        trackSequence.setAlgorithmModelId(trackSequenceBo.getAlgorithmModelId());
+
+        return this.save(trackSequence);// 使用全局配置的雪花算法主键生成器生成ID值
+    }
+
+    /**
+     * 修改注视轨迹序列
+     *
+     * @param trackSequenceBo 注视轨迹序列Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    @Override
+    public boolean update(TrackSequenceBo trackSequenceBo) {
+        TrackSequence trackSequence = MapstructUtils.convert(trackSequenceBo, TrackSequence.class);
+        if (ObjectUtil.isNotNull(trackSequence) && ObjectUtil.isNotNull(trackSequence.getId())) {
+            boolean updated = this.updateById(trackSequence);
+            return updated;
+        }
+        return false;
+    }
+
+    /**
+     * 批量删除注视轨迹序列
+     *
+     * @param ids 需要删除的注视轨迹序列主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    @Transactional
+    @Override
+    public boolean deleteByIds(Long[] ids) {
+        return this.removeByIds(Arrays.asList(ids));
+    }
+
+    @Override
+    public CommonResult start(Long id) {
+        TrackSequence entity = getById(id);
+
+        SysOssVo inputOssEntity = ossService.getById(entity.getInputOssId());
+
+        String filePath = inputOssEntity.getFileName();
+        String localPath = TaaisConfig.getProfile();
+        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
+
+        String fileName = StringUtils.substringAfterLast(filePath, "/");
+        String fileName_without_suffix = removeFileExtension(fileName);
+
+        Path path = Paths.get(resourcePath);
+        Path inputPath = path.resolveSibling(fileName_without_suffix + BizConstant.UNZIP_SUFFIX);
+        Path outputPath = path.resolveSibling(fileName_without_suffix + BizConstant.TRACK_SEQUENCE_SUFFIX);
+
+        makeDir(inputPath.toString());
+        makeDir(outputPath.toString());
+
+        File file = new File(resourcePath);
+        if (!file.exists()) {
+            ZipUtils.unzip(resourcePath, inputPath.toString());
+        }
+
+        entity.setInputPath(inputPath.toString());
+        entity.setOutputPath(outputPath.toString());
+
+        entity.setStartTime(new Date());
+
+        AlgorithmModelTrack algorithmModelTrack = algorithmModelTrackService.getById(entity.getAlgorithmModelId());
+        AlgorithmConfigTrack algorithmConfigTrack = algorithmConfigTrackService.getById(algorithmModelTrack.getAlgorithmId());
+
+        StartToInfraredTask startToInfraredTask = new StartToInfraredTask();
+        startToInfraredTask.setBizType(BizConstant.BizType.TRACK_SEQUENCE);
+        startToInfraredTask.setBizId(entity.getId());
+
+        startToInfraredTask.setOtherParams(algorithmConfigTrack.getParameterConfig());
+
+        startToInfraredTask.setSource_dir(entity.getInputPath());
+        startToInfraredTask.setResult_dir(entity.getOutputPath());
+
+        if (BizConstant.AlgorithmType.REASONING.equals(algorithmConfigTrack.getType())) {
+            if(algorithmModelTrack.getModelName().startsWith("masc") || algorithmModelTrack.getModelName().startsWith("MASC")) {
+                String modelPath = algorithmModelTrack.getModelAddress() + File.separator + algorithmModelTrack.getModelName();
+                startToInfraredTask.setModel_path(modelPath);
+            }
+            else if(algorithmModelTrack.getModelName().startsWith("cat") || algorithmModelTrack.getModelName().startsWith("CAT")) {
+                String modelPath = algorithmModelTrack.getModelAddress();
+                startToInfraredTask.setModel_path(modelPath);
+            }
+            else {
+                return CommonResult.fail("模型命名失败,请以MASC或CAT开头命名模型");
+            }
+        }
+
+
+        HttpResponseEntity responseEntity = sendPostMsg(algorithmConfigTrack.getAlgorithmAddress(), startToInfraredTask);
+        if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
+            entity.setStatus(BizConstant.VideoStatus.RUNNING);
+            updateById(entity);
+            return CommonResult.success("任务开始成功,请等待完成");
+        } else {
+            entity.setStatus(BizConstant.VideoStatus.FAILED);
+            updateById(entity);
+            return CommonResult.fail("任务开始失败,请检查!");
+        }
+    }
+
+    @Override
+    public CommonResult stop(Long id) {
+        TrackSequence entity = getById(id);
+
+        StartToInfraredTask startToInfraredTask = new StartToInfraredTask();
+        startToInfraredTask.setBizType(BizConstant.BizType.TRACK_SEQUENCE);
+        startToInfraredTask.setBizId(entity.getId());
+
+        HttpResponseEntity responseEntity = sendPostMsg(task_stop_url, startToInfraredTask);
+        if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
+            entity.setStatus(BizConstant.VideoStatus.INTERRUPTED);
+            updateById(entity);
+            return CommonResult.success("终止任务成功");
+        } else {
+            return CommonResult.fail("终止任务失败");
+        }
+    }
+
+    @Override
+    public ResponseEntity<org.springframework.core.io.Resource> zipImages(Long id) {
+        TrackSequence entity = this.getById(id);
+        if (ObjectUtil.isNull(entity)) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+        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 if (BizConstant.AlgorithmType.TRAIN.equals(algorithmConfigTrack.getType())) {
+            outputPath = entity.getOutputPath();
+            zipFilePath = outputPath + ".zip";
+        } else {
+            System.out.println("未知算法类型!");
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+        File file = new File(zipFilePath);
+        if (!file.exists()) {
+            try {
+                ZipUtils.zipFolderFiles(outputPath, zipFilePath);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        if (!file.exists() || !file.isFile()) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
+        }
+
+        org.springframework.core.io.Resource resource = new FileSystemResource(file);
+        return ResponseEntity.ok()
+            .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"")
+            .header(HttpHeaders.CONTENT_TYPE, "application/octet-stream")
+            .body(resource);
+    }
+
+    @Override
+    public CommonResult getResult(TaskTrackResultBo taskTrackResultBo) {
+        Long id = taskTrackResultBo.getBizId();
+        String status = taskTrackResultBo.getStatus();
+        String msg = taskTrackResultBo.getMsg();
+        TrackSequence entity = getById(id);
+        entity.setLog(msg);
+        entity.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
+        entity.setEndTime(new Date());
+        try {
+            entity.setCostSecond((entity.getEndTime().getTime() - entity.getStartTime().getTime()) / 1000);
+        } catch (Exception e) {
+            entity.setCostSecond(null);
+        }
+        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);
+        }
+        return CommonResult.success();
+    }
+}

+ 16 - 16
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/VideoStableServiceImpl.java

@@ -171,11 +171,12 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
         if (!folder.exists()) {
             folder.mkdirs();
         } else {
-            try {
-                FileUtils.cleanDirectory(folder);
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
+            // 如果目录存在,则清空目录 (这个去掉)
+            // try {
+            //     FileUtils.cleanDirectory(folder);
+            // } catch (IOException e) {
+            //     throw new RuntimeException(e);
+            // }
         }
     }
 
@@ -238,17 +239,16 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
         updateById(videoStable);
 
         HttpResponseEntity responseEntity = sendPostMsg(video_stable_start_url, videoStable);
-        if (responseEntity.getStatus() == 200) {
+        if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
+            return CommonResult.success("任务开始成功,请等待完成");
+        } else {
             videoStable.setStatus(BizConstant.VideoStatus.FAILED);
             updateById(videoStable);
-            return CommonResult.success("任务开始成功,请等待完成");
-        }
-        else {
             return CommonResult.fail("任务开始失败,请检查!");
         }
     }
 
-    public HttpResponseEntity sendPostMsg(String url, Object obj) {
+    public static HttpResponseEntity sendPostMsg(String url, Object obj) {
         log.info("sendMsg: {} - {}", url, JsonUtils.toJsonString(obj));
 
         CloseableHttpClient httpClient = HttpClients.createDefault();
@@ -298,15 +298,15 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
 
         Path inputPath = null;
         Path outputPath = null;
-        String osName = System.getProperty("os.name");
+//        String osName = System.getProperty("os.name");
         // 判断是否是Windows环境
-        if (osName.toLowerCase().contains("windows")) {
-            inputPath = Paths.get("C:", videoStable.getInputPath());
-            outputPath = Paths.get("C:", videoStable.getOutputPath());
-        } else {
+//        if (osName.toLowerCase().contains("windows")) {
+//            inputPath = Paths.get("C:", videoStable.getInputPath());
+//            outputPath = Paths.get("C:", videoStable.getOutputPath());
+//        } else {
             inputPath = Paths.get(videoStable.getInputPath());
             outputPath = Paths.get(videoStable.getOutputPath());
-        }
+//        }
 
         // 创建File对象
         File in_directory = new File(inputPath.toString());

+ 22 - 6
taais-modules/taais-biz/src/main/java/com/taais/biz/utils/ZipUtils.java

@@ -24,13 +24,20 @@ public class ZipUtils {
 
         try (FileOutputStream fos = new FileOutputStream(zipFilePath);
              ZipOutputStream zos = new ZipOutputStream(fos)) {
+            zipDirectory(sourceFolder, "", zos);
+        }
+    }
 
-            File[] files = sourceFolder.listFiles();
-            if (files != null) {
-                for (File file : files) {
-                    if (file.isFile()) {
-                        zipFile(file, file.getName(), zos);
-                    }
+    private static void zipDirectory(File folder, String baseName, ZipOutputStream zos) throws IOException {
+        File[] files = folder.listFiles();
+        if (files != null) {
+            for (File file : files) {
+                if (file.isDirectory()) {
+                    // 递归处理子目录,更新基础名称
+                    zipDirectory(file, baseName + file.getName() + File.separator, zos);
+                } else {
+                    // 压缩文件,使用基础名称作为路径
+                    zipFile(file, baseName + file.getName(), zos);
                 }
             }
         }
@@ -102,4 +109,13 @@ public class ZipUtils {
         }
         return flag.get();
     }
+
+    public static void main(String[] args) {
+        try {
+            zipFolderFiles("C:\\home\\ObjectDetection_Web\\upload\\2024\\10\\12\\dataset_20241012115340A001_to_infrared",
+                "C:\\home\\ObjectDetection_Web\\upload\\2024\\10\\12\\dataset_20241012115340A001_to_infrared.zip");
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
 }

+ 6 - 0
taais-modules/taais-biz/src/main/resources/mapper/demo/AlgorithmConfigTrackMapper.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.taais.biz.mapper.AlgorithmConfigTrackMapper">
+</mapper>

+ 7 - 0
taais-modules/taais-biz/src/main/resources/mapper/demo/AlgorithmModelTrackMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.taais.biz.mapper.AlgorithmModelTrackMapper">
+
+</mapper>

+ 7 - 0
taais-modules/taais-biz/src/main/resources/mapper/demo/DataSeqMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.taais.biz.mapper.DataSeqMapper">
+
+</mapper>

+ 7 - 0
taais-modules/taais-biz/src/main/resources/mapper/demo/TargetDetectionMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.taais.biz.mapper.TargetDetectionMapper">
+
+</mapper>

+ 7 - 0
taais-modules/taais-biz/src/main/resources/mapper/demo/ToInfraredMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.taais.biz.mapper.ToInfraredMapper">
+
+</mapper>

+ 7 - 0
taais-modules/taais-biz/src/main/resources/mapper/demo/TrackSequenceMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.taais.biz.mapper.TrackSequenceMapper">
+
+</mapper>