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 | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 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 27cf26f..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
@@ -1,8 +1,7 @@
package com.ruoyi.inspect.controller;
-import com.ruoyi.common.annotation.Anonymous;
+
import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.inspect.domain.ArdVideoInspectTask;
import com.ruoyi.inspect.service.IArdVideoInspectTaskService;
import com.ruoyi.inspect.service.impl.InspectionTaskManager;
import io.swagger.annotations.Api;
@@ -13,12 +12,10 @@
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-
-import java.util.Map;
import java.util.Set;
/**
- * @Description: 宸℃浠诲姟
+ * @Description: 宸℃浠诲姟controller
* @ClassName: TaskController
* @Author: 鍒樿嫃涔�
* @Date: 2023骞�06鏈�01鏃�9:19
@@ -30,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