|
@@ -7,15 +7,13 @@ import com.ruoyi.ams.tm.entity.TsDataResponse;
|
|
|
import com.ruoyi.ams.tm.entity.TsRequest;
|
|
|
import com.ruoyi.ams.tm.entity.TsTaskStateResponse;
|
|
|
import com.ruoyi.ams.tm.service.ITsTaskService;
|
|
|
+import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.taiye.service.ProcessService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
@@ -119,6 +117,20 @@ public class TsPostApiController {
|
|
|
return iTsTaskService.delOrderByAgvNo(agvNo);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据任务号取消任务
|
|
|
+ */
|
|
|
+ @ApiOperation("根据任务号取消任务")
|
|
|
+ @PostMapping("/delTask")
|
|
|
+ public AjaxResult delTask(String taskNo) {
|
|
|
+ WcsTask wcsTask = wcsTaskService.selectWcsTaskByTaskNo(taskNo);
|
|
|
+ if (wcsTask == null) {
|
|
|
+ AjaxResult.error("任务查询不存在");
|
|
|
+ }
|
|
|
+ wcsTaskService.delTaskByTM(wcsTask);
|
|
|
+ return AjaxResult.success("任务取消指令下发成功!");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* TS-创建充电任务
|
|
|
*/
|