|
|
@ -169,19 +169,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
|
|
|
// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
|
|
|
// standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
|
|
|
// standardOrdinarySiteDeviceDriver.setIndex(index);
|
|
|
|
// standardOrdinarySiteDeviceDriver.setInst(inst);
|
|
|
|
// }
|
|
|
|
if (StrUtil.equals(inst.getStart_device_code(), device_code)) { |
|
|
|
String instruction_type = inst.getInstruction_type(); |
|
|
|
if (StrUtil.equals(instruction_type, "3") |
|
|
|
|| StrUtil.equals(instruction_type, "5") |
|
|
|
|| StrUtil.equals(instruction_type, "9") |
|
|
|
|| StrUtil.equals(instruction_type, "11") |
|
|
|
|| StrUtil.equals(instruction_type, "13")) { |
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver){ |
|
|
|
Object reqWms = device.getExtraValue().get("reqWms"); |
|
|
|
if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")){ |
|
|
|
JSONArray req = new JSONArray(); |
|
|
|
JSONObject map = new JSONObject(); |
|
|
|
map.put("vehicle_code", inst.getVehicle_code()); |
|
|
@ -201,9 +191,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} else { |
|
|
|
log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
log.info("指令号:{},acs不需要请求wms取货申请,已反馈agv允许取货", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} |
|
|
|
//取货完毕
|
|
|
@ -243,19 +230,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (StrUtil.equals(inst.getStart_device_code(), device_code)) { |
|
|
|
|
|
|
|
String instruction_type = inst.getInstruction_type(); |
|
|
|
if (StrUtil.equals(instruction_type, "2") |
|
|
|
|| StrUtil.equals(instruction_type, "3") |
|
|
|
|| StrUtil.equals(instruction_type, "4") |
|
|
|
|| StrUtil.equals(instruction_type, "5") |
|
|
|
|| StrUtil.equals(instruction_type, "6") |
|
|
|
|| StrUtil.equals(instruction_type, "8") |
|
|
|
|| StrUtil.equals(instruction_type, "9") |
|
|
|
|| StrUtil.equals(instruction_type, "10") |
|
|
|
|| StrUtil.equals(instruction_type, "11") |
|
|
|
|| StrUtil.equals(instruction_type, "13")) { |
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver){ |
|
|
|
Object reqWms = device.getExtraValue().get("reqWms"); |
|
|
|
if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")){ |
|
|
|
JSONArray req = new JSONArray(); |
|
|
|
JSONObject map = new JSONObject(); |
|
|
|
map.put("vehicle_code", inst.getVehicle_code()); |
|
|
@ -275,9 +252,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} else { |
|
|
|
log.warn("指令号:{},acs反馈wms取货完成失败,连接被拒绝,未反馈agv取货完成", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
log.info("指令号:{},acs不需要反馈wms取货完成,已反馈agv取货完成", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} |
|
|
|
//到达放货点
|
|
|
@ -313,11 +287,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
log.info("未找到关联编号{}对应的指令", ikey); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (StrUtil.equals(inst.getNext_device_code(), device_code)) { |
|
|
|
String instruction_type = inst.getInstruction_type(); |
|
|
|
if (StrUtil.equals(instruction_type, "2") |
|
|
|
|| StrUtil.equals(instruction_type, "4") |
|
|
|
|| StrUtil.equals(instruction_type, "8")) { |
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver){ |
|
|
|
Object reqWms = device.getExtraValue().get("reqWms"); |
|
|
|
if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")){ |
|
|
|
JSONArray req = new JSONArray(); |
|
|
|
JSONObject map = new JSONObject(); |
|
|
|
map.put("vehicle_code", inst.getVehicle_code()); |
|
|
@ -337,12 +309,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} else { |
|
|
|
log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
log.info("指令号:{},acs不需要请求wms放货申请,已反馈agv允许放货", inst.getInstruction_code()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//放货完毕
|
|
|
|
//(需要WCS反馈)
|
|
|
|
} else if (phase == 0x09) { |
|
|
|