|
|
@ -111,7 +111,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (arr[18] * 256 + arr[19] == 0) { |
|
|
|
|
|
|
|
} |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
} |
|
|
|
|
|
|
|
//普通站点
|
|
|
@ -179,7 +179,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
|
if (resp.getInteger("status") == 200) { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
log.info("指令号:{},acs请求wms取货申请成功,wms允许agv申请取货,已反馈agv允许取货", inst.getInstruction_code()); |
|
|
|
} else { |
|
|
|
log.warn("指令号:{},acs请求wms取货申请成功,wms不允许agv申请取货,未反馈agv允许取货", inst.getInstruction_code()); |
|
|
@ -188,8 +188,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
} |
|
|
|
//到达取货等待点
|
|
|
|
//(需要WCS反馈)
|
|
|
|
} else if (phase == 0x04) { |
|
|
|
//取货完毕
|
|
|
|
//(需要WCS反馈)
|
|
|
|
} else if (phase == 0x05) { |
|
|
@ -240,7 +243,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
|
if (resp.getInteger("status") == 200) { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
log.info("指令号:{},acs反馈wms取货完成成功,wms允许agv取货完成,已反馈agv取货完成", inst.getInstruction_code()); |
|
|
|
} else { |
|
|
|
log.warn("指令号:{},acs反馈wms取货完成成功,wms不允许agv取货完成,未反馈agv取货完成", inst.getInstruction_code()); |
|
|
@ -249,8 +252,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
log.warn("指令号:{},acs反馈wms取货完成失败,连接被拒绝,未反馈agv取货完成", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
} |
|
|
|
//到达放货等待点
|
|
|
|
//(需要WCS反馈)
|
|
|
|
} else if (phase == 0x06) { |
|
|
|
//到达放货点
|
|
|
|
//(需要WCS反馈)
|
|
|
|
} else if (phase == 0x07) { |
|
|
@ -297,7 +303,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
|
if (resp.getInteger("status") == 200) { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code()); |
|
|
|
} else { |
|
|
|
log.warn("指令号:{},acs请求wms放货申请成功,wms不允许agv申请放货,未反馈agv允许放货", inst.getInstruction_code()); |
|
|
@ -306,7 +312,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
} |
|
|
|
//放货完毕
|
|
|
|
//(需要WCS反馈)
|
|
|
@ -353,13 +359,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
req.add(map); |
|
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); |
|
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code()); |
|
|
|
} else { |
|
|
|
log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
} |
|
|
|
} |
|
|
|
//到达位置点
|
|
|
@ -368,13 +374,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
//1、根据货位id找到对应三工位设备,赋给agv属性地址对应的满料位设备
|
|
|
|
agvaddr = arr[18] * 256 + arr[19]; |
|
|
|
agvaddr_copy = agvaddr; |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
|
} else if (phase == 0x50) {//进入交通灯区域
|
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
|
} else if (phase == 0x51) {//离开交通灯区域
|
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0); |
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
|
} |
|
|
|
if (!ObjectUtil.isEmpty(data)) { |
|
|
|