|
@@ -39,6 +39,8 @@ import com.github.zuihou.tenant.service.CodeRuleService;
|
|
|
import com.github.zuihou.tenant.service.ProductionresourceService;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -55,6 +57,8 @@ import java.util.zip.ZipException;
|
|
|
@Slf4j
|
|
|
public class ToolRobotStrategy implements RobotStrategy {
|
|
|
|
|
|
+ private static Logger logger = LoggerFactory.getLogger(ToolRobotStrategy.class);
|
|
|
+
|
|
|
@Autowired
|
|
|
private ZZoneProductionresourceMapper zZoneProductionresourceMapper;
|
|
|
|
|
@@ -215,7 +219,7 @@ public class ToolRobotStrategy implements RobotStrategy {
|
|
|
|
|
|
if (ObjectUtil.isEmpty(targetStorge)) {
|
|
|
dataMap.put("result", false);
|
|
|
- dataMap.put("resultMsg", returnMap.containsKey("resultMsg")?returnMap.get("resultMsg") : "目标点位不满足or线边库不符合要求存放");
|
|
|
+ dataMap.put("resultMsg", returnMap.containsKey("resultMsg")?returnMap.get("resultMsg") : "目标点位不满足or线边库不符合要求存放or目标id是否为空2");
|
|
|
return dataMap;
|
|
|
}
|
|
|
String targetXbk = !returnMap.containsKey("targetxbk") ? null : returnMap.get("targetxbk").toString();
|
|
@@ -344,6 +348,8 @@ public class ToolRobotStrategy implements RobotStrategy {
|
|
|
if (ObjectUtil.isEmpty(cutToolAction)) {
|
|
|
this.CNCTActionHandle(taskNode, true, pointId, orderTask);
|
|
|
msgUtil.redis_set(DemoLineConstant.DEMOLINE_CUT_DEVICE_ACTION, taskNode.getId().toString());
|
|
|
+ returnMap.put("resultMsg","已下发机床取放刀标识");
|
|
|
+ logger.warn("已下发机床取放刀标识");
|
|
|
return null;
|
|
|
}else if(!cutToolAction.toString().equals(taskNode.getId().toString())){
|
|
|
// 判断是否为同一个任务
|
|
@@ -359,6 +365,7 @@ public class ToolRobotStrategy implements RobotStrategy {
|
|
|
}else {
|
|
|
resultData = "{\"taskID\":\"1930201875534053376\",\"taskNodeID\":\"1930201875861659650\",\"result\":\"true\",\"resultMsg\":\"已被下料请求占用,等待下料任务完成\",\"concurrency\":\"false\",\"data\":null,\"returnData\":null}\n";
|
|
|
}
|
|
|
+ logger.warn("调用getCutterDeviceIsPut反馈结果:"+ resultData);
|
|
|
|
|
|
JSONObject resultObj = JSONObject.parseObject(resultData);
|
|
|
resultMsg = resultObj.getString("resultMsg");
|
|
@@ -375,6 +382,8 @@ public class ToolRobotStrategy implements RobotStrategy {
|
|
|
returnMap.put("store", targetStorge);
|
|
|
returnMap.put("targetxbk", "0");
|
|
|
}else{
|
|
|
+ returnMap.put("resultMsg","targetList 集合为空");
|
|
|
+ logger.warn("targetList 集合为空");
|
|
|
xbkFlag = "1";
|
|
|
}
|
|
|
}
|