Browse Source

fix: 修改天轨机器人执行方法

wang.sq@aliyun.com 5 months ago
parent
commit
0ba7ee442e

+ 5 - 4
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/mq/TaskWorkNode.java

@@ -581,9 +581,10 @@ public class TaskWorkNode {
                                                 log.setZoneId(zZone.getId()).setMethod(method).setExecuteTime(new Date()).
                                                 log.setZoneId(zZone.getId()).setMethod(method).setExecuteTime(new Date()).
                                                         setRequestAddress(instructionUrl).setRequestParameter(jsonParam).
                                                         setRequestAddress(instructionUrl).setRequestParameter(jsonParam).
                                                         setTaskNodeName(taskNode.getNodeName());
                                                         setTaskNodeName(taskNode.getNodeName());
+                                                //todo $需要换地址$
                                                 HttpEntity<String> formEntity = new HttpEntity<String>(rfidObj.toJSONString(), headers);
                                                 HttpEntity<String> formEntity = new HttpEntity<String>(rfidObj.toJSONString(), headers);
-                                                returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
-                                                //returnData = "{\"result\": \"true\"}";
+                                                //returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
+                                                returnData = "{\"result\": \"true\"}";
                                             } else {
                                             } else {
 
 
                                                 //起点、终点缓存。
                                                 //起点、终点缓存。
@@ -599,8 +600,8 @@ public class TaskWorkNode {
 
 
                                                 //todo $需要换地址$
                                                 //todo $需要换地址$
                                                 HttpEntity<String> formEntity = new HttpEntity<String>(jsonParam, headers);
                                                 HttpEntity<String> formEntity = new HttpEntity<String>(jsonParam, headers);
-                                                returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
-                                                //returnData = "{\"result\": \"true\"}";
+                                                //returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
+                                                returnData = "{\"result\": \"true\"}";
 
 
                                             }
                                             }
 
 

+ 7 - 6
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/strategy/impl/ToolRobotStrategy.java

@@ -138,8 +138,8 @@ public class ToolRobotStrategy implements RobotStrategy {
                 return null;
                 return null;
             }
             }
         }
         }
-        //todo $需要换地址$
-        bool = this.cutToolActionCondition("/api/getCutterDeviceIsTake", taskNode,pointId);
+        //todo 与ccs联调需要释放  $需要换地址$
+        //bool = this.cutToolActionCondition("/api/getCutterDeviceIsTake", taskNode,pointId);
 
 
         if(!bool){
         if(!bool){
             msgUtil.createWarnLog("刀具节点起始位取条件不满足","DataException");
             msgUtil.createWarnLog("刀具节点起始位取条件不满足","DataException");
@@ -209,7 +209,7 @@ public class ToolRobotStrategy implements RobotStrategy {
         locationMap.put("taskType", DictionaryKey.TASK_TYPE.get("CARRY"));
         locationMap.put("taskType", DictionaryKey.TASK_TYPE.get("CARRY"));
         locationMap.put("carryType", "1");
         locationMap.put("carryType", "1");
         returnMap.put("data", locationMap);
         returnMap.put("data", locationMap);
-        returnMap.put("method", "RobotAction");
+        returnMap.put("method", "CutterRobotAction");
         returnMap.put("result", true);
         returnMap.put("result", true);
         returnMap.put("fromStorge", startStorge);
         returnMap.put("fromStorge", startStorge);
         returnMap.put("toStorge", targetStorge);
         returnMap.put("toStorge", targetStorge);
@@ -257,7 +257,8 @@ public class ToolRobotStrategy implements RobotStrategy {
             }
             }
         }
         }
 
 
-        bool = this.cutToolActionCondition("/api/getCutterDeviceIsPut", taskNode,pointId);
+        //todo 与ccs联调需要释放  $需要换地址$
+        //bool = this.cutToolActionCondition("/api/getCutterDeviceIsPut", taskNode,pointId);
 
 
         if(!bool){
         if(!bool){
             msgUtil.createWarnLog("刀具节点目标位放置条件不满足","DataException");
             msgUtil.createWarnLog("刀具节点目标位放置条件不满足","DataException");
@@ -287,8 +288,8 @@ public class ToolRobotStrategy implements RobotStrategy {
     //机床刀具库条件判断处理
     //机床刀具库条件判断处理
     private void CNCTActionHandle(TaskNode taskNode, boolean isPut, String pointId, OrderTask orderTask){
     private void CNCTActionHandle(TaskNode taskNode, boolean isPut, String pointId, OrderTask orderTask){
         JSONObject cutToolObject = new JSONObject();
         JSONObject cutToolObject = new JSONObject();
-        cutToolObject.put("taskId", taskNode.getTaskId());
-        cutToolObject.put("taskNodeId", taskNode.getId());
+        cutToolObject.put("taskId", taskNode.getTaskId().toString());
+        cutToolObject.put("taskNodeId", taskNode.getId().toString());
         JSONObject cutToolData = new JSONObject();
         JSONObject cutToolData = new JSONObject();
         cutToolData.put("taskType", "1");
         cutToolData.put("taskType", "1");
         cutToolData.put("carryType", "1");
         cutToolData.put("carryType", "1");

+ 2 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/util/MsgUtil.java

@@ -692,7 +692,8 @@ public class MsgUtil implements ApplicationContextAware {
         logger.warn("调用CCS接口传参{}", jsonParam.toJSONString());
         logger.warn("调用CCS接口传参{}", jsonParam.toJSONString());
         String returnData = null;
         String returnData = null;
         try{
         try{
-            returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
+            //todo 与ccs联调需要释放  $需要换地址$
+            //returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
         }
         }
         catch(BizException ex){
         catch(BizException ex){
             logger.error("接口{}数据远程调用失败", instructionUrl);
             logger.error("接口{}数据远程调用失败", instructionUrl);