|
@@ -2,7 +2,16 @@ package com.taais.biz.controller;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.taais.biz.domain.bo.AlgorithmConfigBo;
|
|
|
+import com.taais.biz.domain.bo.AlgorithmModelBo;
|
|
|
+import com.taais.biz.domain.bo.DataBo;
|
|
|
import com.taais.biz.domain.dto.task.CreateTaskDto;
|
|
|
+import com.taais.biz.domain.vo.AlgorithmConfigVo;
|
|
|
+import com.taais.biz.domain.vo.AlgorithmModelVo;
|
|
|
+import com.taais.biz.domain.vo.DataVo;
|
|
|
+import com.taais.biz.service.IAlgorithmConfigService;
|
|
|
+import com.taais.biz.service.IAlgorithmModelService;
|
|
|
+import com.taais.biz.service.IDataService;
|
|
|
import com.taais.common.core.utils.StringUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
@@ -35,6 +44,12 @@ import com.taais.common.core.core.page.PageResult;
|
|
|
public class AlgorithmTaskController extends BaseController {
|
|
|
@Resource
|
|
|
private IAlgorithmTaskService algorithmTaskService;
|
|
|
+ @Resource
|
|
|
+ private DataController dataController;
|
|
|
+ @Resource
|
|
|
+ private IAlgorithmConfigService algorithmConfigService;
|
|
|
+ @Resource
|
|
|
+ private IAlgorithmModelService modelService;
|
|
|
|
|
|
/**
|
|
|
* 查询算法任务列表
|
|
@@ -49,7 +64,7 @@ public class AlgorithmTaskController extends BaseController {
|
|
|
* 导出算法任务列表
|
|
|
*/
|
|
|
@SaCheckPermission("task:task:export")
|
|
|
- @Log(title = "算法任务", businessType = BusinessType.EXPORT)
|
|
|
+ @Log(title = "算法任务导出", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
public void export(HttpServletResponse response, AlgorithmTaskBo algorithmTaskBo) {
|
|
|
List<AlgorithmTaskVo> list = algorithmTaskService.selectList(algorithmTaskBo);
|
|
@@ -119,8 +134,37 @@ public class AlgorithmTaskController extends BaseController {
|
|
|
public CommonResult<Void> create(@Validated @RequestBody CreateTaskDto taskDto) {
|
|
|
String string = algorithmTaskService.create(taskDto);
|
|
|
if (StringUtils.isNotEmpty(string)) {
|
|
|
- return CommonResult.fail("新增算法任务记录失败!");
|
|
|
+ return CommonResult.fail("新增算法任务记录失败!失败圆晕:"+string);
|
|
|
}
|
|
|
return CommonResult.success();
|
|
|
}
|
|
|
+
|
|
|
+ @SaCheckPermission("task:task:add")
|
|
|
+ @Log(title = "算法任务/获取图像", businessType = BusinessType.INSERT)
|
|
|
+ @RepeatSubmit()
|
|
|
+ @PostMapping("/getImage")
|
|
|
+ public CommonResult<PageResult<DataVo>> getImage(@Validated @RequestBody DataBo data) {
|
|
|
+ return dataController.list(data);
|
|
|
+ }
|
|
|
+
|
|
|
+ @SaCheckPermission("task:task:add")
|
|
|
+ @Log(title = "算法任务/获取算法", businessType = BusinessType.INSERT)
|
|
|
+ @RepeatSubmit()
|
|
|
+ @PostMapping("/getAlgorithm/{type}/{subsystem}")
|
|
|
+ public CommonResult<List<AlgorithmConfigVo>> getAlgorithm(@PathVariable String type, @PathVariable String subsystem) {
|
|
|
+ AlgorithmConfigBo algorithmConfigBo = new AlgorithmConfigBo();
|
|
|
+ algorithmConfigBo.setType(type);
|
|
|
+ algorithmConfigBo.setSubsystem(subsystem);
|
|
|
+ return CommonResult.success(algorithmConfigService.selectList(algorithmConfigBo));
|
|
|
+ }
|
|
|
+
|
|
|
+ @SaCheckPermission("task:task:add")
|
|
|
+ @Log(title = "算法任务/获取模型", businessType = BusinessType.INSERT)
|
|
|
+ @RepeatSubmit()
|
|
|
+ @PostMapping("/getModel/{algorithmId}")
|
|
|
+ public CommonResult<List<AlgorithmModelVo>> getModel(@PathVariable Long algorithmId) {
|
|
|
+ AlgorithmModelBo algorithmModel = new AlgorithmModelBo();
|
|
|
+ algorithmModel.setAlgorithmId(algorithmId);
|
|
|
+ return CommonResult.success(modelService.selectList(algorithmModel));
|
|
|
+ }
|
|
|
}
|