|
@ -25,6 +25,7 @@ import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceD |
|
|
import org.nl.acs.device_driver.standard_inspect_site_smart200.StandardInspectSiteSmartDeviceDriver; |
|
|
import org.nl.acs.device_driver.standard_inspect_site_smart200.StandardInspectSiteSmartDeviceDriver; |
|
|
import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver; |
|
|
import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver; |
|
|
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; |
|
|
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; |
|
|
|
|
|
import org.nl.acs.device_driver.standard_special_inspect_site.StandardSpecialInspectSiteDeviceDriver; |
|
|
import org.nl.acs.device_driver.standard_storage.StandardStorageDeviceDriver; |
|
|
import org.nl.acs.device_driver.standard_storage.StandardStorageDeviceDriver; |
|
|
import org.nl.acs.device_driver.weighing_site.WeighingSiteDeviceDriver; |
|
|
import org.nl.acs.device_driver.weighing_site.WeighingSiteDeviceDriver; |
|
|
import org.nl.acs.device_driver.ykbk_special.YkbkSpecialDeviceDriver; |
|
|
import org.nl.acs.device_driver.ykbk_special.YkbkSpecialDeviceDriver; |
|
@ -810,6 +811,7 @@ public class AgvServiceImpl implements AgvService { |
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
Device addressdevice = appService.findDeviceByCode(address); |
|
|
Device addressdevice = appService.findDeviceByCode(address); |
|
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; |
|
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; |
|
|
|
|
|
StandardSpecialInspectSiteDeviceDriver standardSpecialInspectSiteDeviceDriver; |
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; |
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; |
|
|
SpecialOrdinarySiteDeviceDriver specialOrdinarySiteDeviceDriver; |
|
|
SpecialOrdinarySiteDeviceDriver specialOrdinarySiteDeviceDriver; |
|
|
YzjaSpecialDeviceDriver yzjaSpecialDeviceDriver; |
|
|
YzjaSpecialDeviceDriver yzjaSpecialDeviceDriver; |
|
@ -835,6 +837,32 @@ public class AgvServiceImpl implements AgvService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardSpecialInspectSiteDeviceDriver) { |
|
|
|
|
|
standardSpecialInspectSiteDeviceDriver = (StandardSpecialInspectSiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
|
|
//请求取货
|
|
|
|
|
|
if ("Load".equals(action)) { |
|
|
|
|
|
if (standardSpecialInspectSiteDeviceDriver.getMode() == 2 && standardSpecialInspectSiteDeviceDriver.getMove() > 0) { |
|
|
|
|
|
if(standardSpecialInspectSiteDeviceDriver.getAction()> 0){ |
|
|
|
|
|
inst.setExecute_status("1"); |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
standardSpecialInspectSiteDeviceDriver.writing(1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//请求放货
|
|
|
|
|
|
} else if ("Unload".equals(action)) { |
|
|
|
|
|
if (standardSpecialInspectSiteDeviceDriver.getMode() == 2 && standardSpecialInspectSiteDeviceDriver.getMove() == 0) { |
|
|
|
|
|
if(standardSpecialInspectSiteDeviceDriver.getAction()>0){ |
|
|
|
|
|
inst.setExecute_status("1"); |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
standardSpecialInspectSiteDeviceDriver.writing(1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof SpecialOrdinarySiteDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof SpecialOrdinarySiteDeviceDriver) { |
|
|
specialOrdinarySiteDeviceDriver = (SpecialOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
specialOrdinarySiteDeviceDriver = (SpecialOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
//请求取货
|
|
|
//请求取货
|
|
@ -1010,6 +1038,22 @@ public class AgvServiceImpl implements AgvService { |
|
|
is_feedback = true; |
|
|
is_feedback = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardSpecialInspectSiteDeviceDriver) { |
|
|
|
|
|
standardSpecialInspectSiteDeviceDriver = (StandardSpecialInspectSiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
|
|
//取货完成
|
|
|
|
|
|
if ("Load".equals(action)) { |
|
|
|
|
|
inst.setExecute_device_code(processingVehicle); |
|
|
|
|
|
inst.setExecute_status("2"); |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
//放货完成
|
|
|
|
|
|
} else if ("Unload".equals(action)) { |
|
|
|
|
|
inst.setExecute_device_code(address); |
|
|
|
|
|
inst.setExecute_status("4"); |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
//取货完成
|
|
|
//取货完成
|
|
|
if ("Load".equals(action)) { |
|
|
if ("Load".equals(action)) { |
|
@ -1327,6 +1371,7 @@ public class AgvServiceImpl implements AgvService { |
|
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; |
|
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; |
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; |
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; |
|
|
StandardStorageDeviceDriver standardStorageDeviceDriver; |
|
|
StandardStorageDeviceDriver standardStorageDeviceDriver; |
|
|
|
|
|
StandardSpecialInspectSiteDeviceDriver standardSpecialInspectSiteDeviceDriver; |
|
|
//mes = AgvClientXZ.mes(zlbh, device, type);
|
|
|
//mes = AgvClientXZ.mes(zlbh, device, type);
|
|
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
|
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
|
|
if ((addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver)) { |
|
|
if ((addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver)) { |
|
@ -1370,6 +1415,21 @@ public class AgvServiceImpl implements AgvService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardSpecialInspectSiteDeviceDriver) { |
|
|
|
|
|
standardSpecialInspectSiteDeviceDriver = (StandardSpecialInspectSiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
|
|
//取货完成离开
|
|
|
|
|
|
if (standardSpecialInspectSiteDeviceDriver.getFlag() == 2) { |
|
|
|
|
|
flag = true; |
|
|
|
|
|
standardSpecialInspectSiteDeviceDriver.setFlag(5); |
|
|
|
|
|
} |
|
|
|
|
|
//放货完成离开
|
|
|
|
|
|
if (standardSpecialInspectSiteDeviceDriver.getFlag() == 4) { |
|
|
|
|
|
flag = true; |
|
|
|
|
|
standardSpecialInspectSiteDeviceDriver.setFlag(6); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (flag) { |
|
|
if (flag) { |
|
|
log.info("AGV请求离开,反馈成功:{}", address); |
|
|
log.info("AGV请求离开,反馈成功:{}", address); |
|
|
System.out.println("AGV请求离开,反馈成功 " + address); |
|
|
System.out.println("AGV请求离开,反馈成功 " + address); |
|
|