|
|
@ -929,13 +929,15 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
//请求取货
|
|
|
|
if ("Load".equals(action)) { |
|
|
|
if(standardInspectSiteSmartDeviceDriver.getMode()>0 |
|
|
|
&& standardInspectSiteSmartDeviceDriver.getAction() == 3 && standardInspectSiteSmartDeviceDriver.getError()==0){ |
|
|
|
&& ( standardInspectSiteSmartDeviceDriver.getAction() == 3 || standardInspectSiteSmartDeviceDriver.getAction() == 1 ) |
|
|
|
&& standardInspectSiteSmartDeviceDriver.getError()==0){ |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
//请求放货
|
|
|
|
} else if ("Unload".equals(action)) { |
|
|
|
if(standardInspectSiteSmartDeviceDriver.getMode()>0 |
|
|
|
&& standardInspectSiteSmartDeviceDriver.getAction() == 3 && standardInspectSiteSmartDeviceDriver.getError()==0){ |
|
|
|
&& (standardInspectSiteSmartDeviceDriver.getAction() == 3 || standardInspectSiteSmartDeviceDriver.getAction() == 2 ) |
|
|
|
&& standardInspectSiteSmartDeviceDriver.getError()==0){ |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
} |
|
|
@ -981,46 +983,51 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
String apply_task = addressdevice.getExtraValue().get("apply_task").toString(); |
|
|
|
//取货完成
|
|
|
|
if ("Load".equals(action)) { |
|
|
|
//如果开启呼叫按钮,那么就需要判断进出动作信号
|
|
|
|
if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")) { |
|
|
|
if (standardInspectSiteSmartDeviceDriver.getMode() != 0 |
|
|
|
//&& standardInspectSiteSmartDeviceDriver.getMove() == 0
|
|
|
|
&& standardInspectSiteSmartDeviceDriver.getAction() == 3 |
|
|
|
&& standardInspectSiteSmartDeviceDriver.getIo_action() == 3) { |
|
|
|
inst.setExecute_device_code(processingVehicle); |
|
|
|
inst.setExecute_status("2"); |
|
|
|
standardInspectSiteSmartDeviceDriver.writing(2); |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
} else if (standardInspectSiteSmartDeviceDriver.getMode() != 0 |
|
|
|
// && standardInspectSiteSmartDeviceDriver.getMove() == 0
|
|
|
|
) { |
|
|
|
inst.setExecute_device_code(processingVehicle); |
|
|
|
inst.setExecute_status("2"); |
|
|
|
standardInspectSiteSmartDeviceDriver.writing(2); |
|
|
|
standardInspectSiteSmartDeviceDriver.setFlag(2); |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
|
|
|
|
//如果开启呼叫按钮,那么就需要判断进出动作信号
|
|
|
|
// if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")) {
|
|
|
|
// if (standardInspectSiteSmartDeviceDriver.getMode() != 0
|
|
|
|
// //&& standardInspectSiteSmartDeviceDriver.getMove() == 0
|
|
|
|
// && standardInspectSiteSmartDeviceDriver.getAction() == 3
|
|
|
|
// && standardInspectSiteSmartDeviceDriver.getIo_action() == 3) {
|
|
|
|
// inst.setExecute_device_code(processingVehicle);
|
|
|
|
// inst.setExecute_status("2");
|
|
|
|
// standardInspectSiteSmartDeviceDriver.writing(2);
|
|
|
|
// is_feedback = true;
|
|
|
|
// }
|
|
|
|
// } else if (standardInspectSiteSmartDeviceDriver.getMode() != 0
|
|
|
|
// // && standardInspectSiteSmartDeviceDriver.getMove() == 0
|
|
|
|
// ) {
|
|
|
|
// inst.setExecute_device_code(processingVehicle);
|
|
|
|
// inst.setExecute_status("2");
|
|
|
|
// standardInspectSiteSmartDeviceDriver.writing(2);
|
|
|
|
// is_feedback = true;
|
|
|
|
// }
|
|
|
|
//放货完成
|
|
|
|
} else if ("Unload".equals(action)) { |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")) { |
|
|
|
if (standardInspectSiteSmartDeviceDriver.getMode() != 0 |
|
|
|
// && standardInspectSiteSmartDeviceDriver.getMove() > 0
|
|
|
|
&& standardInspectSiteSmartDeviceDriver.getAction() == 3 |
|
|
|
&& standardInspectSiteSmartDeviceDriver.getIo_action() == 3) { |
|
|
|
inst.setExecute_device_code(address); |
|
|
|
inst.setExecute_status("4"); |
|
|
|
standardInspectSiteSmartDeviceDriver.writing(3); |
|
|
|
standardInspectSiteSmartDeviceDriver.setFlag(4); |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
} else if (standardInspectSiteSmartDeviceDriver.getMode() != 0 |
|
|
|
//&& standardInspectSiteSmartDeviceDriver.getMove() > 0
|
|
|
|
) { |
|
|
|
inst.setExecute_device_code(address); |
|
|
|
inst.setExecute_status("4"); |
|
|
|
standardInspectSiteSmartDeviceDriver.writing(3); |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
|
|
|
|
// if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")) {
|
|
|
|
// if (standardInspectSiteSmartDeviceDriver.getMode() != 0
|
|
|
|
// // && standardInspectSiteSmartDeviceDriver.getMove() > 0
|
|
|
|
// && standardInspectSiteSmartDeviceDriver.getAction() == 3
|
|
|
|
// && standardInspectSiteSmartDeviceDriver.getIo_action() == 3) {
|
|
|
|
// inst.setExecute_device_code(address);
|
|
|
|
// inst.setExecute_status("4");
|
|
|
|
// standardInspectSiteSmartDeviceDriver.writing(3);
|
|
|
|
// is_feedback = true;
|
|
|
|
// }
|
|
|
|
// } else if (standardInspectSiteSmartDeviceDriver.getMode() != 0
|
|
|
|
// //&& standardInspectSiteSmartDeviceDriver.getMove() > 0
|
|
|
|
// ) {
|
|
|
|
// inst.setExecute_device_code(address);
|
|
|
|
// inst.setExecute_status("4");
|
|
|
|
// standardInspectSiteSmartDeviceDriver.writing(3);
|
|
|
|
// is_feedback = true;
|
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@ -1369,6 +1376,7 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
Device addressdevice = appService.findDeviceByCode(address); |
|
|
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; |
|
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; |
|
|
|
StandardInspectSiteSmartDeviceDriver standardInspectSiteSmartDeviceDriver; |
|
|
|
StandardStorageDeviceDriver standardStorageDeviceDriver; |
|
|
|
//mes = AgvClientXZ.mes(zlbh, device, type);
|
|
|
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
|
|
@ -1413,6 +1421,52 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) { |
|
|
|
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
String apply_task = addressdevice.getExtraValue().get("apply_task").toString(); |
|
|
|
|
|
|
|
//取货完成请求离开
|
|
|
|
if (standardInspectSiteSmartDeviceDriver.getFlag() == 2) { |
|
|
|
//如果开启呼叫按钮,那么就需要判断进出动作信号
|
|
|
|
if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")) { |
|
|
|
if (standardInspectSiteSmartDeviceDriver.getMode() != 0 |
|
|
|
//&& standardInspectSiteSmartDeviceDriver.getMove() == 0
|
|
|
|
&& standardInspectSiteSmartDeviceDriver.getAction() == 3 |
|
|
|
&& standardInspectSiteSmartDeviceDriver.getIo_action() == 3) { |
|
|
|
|
|
|
|
standardInspectSiteSmartDeviceDriver.writing(2); |
|
|
|
flag = true; |
|
|
|
} |
|
|
|
} else if (standardInspectSiteSmartDeviceDriver.getMode() != 0 |
|
|
|
// && standardInspectSiteSmartDeviceDriver.getMove() == 0
|
|
|
|
) { |
|
|
|
|
|
|
|
standardInspectSiteSmartDeviceDriver.writing(2); |
|
|
|
flag = true; |
|
|
|
} |
|
|
|
} |
|
|
|
//放货完成请求离开
|
|
|
|
if (standardInspectSiteSmartDeviceDriver.getFlag() == 4) { |
|
|
|
//如果开启呼叫按钮,那么就需要判断进出动作信号
|
|
|
|
if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")) { |
|
|
|
if (standardInspectSiteSmartDeviceDriver.getMode() != 0 |
|
|
|
//&& standardInspectSiteSmartDeviceDriver.getMove() == 0
|
|
|
|
&& standardInspectSiteSmartDeviceDriver.getAction() == 3 |
|
|
|
&& standardInspectSiteSmartDeviceDriver.getIo_action() == 3) { |
|
|
|
|
|
|
|
standardInspectSiteSmartDeviceDriver.writing(2); |
|
|
|
flag = true; |
|
|
|
} |
|
|
|
} else if (standardInspectSiteSmartDeviceDriver.getMode() != 0 |
|
|
|
// && standardInspectSiteSmartDeviceDriver.getMove() == 0
|
|
|
|
) { |
|
|
|
|
|
|
|
standardInspectSiteSmartDeviceDriver.writing(2); |
|
|
|
flag = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (flag) { |
|
|
|
log.info("AGV请求离开,反馈成功:{}", address); |
|
|
|
System.out.println("AGV请求离开,反馈成功 " + address); |
|
|
|