|
|
@ -34,10 +34,7 @@ import org.nl.modules.system.service.ParamService; |
|
|
|
import org.nl.modules.system.service.impl.ParamServiceImpl; |
|
|
|
import org.nl.modules.wql.util.SpringContextHolder; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import static org.nl.acs.agv.server.impl.NDCAgvServiceImpl.Bytes2HexString; |
|
|
|
|
|
|
@ -100,9 +97,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
if (ikey != 0) { |
|
|
|
inst = instructionService.findByCodeFromCache(String.valueOf(ikey)); |
|
|
|
// if (ObjectUtil.isEmpty(inst)) {
|
|
|
|
// inst = instructionService.findByCode(String.valueOf(ikey));
|
|
|
|
// }
|
|
|
|
} |
|
|
|
if (!ObjectUtil.isEmpty(link_inst)) { |
|
|
|
link_flag = true; |
|
|
@ -121,14 +115,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
} |
|
|
|
|
|
|
|
//普通站点
|
|
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; |
|
|
|
//货架
|
|
|
|
StandardStorageDeviceDriver standardStorageDeviceDriver; |
|
|
|
//
|
|
|
|
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver; |
|
|
|
//自动门
|
|
|
|
StandardAutoDoorDeviceDriver standardAutoDoorDeviceDriver; |
|
|
|
|
|
|
|
//分配 车id
|
|
|
|
//(不需要WCS反馈)
|
|
|
@ -189,7 +175,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); |
|
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
|
if (resp.getJSONObject("payload").getInteger("status") == 200) { |
|
|
|
if (resp.getInteger("status") == 200) { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
log.info("指令号:{},acs请求wms取货申请成功,wms允许agv申请取货,已反馈agv允许取货", inst.getInstruction_code()); |
|
|
|
} else { |
|
|
@ -254,7 +240,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); |
|
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
|
if (resp.getJSONObject("payload").getInteger("status") == 200) { |
|
|
|
if (resp.getInteger("status") == 200) { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
log.info("指令号:{},acs反馈wms取货完成离开成功,wms允许agv取货完成离开,已反馈agv取货完成离开", inst.getInstruction_code()); |
|
|
|
} else { |
|
|
@ -316,7 +302,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); |
|
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
|
if (resp.getJSONObject("payload").getInteger("status") == 200) { |
|
|
|
if (resp.getInteger("status") == 200) { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code()); |
|
|
|
} else { |
|
|
@ -379,7 +365,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); |
|
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
|
if (resp.getJSONObject("payload").getInteger("status") == 200) { |
|
|
|
if (resp.getInteger("status") == 200) { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
log.info("指令号:{},acs请求wms放货完成申请成功,wms允许agv放货完成,已反馈agv放货完成", inst.getInstruction_code()); |
|
|
|
} else { |
|
|
@ -407,7 +393,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (!ObjectUtil.isEmpty(data)) { |
|
|
|
phase = 0; |
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + Bytes2HexString(data)); |
|
|
|
log.info("{},{}", device_code,"agvphase:" + phase + "反馈:" + Bytes2HexString(data)); |
|
|
|
log.info("{},{}", device_code, "agvphase:" + phase + "反馈:" + Bytes2HexString(data)); |
|
|
|
OneNDCSocketConnectionAutoRun.write(data); |
|
|
|
} |
|
|
|
} |
|
|
|