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