|
@ -155,8 +155,21 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
log.info("接收agv上报信息:" + "phase--" + phase + " index--" + index + " ikey--" + ikey + " agvaddr--" + agvaddr + " Car--" + carno); |
|
|
log.info("接收agv上报信息:" + "phase--" + phase + " index--" + index + " ikey--" + ikey + " agvaddr--" + agvaddr + " Car--" + carno); |
|
|
Device device = null; |
|
|
Device device = null; |
|
|
String device_code = null; |
|
|
String device_code = null; |
|
|
|
|
|
String old_device_code = null; |
|
|
|
|
|
|
|
|
|
|
|
if (agvaddr != 0) { |
|
|
|
|
|
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr); |
|
|
|
|
|
if (StrUtil.contains(old_device_code, "-")) { |
|
|
|
|
|
String[] point = old_device_code.split("-"); |
|
|
|
|
|
device_code = point[0]; |
|
|
|
|
|
} else if (StrUtil.contains(old_device_code, ".")) { |
|
|
|
|
|
String[] point = old_device_code.split("\\."); |
|
|
|
|
|
device_code = point[0]; |
|
|
|
|
|
} else { |
|
|
|
|
|
device_code = old_device_code; |
|
|
|
|
|
} |
|
|
|
|
|
device = deviceAppService.findDeviceByCode(device_code); |
|
|
|
|
|
} |
|
|
//
|
|
|
//
|
|
|
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver; |
|
|
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver; |
|
|
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver; |
|
|
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver; |
|
@ -243,8 +256,10 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { |
|
|
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { |
|
|
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); |
|
|
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); |
|
|
String is_enter = standardAutodoorDeviceDriver.getExtraValue().get("is_enter").toString(); |
|
|
String is_enter = standardAutodoorDeviceDriver.getExtraValue().get("is_enter").toString(); |
|
|
if (StrUtil.isNotBlank(is_enter) && !"true".equals(is_enter)) { |
|
|
if (StrUtil.isNotBlank(is_enter) && "false".equals(is_enter)) { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); |
|
|
|
|
|
} else { |
|
|
|
|
|
log.info("区域已锁定,请释放后在进入"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
@ -260,8 +275,10 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { |
|
|
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { |
|
|
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); |
|
|
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); |
|
|
String is_enter = standardAutodoorDeviceDriver.getExtraValue().get("is_enter").toString(); |
|
|
String is_enter = standardAutodoorDeviceDriver.getExtraValue().get("is_enter").toString(); |
|
|
if (StrUtil.isNotBlank(is_enter) && !"true".equals(is_enter)) { |
|
|
if (StrUtil.isNotBlank(is_enter) && "false".equals(is_enter)) { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); |
|
|
|
|
|
} else { |
|
|
|
|
|
log.info("区域已锁定,请释放后在进入"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|