|
|
@ -15,6 +15,7 @@ import org.nl.acs.config.server.AcsConfigService; |
|
|
|
import org.nl.acs.device.service.DeviceService; |
|
|
|
import org.nl.acs.device.service.impl.DeviceServiceImpl; |
|
|
|
import org.nl.acs.device_driver.agv_site.AgvSiteDeviceDriver; |
|
|
|
import org.nl.acs.device_driver.lamp_three_color.LampThreecolorDeviceDriver; |
|
|
|
import org.nl.acs.device_driver.machines_site.MachinesSiteDeviceDriver; |
|
|
|
import org.nl.acs.device_driver.magic3.Magic3DeviceDriver; |
|
|
|
import org.nl.acs.device_driver.ndxy_special_two.NdxySpecialTwoDeviceDriver; |
|
|
@ -1348,6 +1349,7 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
break; |
|
|
|
default: |
|
|
|
StandardAutodoorDeviceDriver autodoor; |
|
|
|
LampThreecolorDeviceDriver lampThreecolorDeviceDriver; |
|
|
|
Device doordevice = deviceAppService.findDeviceByCode(device); |
|
|
|
if (ObjectUtil.isEmpty(doordevice)) { |
|
|
|
throw new BadRequestException("未找到对应设备"); |
|
|
@ -1363,6 +1365,17 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
log.info("下发关门请求"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (doordevice.getDeviceDriver() instanceof LampThreecolorDeviceDriver) { |
|
|
|
lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) doordevice.getDeviceDriver(); |
|
|
|
if (StrUtil.equals("open", param)) { |
|
|
|
lampThreecolorDeviceDriver.OpenOrClose("3"); |
|
|
|
log.info("下发红灯"); |
|
|
|
|
|
|
|
} else if (StrUtil.equals("close", param)) { |
|
|
|
lampThreecolorDeviceDriver.OpenOrClose("2"); |
|
|
|
log.info("下发绿灯"); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
@ -1400,6 +1413,22 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
JSONObject jo = JSONObject.fromObject(mes); |
|
|
|
ja.add(jo); |
|
|
|
} |
|
|
|
|
|
|
|
List<Device> list2 = deviceAppService.findDevice(DeviceType.三色灯); |
|
|
|
for (int i = 0; i < list.size(); i++) { |
|
|
|
Device doordevice = deviceAppService.findDeviceByCode(list.get(i).getDevice_code()); |
|
|
|
if (ObjectUtil.isEmpty(doordevice)) { |
|
|
|
throw new BadRequestException("未找到对应设备"); |
|
|
|
} |
|
|
|
String mes = null; |
|
|
|
LampThreecolorDeviceDriver lampThreecolorDeviceDriver; |
|
|
|
if (doordevice.getDeviceDriver() instanceof LampThreecolorDeviceDriver) { |
|
|
|
lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) doordevice.getDeviceDriver(); |
|
|
|
mes = lampThreecolorDeviceDriver.getStatus(); |
|
|
|
} |
|
|
|
JSONObject jo = JSONObject.fromObject(mes); |
|
|
|
ja.add(jo); |
|
|
|
} |
|
|
|
log.info("AGV查询自动门状态,反馈:{}", ja.toString()); |
|
|
|
return ja.toString(); |
|
|
|
|
|
|
@ -1414,6 +1443,11 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
autodoor = (StandardAutodoorDeviceDriver) doordevice.getDeviceDriver(); |
|
|
|
mes = autodoor.getStatus(); |
|
|
|
} |
|
|
|
LampThreecolorDeviceDriver lampThreecolorDeviceDriver; |
|
|
|
if (doordevice.getDeviceDriver() instanceof LampThreecolorDeviceDriver) { |
|
|
|
lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) doordevice.getDeviceDriver(); |
|
|
|
mes = lampThreecolorDeviceDriver.getStatus(); |
|
|
|
} |
|
|
|
JSONObject jo = JSONObject.fromObject(mes); |
|
|
|
log.info("AGV查询自动门状态,反馈:{}", jo.toString()); |
|
|
|
return jo.toString(); |
|
|
@ -1440,6 +1474,21 @@ public class AgvServiceImpl implements AgvService { |
|
|
|
JSONObject jo = JSONObject.fromObject(mes); |
|
|
|
ja.add(jo); |
|
|
|
} |
|
|
|
List<Device> list2 = deviceAppService.findDevice(DeviceType.三色灯); |
|
|
|
for (int i = 0; i < list2.size(); i++) { |
|
|
|
Device doordevice = deviceAppService.findDeviceByCode(list2.get(i).getDevice_code()); |
|
|
|
if (ObjectUtil.isEmpty(doordevice)) { |
|
|
|
throw new BadRequestException("未找到对应设备"); |
|
|
|
} |
|
|
|
String mes = null; |
|
|
|
LampThreecolorDeviceDriver lampThreecolorDeviceDriver; |
|
|
|
if (doordevice.getDeviceDriver() instanceof LampThreecolorDeviceDriver) { |
|
|
|
lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) doordevice.getDeviceDriver(); |
|
|
|
mes = lampThreecolorDeviceDriver.getStatus(); |
|
|
|
} |
|
|
|
JSONObject jo = JSONObject.fromObject(mes); |
|
|
|
ja.add(jo); |
|
|
|
} |
|
|
|
log.info("AGV查询全部自动门状态,反馈:{}", ja.toString()); |
|
|
|
return ja.toString(); |
|
|
|
} |
|
|
|