fix: 修复路线锁定逻辑,添加校验物料信息逻辑
This commit is contained in:
@@ -155,8 +155,21 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
log.info("接收agv上报信息:" + "phase--" + phase + " index--" + index + " ikey--" + ikey + " agvaddr--" + agvaddr + " Car--" + carno);
|
||||
Device device = 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;
|
||||
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
|
||||
@@ -243,8 +256,10 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||
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);
|
||||
} else {
|
||||
log.info("区域已锁定,请释放后在进入");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -260,8 +275,10 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||
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);
|
||||
} else {
|
||||
log.info("区域已锁定,请释放后在进入");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -685,6 +685,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
.set("0".equals(param.getString("status")),DeviceExtra::getExtra_value, "false")
|
||||
.set("1".equals(param.getString("status")),DeviceExtra::getExtra_value, "true")
|
||||
);
|
||||
Device deviceByCode = deviceAppService.findDeviceByCode(point);
|
||||
deviceByCode.getExtraValue().put("is_enter", "1".equals(param.getString("status"))?"true":"false");
|
||||
});
|
||||
} else {
|
||||
deviceExtraService.update(Wrappers.lambdaUpdate(DeviceExtra.class)
|
||||
@@ -694,6 +696,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
.set("0".equals(param.getString("status")),DeviceExtra::getExtra_value, "false")
|
||||
.set("1".equals(param.getString("status")),DeviceExtra::getExtra_value, "true")
|
||||
);
|
||||
Device deviceByCode = deviceAppService.findDeviceByCode(pointCode);
|
||||
deviceByCode.getExtraValue().put("is_enter", "1".equals(param.getString("status"))?"true":"false");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user