|
@@ -16,18 +16,18 @@ public class ManualTaskOperatorUtil {
|
|
|
* 上位机系统地址
|
|
|
*/
|
|
|
// private static String hostSyetemUrl = "http://192.168.170.240:8090";
|
|
|
- private static String hostSyetemUrl = "http://192.168.10.155:63570/";
|
|
|
+ private static String hostSyetemUrl = "http://192.168.170.248:8081/";
|
|
|
|
|
|
/**
|
|
|
* agv运输
|
|
|
*/
|
|
|
private static String agvURL = "http://localhost:9099/api/authority/mock/mockWms";
|
|
|
//质量中心
|
|
|
- private static String ZK_ip_zlzx = "192.168.170.61";
|
|
|
+ private static String ZK_ip_zlzx = "192.168.170.130";
|
|
|
//柔性
|
|
|
- private static String ZK_ip_rxx = "192.168.170.71";
|
|
|
- //智能单元
|
|
|
- private static String ZK_ip_zndy = "192.168.170.81";
|
|
|
+ private static String ZK_ip_rxx = "192.168.170.170";
|
|
|
+ //智能单元(舱体)
|
|
|
+ private static String ZK_ip_zndy = "192.168.170.150";
|
|
|
|
|
|
// 质量中心PLC端口
|
|
|
private static String ZK_ip_zlzx_port = "102";
|
|
@@ -107,27 +107,27 @@ public class ManualTaskOperatorUtil {
|
|
|
// 舱体(智能单元) 代码先写死,6个动作,后续根据resource_code表中获取
|
|
|
// 执行第一个任务
|
|
|
int currentIndex = 0;
|
|
|
- String taskType = robotNoMoveTaskNodes.get(currentIndex);
|
|
|
+ String taskType = robotTaskNodes.get(currentIndex);
|
|
|
int nextTaskNodeIndex = currentIndex +1;
|
|
|
if("move".equals(taskType)){
|
|
|
String hostSyetemTaskUrl = hostSyetemUrl + "/api/MoveRobotPosition";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
- setProcessInfo(robotNoMoveTaskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
+ setProcessInfo(robotTaskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}
|
|
|
- if(nextTaskNodeIndex < robotNoMoveTaskNodes.size() -1){
|
|
|
- manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex + 1);
|
|
|
+ if(nextTaskNodeIndex < robotTaskNodes.size() -1){
|
|
|
+ manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex);
|
|
|
}
|
|
|
}else if("framework".equals(unit)){
|
|
|
int currentIndex = 0;
|
|
|
- String taskType = robotNoMoveTaskNodes.get(currentIndex);
|
|
|
+ String taskType = robotTaskNodes.get(currentIndex);
|
|
|
int nextTaskNodeIndex = currentIndex +1;
|
|
|
if("move".equals(taskType)){
|
|
|
String hostSyetemTaskUrl = hostSyetemUrl + "/api/MoveRobotPosition";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
- setProcessInfo(robotNoMoveTaskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
+ setProcessInfo(robotTaskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}
|
|
|
- if(nextTaskNodeIndex < robotNoMoveTaskNodes.size() -1){
|
|
|
- manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex + 1);
|
|
|
+ if(nextTaskNodeIndex < robotTaskNodes.size() -1){
|
|
|
+ manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex);
|
|
|
}
|
|
|
}else if("safeguard".equals(unit)){
|
|
|
// 保障平台(质量中心) 代码先写死,6个动作,后续根据resource_code表中获取
|
|
@@ -136,7 +136,7 @@ public class ManualTaskOperatorUtil {
|
|
|
String taskType = robotNoMoveTaskNodes.get(currentIndex);
|
|
|
int nextTaskNodeIndex = currentIndex +1;
|
|
|
if("get".equals(taskType)){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetServoStacker";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(robotNoMoveTaskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}
|
|
@@ -211,11 +211,11 @@ public class ManualTaskOperatorUtil {
|
|
|
deviceUrl = ZK_ip_zndy;
|
|
|
devicePort = ZK_ip_zndy_port;
|
|
|
}else if("framework".equals(unit)){
|
|
|
- deviceUrl = ZK_ip_zndy;
|
|
|
- devicePort = ZK_ip_zndy_port;
|
|
|
+ deviceUrl = ZK_ip_rxx;
|
|
|
+ devicePort = ZK_ip_rxx_port;
|
|
|
}else if("safeguard".equals(unit)){
|
|
|
- deviceUrl = ZK_ip_zndy;
|
|
|
- devicePort = ZK_ip_zndy_port;
|
|
|
+ deviceUrl = ZK_ip_zlzx;
|
|
|
+ devicePort = ZK_ip_zlzx_port;
|
|
|
}
|
|
|
|
|
|
if("general".equals(manualType)){
|
|
@@ -228,41 +228,41 @@ public class ManualTaskOperatorUtil {
|
|
|
// 舱体(柔性线) 代码先写死,6个动作,后续根据resource_code表中获取
|
|
|
// 执行第一个任务
|
|
|
if("get".equals(taskType) && currentIndex == 1){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetFlexibleWire";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}else if("put".equals(taskType) && currentIndex == 2){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
|
|
|
- productionresourcePositions = productionresourcePositions.stream().filter(p->null == p.getGoodsId()).collect(toList());
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendFlexibleWire";
|
|
|
+ productionresourcePositions = productionresourcePositions.stream().filter(p->null == p.getGoodsId() && "1".equals(p.getLockStatus())).collect(toList());
|
|
|
|
|
|
- String location = productionresourcePositions.get(0).getStorgeId().toString();
|
|
|
+ String location = productionresourcePositions.get(0).getPointId().toString();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}else if("move".equals(taskType) && currentIndex == 3){
|
|
|
String hostSyetemTaskUrl = hostSyetemUrl + "/api/MoveRobotPosition";
|
|
|
// 查找设备机器人
|
|
|
- productionresourcePositions = productionresourcePositions.stream().filter(p->null == p.getGoodsId()).collect(toList());
|
|
|
+ productionresourcePositions = productionresourcePositions.stream().filter(p->null == p.getGoodsId() && "1".equals(p.getLockStatus())).collect(toList());
|
|
|
|
|
|
String location = manualInfo.getEndpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}if("get".equals(taskType) && currentIndex == 4){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
|
|
|
- productionresourcePositions = productionresourcePositions.stream().filter(p->null != p.getGoodsId()).collect(toList());
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetFlexibleWire";
|
|
|
+ productionresourcePositions = productionresourcePositions.stream().filter(p->null == p.getGoodsId()).collect(toList());
|
|
|
|
|
|
- String location = productionresourcePositions.get(0).getStorgeId().toString();
|
|
|
+ String location = productionresourcePositions.get(0).getPointId().toString();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}else if("put".equals(taskType) && currentIndex == 5){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendFlexibleWire";
|
|
|
String location = manualInfo.getEndpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}
|
|
|
manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex);
|
|
|
}else if(taskNodes.size() == 3 && currentIndex == 1){
|
|
|
if("get".equals(taskType) ){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetFlexibleWire";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}else if("put".equals(taskType) && currentIndex == 2){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendFlexibleWire";
|
|
|
String location = manualInfo.getEndpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}
|
|
@@ -276,11 +276,11 @@ public class ManualTaskOperatorUtil {
|
|
|
// 舱体(柔性线) 代码先写死,6个动作,后续根据resource_code表中获取
|
|
|
// 执行第一个任务
|
|
|
if("get".equals(taskType) && currentIndex == 1){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetFlexibleWire";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}else if("put".equals(taskType) && currentIndex == 2){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendFlexibleWire";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}else if("move".equals(taskType) && currentIndex == 3){
|
|
@@ -288,22 +288,22 @@ public class ManualTaskOperatorUtil {
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}if("get".equals(taskType) && currentIndex == 4){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetFlexibleWire";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}else if("put".equals(taskType) && currentIndex == 5){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendFlexibleWire";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}
|
|
|
manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex);
|
|
|
}else if(taskNodes.size() == 3){
|
|
|
if("get".equals(taskType) && currentIndex == 1){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetFlexibleWire";
|
|
|
String location = manualInfo.getStartpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}else if("put".equals(taskType) && currentIndex == 2){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendFlexibleWire";
|
|
|
String location = manualInfo.getEndpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}
|
|
@@ -315,7 +315,7 @@ public class ManualTaskOperatorUtil {
|
|
|
// 保障平台(质量中心)
|
|
|
// 执行第一个任务
|
|
|
if("put".equals(taskType)){
|
|
|
- String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
|
|
|
+ String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendServoStacker";
|
|
|
String location = manualInfo.getEndpointId();
|
|
|
setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
|
|
|
}
|