From 44f2a0a32c096bdb05d4cc0ac162cdc1eb14c3ed Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期四, 10 八月 2023 13:14:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ard-work/src/main/java/com/ruoyi/inspect/controller/TaskController.java | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/inspect/controller/TaskController.java b/ard-work/src/main/java/com/ruoyi/inspect/controller/TaskController.java
index 5fb815a..c3ab320 100644
--- a/ard-work/src/main/java/com/ruoyi/inspect/controller/TaskController.java
+++ b/ard-work/src/main/java/com/ruoyi/inspect/controller/TaskController.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.inspect.service.IArdVideoInspectTaskService;
import com.ruoyi.inspect.service.impl.InspectionTaskManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -26,14 +27,24 @@
public class TaskController {
@Autowired
private InspectionTaskManager inspectionTaskManager;
-
+ @Autowired
+ IArdVideoInspectTaskService ardVideoInspectTaskService;
@PreAuthorize("@ss.hasPermi('inspect:control:manual')")
@GetMapping("/startTask/{taskId}")
@ApiOperation("鎵嬪姩寮�鍚贰妫�")
AjaxResult startTask(@PathVariable String taskId) {
- // 寮�鍚贰妫�浠诲姟
- inspectionTaskManager.startInspectionTask(taskId);
- return AjaxResult.success();
+ boolean enablemanualTask = ardVideoInspectTaskService.isEnablemanualTask(taskId);
+ if (enablemanualTask)
+ {
+ // 寮�鍚贰妫�浠诲姟
+ inspectionTaskManager.startInspectionTask(taskId);
+ return AjaxResult.success();
+ }
+ else
+ {
+ return AjaxResult.error();
+ }
+
}
@PreAuthorize("@ss.hasPermi('inspect:control:manual')")
--
Gitblit v1.9.3