|
@ -742,12 +742,14 @@ public class AgvServiceImpl implements AgvService { |
|
|
if ("Load".equals(action)) { |
|
|
if ("Load".equals(action)) { |
|
|
if (lnshStationDeviceDriver.getMode() == 2 && lnshStationDeviceDriver.getMove() > 0) { |
|
|
if (lnshStationDeviceDriver.getMode() == 2 && lnshStationDeviceDriver.getMove() > 0) { |
|
|
inst.setExecute_status("1"); |
|
|
inst.setExecute_status("1"); |
|
|
|
|
|
lnshStationDeviceDriver.setFlag(1); |
|
|
is_feedback = true; |
|
|
is_feedback = true; |
|
|
} |
|
|
} |
|
|
//请求放货
|
|
|
//请求放货
|
|
|
} else if ("Unload".equals(action)) { |
|
|
} else if ("Unload".equals(action)) { |
|
|
if (lnshStationDeviceDriver.getMode() == 2 && lnshStationDeviceDriver.getMove() == 0) { |
|
|
if (lnshStationDeviceDriver.getMode() == 2 && lnshStationDeviceDriver.getMove() == 0) { |
|
|
inst.setExecute_status("3"); |
|
|
inst.setExecute_status("3"); |
|
|
|
|
|
lnshStationDeviceDriver.setFlag(3); |
|
|
is_feedback = true; |
|
|
is_feedback = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -769,23 +771,6 @@ public class AgvServiceImpl implements AgvService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//晟华码垛机械手
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof LnshPalletizingManipulatorDeviceDriver) { |
|
|
|
|
|
lnshPalletizingManipulatorDeviceDriver = (LnshPalletizingManipulatorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
|
|
//请求取货
|
|
|
|
|
|
if ("Load".equals(action)) { |
|
|
|
|
|
if (lnshPalletizingManipulatorDeviceDriver.getMode() == 2) { |
|
|
|
|
|
inst.setExecute_status("1"); |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} |
|
|
|
|
|
//请求放货
|
|
|
|
|
|
} else if ("Unload".equals(action)) { |
|
|
|
|
|
if (lnshPalletizingManipulatorDeviceDriver.getMode() == 2) { |
|
|
|
|
|
inst.setExecute_status("3"); |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof SpecialOrdinarySiteDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof SpecialOrdinarySiteDeviceDriver) { |
|
|
specialOrdinarySiteDeviceDriver = (SpecialOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
specialOrdinarySiteDeviceDriver = (SpecialOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
//请求取货
|
|
|
//请求取货
|
|
@ -862,6 +847,7 @@ public class AgvServiceImpl implements AgvService { |
|
|
if (lnshStationDeviceDriver.getMode() == 2 && lnshStationDeviceDriver.getMove() == 0) { |
|
|
if (lnshStationDeviceDriver.getMode() == 2 && lnshStationDeviceDriver.getMove() == 0) { |
|
|
inst.setExecute_device_code(processingVehicle); |
|
|
inst.setExecute_device_code(processingVehicle); |
|
|
inst.setExecute_status("2"); |
|
|
inst.setExecute_status("2"); |
|
|
|
|
|
lnshStationDeviceDriver.setFlag(2); |
|
|
is_feedback = true; |
|
|
is_feedback = true; |
|
|
} |
|
|
} |
|
|
//放货完成
|
|
|
//放货完成
|
|
@ -869,6 +855,7 @@ public class AgvServiceImpl implements AgvService { |
|
|
if (lnshStationDeviceDriver.getMode() == 2 && lnshStationDeviceDriver.getMove() > 0) { |
|
|
if (lnshStationDeviceDriver.getMode() == 2 && lnshStationDeviceDriver.getMove() > 0) { |
|
|
inst.setExecute_device_code(address); |
|
|
inst.setExecute_device_code(address); |
|
|
inst.setExecute_status("4"); |
|
|
inst.setExecute_status("4"); |
|
|
|
|
|
lnshStationDeviceDriver.setFlag(4); |
|
|
is_feedback = true; |
|
|
is_feedback = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -892,25 +879,6 @@ public class AgvServiceImpl implements AgvService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//晟华码垛机械手
|
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof LnshPalletizingManipulatorDeviceDriver) { |
|
|
|
|
|
lnshPalletizingManipulatorDeviceDriver = (LnshPalletizingManipulatorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
|
|
|
//取货完成
|
|
|
|
|
|
if ("Load".equals(action)) { |
|
|
|
|
|
if (lnshPalletizingManipulatorDeviceDriver.getMode() == 2) { |
|
|
|
|
|
inst.setExecute_device_code(processingVehicle); |
|
|
|
|
|
inst.setExecute_status("2"); |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} |
|
|
|
|
|
//放货完成
|
|
|
|
|
|
} else if ("Unload".equals(action)) { |
|
|
|
|
|
if (lnshPalletizingManipulatorDeviceDriver.getMode() == 2) { |
|
|
|
|
|
inst.setExecute_device_code(address); |
|
|
|
|
|
inst.setExecute_status("4"); |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
//取货完成
|
|
|
//取货完成
|
|
@ -1294,21 +1262,22 @@ public class AgvServiceImpl implements AgvService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public String requestOpenOrCloseDoor(String device, String param) { |
|
|
public String requestOpenOrCloseDoor(String device_code, String param) { |
|
|
log.info("AGV请求开关门参数,设备:{},参数:{}", device, param); |
|
|
log.info("AGV请求开关门参数,设备:{},参数:{}", device_code, param); |
|
|
int type = Integer.parseInt(acsConfigService.findConfigFromCache().get(AcsConfig.BUSINESSTYPE)); |
|
|
int type = Integer.parseInt(acsConfigService.findConfigFromCache().get(AcsConfig.BUSINESSTYPE)); |
|
|
switch (type) { |
|
|
switch (type) { |
|
|
case 4: |
|
|
case 4: |
|
|
acsToWmsService.applyOpenOrCloseDoor(device, param); |
|
|
acsToWmsService.applyOpenOrCloseDoor(device_code, param); |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
StandardAutodoorDeviceDriver autodoor; |
|
|
StandardAutodoorDeviceDriver autodoor; |
|
|
Device doordevice = deviceAppService.findDeviceByCode(device); |
|
|
LnshStationDeviceDriver lnshStationDeviceDriver; |
|
|
if (ObjectUtil.isEmpty(doordevice)) { |
|
|
Device device = deviceAppService.findDeviceByCode(device_code); |
|
|
|
|
|
if (ObjectUtil.isEmpty(device)) { |
|
|
throw new BadRequestException("未找到对应设备"); |
|
|
throw new BadRequestException("未找到对应设备"); |
|
|
} |
|
|
} |
|
|
if (doordevice.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { |
|
|
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { |
|
|
autodoor = (StandardAutodoorDeviceDriver) doordevice.getDeviceDriver(); |
|
|
autodoor = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); |
|
|
if (StrUtil.equals("open", param)) { |
|
|
if (StrUtil.equals("open", param)) { |
|
|
autodoor.OpenOrClose("1"); |
|
|
autodoor.OpenOrClose("1"); |
|
|
log.info("下发开门请求"); |
|
|
log.info("下发开门请求"); |
|
@ -1318,6 +1287,17 @@ public class AgvServiceImpl implements AgvService { |
|
|
log.info("下发关门请求"); |
|
|
log.info("下发关门请求"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (device.getDeviceDriver() instanceof LnshStationDeviceDriver) { |
|
|
|
|
|
lnshStationDeviceDriver = (LnshStationDeviceDriver) device.getDeviceDriver(); |
|
|
|
|
|
if (StrUtil.equals("open", param)) { |
|
|
|
|
|
lnshStationDeviceDriver.OpenOrClose("1"); |
|
|
|
|
|
log.info("下发进入区域"); |
|
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals("close", param)) { |
|
|
|
|
|
lnshStationDeviceDriver.OpenOrClose("2"); |
|
|
|
|
|
log.info("下发离开区域"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|