|
|
@ -825,17 +825,19 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
//请求取货
|
|
|
|
if ("Load".equals(action)) { |
|
|
|
standardInspectSiteDeviceDriver.setFlag(1); |
|
|
|
standardInspectSiteDeviceDriver.writing(1); |
|
|
|
if (standardInspectSiteDeviceDriver.getMode() == 2 && standardInspectSiteDeviceDriver.getMove() > 0 |
|
|
|
&& (standardInspectSiteDeviceDriver.getAction() == 1 || standardInspectSiteDeviceDriver.getAction() == 3)) { |
|
|
|
&& standardInspectSiteDeviceDriver.getAction() == 1) { |
|
|
|
inst.setExecute_status("1"); |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
//请求放货
|
|
|
|
} else if ("Unload".equals(action)) { |
|
|
|
standardInspectSiteDeviceDriver.setFlag(3); |
|
|
|
standardInspectSiteDeviceDriver.writing(3); |
|
|
|
if (standardInspectSiteDeviceDriver.getMode() == 2 && standardInspectSiteDeviceDriver.getMove() == 0 |
|
|
|
&& (standardInspectSiteDeviceDriver.getAction() == 2 || standardInspectSiteDeviceDriver.getAction() == 3)) { |
|
|
|
&& standardInspectSiteDeviceDriver.getAction() == 1) { |
|
|
|
inst.setExecute_status("3"); |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
@ -973,26 +975,24 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
} else if ("onStation".equals(type)) { |
|
|
|
|
|
|
|
System.out.println("取放货完成"); |
|
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
//取货完成
|
|
|
|
if ("Load".equals(action)) { |
|
|
|
standardInspectSiteDeviceDriver.writing(2); |
|
|
|
if (standardInspectSiteDeviceDriver.getMode() == 2 && standardInspectSiteDeviceDriver.getMove() == 0) { |
|
|
|
inst.setExecute_device_code(processingVehicle); |
|
|
|
inst.setExecute_status("2"); |
|
|
|
standardInspectSiteDeviceDriver.setFlag(2); |
|
|
|
inst.setExecute_status("1"); |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
//放货完成
|
|
|
|
} else if ("Unload".equals(action)) { |
|
|
|
standardInspectSiteDeviceDriver.writing(4); |
|
|
|
if (standardInspectSiteDeviceDriver.getMode() == 2 && standardInspectSiteDeviceDriver.getMove() > 0) { |
|
|
|
inst.setExecute_device_code(address); |
|
|
|
inst.setExecute_status("4"); |
|
|
|
if (standardInspectSiteDeviceDriver.getMode() == 2 && standardInspectSiteDeviceDriver.getMove() != 0) { |
|
|
|
standardInspectSiteDeviceDriver.setFlag(4); |
|
|
|
inst.setExecute_status("3"); |
|
|
|
is_feedback = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) { |
|
|
|
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
@ -1386,18 +1386,21 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
flag = true; |
|
|
|
log.info("agvstatus:" + standardInspectSiteDeviceDriver.getFlag() + ""); |
|
|
|
//取货完成离开
|
|
|
|
if (standardInspectSiteDeviceDriver.getFlag() == 2) { |
|
|
|
if (standardInspectSiteDeviceDriver.getMove() == 0) { |
|
|
|
if (standardInspectSiteDeviceDriver.getFlag() == 1 || standardInspectSiteDeviceDriver.getFlag() == 2) { |
|
|
|
standardInspectSiteDeviceDriver.writing(2); |
|
|
|
if (standardInspectSiteDeviceDriver.getMode() != 0 |
|
|
|
&& standardInspectSiteDeviceDriver.getMove() == 0) { |
|
|
|
flag = true; |
|
|
|
standardInspectSiteDeviceDriver.setFlag(5); |
|
|
|
} |
|
|
|
} |
|
|
|
//放货完成离开
|
|
|
|
if (standardInspectSiteDeviceDriver.getFlag() == 4) { |
|
|
|
if (standardInspectSiteDeviceDriver.getMove() == 1) { |
|
|
|
if (standardInspectSiteDeviceDriver.getFlag() == 3 || standardInspectSiteDeviceDriver.getFlag() == 4) { |
|
|
|
standardInspectSiteDeviceDriver.writing(4); |
|
|
|
if (standardInspectSiteDeviceDriver.getMode() != 0 |
|
|
|
&& standardInspectSiteDeviceDriver.getMove() != 0) { |
|
|
|
flag = true; |
|
|
|
standardInspectSiteDeviceDriver.setFlag(6); |
|
|
|
} |
|
|
|