wudingsheng 3 mesi fa
parent
commit
fa68a741b7

+ 26 - 0
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/ToolbarController.java

@@ -167,6 +167,32 @@ public class ToolbarController {
         return R.success();
     }
 
+    @ApiOperation(value = "取消ccs任务", notes = "取消ccs任务")
+    @PostMapping("/cancelCCS")
+    public R cancelCCS(@RequestBody Map<String, String> data) {
+
+        String taskNodeId = data.containsKey("taskNodeId")? data.get("taskNodeId").toString() : null;
+
+
+        if(StringUtils.isEmpty(taskNodeId)) return R.fail("数据传参为空");
+
+        JSONObject param = new JSONObject();
+        param.put("taskNodeId",taskNodeId);
+
+
+        String result = msgUtil.httpForPost(CCS_URL + "cancelCCS",param.toJSONString());
+        //String result ="{\"result\": \"true\"}";
+        if(StringUtil.isNotEmpty(result)){
+            cn.hutool.json.JSONObject returnJson = JSONUtil.parseObj(result);
+            if (returnJson.get("result") !=null &&"true".equals(returnJson.get("result"))) {
+                return R.success(returnJson.get("msg").toString());
+            }else{
+                throw BizException.wrap(BASE_VALID_PARAM.build("CCS接口调用失败:" + returnJson.get("msg")));
+            }
+        }
+        return R.success();
+    }
+
     @ApiOperation(value = "机器人更新库位位置", notes = "机器人更新库位位置")
     @PostMapping("/updateStorgeByRobot")
     public R updateStorgeByRobot(@RequestBody Map<String, String> data) {