Merge remote-tracking branch 'origin/acs_dev' into acs_dev

This commit is contained in:
2025-09-11 13:19:36 +08:00
2 changed files with 8 additions and 2 deletions

View File

@@ -85,6 +85,8 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
String error_type = "agv_error_type";
private Instruction instruction;
private Boolean is_arrive_get = false;
private synchronized void setErrorInfo(int error, String error_code, String error_message) {
this.error = error;
this.error_code = error_code;
@@ -218,6 +220,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait"))
&& StrUtil.equals("true", device.getExtraValue().get("wait").toString())
&& StrUtil.equals(task.getTask_type(), "1")) {
this.is_arrive_get = true;
if (standardOrdinarySiteDeviceDriver.getOption() == 1) {
String task_code = standardOrdinarySiteDeviceDriver.getTask_code();
log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code);
@@ -307,6 +310,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
&& StrUtil.equals(task.getTask_type(), "1")) {
//
standardOrdinarySiteDeviceDriver.setOption(0);
this.is_arrive_get = false;
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
} else {
@@ -370,6 +374,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait"))
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString())
&& StrUtil.equals(task.getTask_type(), "1")) {
this.is_arrive_get = true;
if (standardOrdinarySiteDeviceDriver.getOption() == 1) {
standardOrdinarySiteDeviceDriver.setAgvphase(0);
String task_code = standardOrdinarySiteDeviceDriver.getTask_code();
@@ -436,6 +441,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString())
&& StrUtil.equals(task.getTask_type(), "1")) {
standardOrdinarySiteDeviceDriver.setOption(0);
this.is_arrive_get = false;
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
}

View File

@@ -1151,8 +1151,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
AgvNdcTwoDeviceDriver agvNdcTwoDeviceDriver;
if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver();
int phase = agvNdcTwoDeviceDriver.getPhase();
if (phase == 0x03 || phase == 0x05 || phase == 0x08) {
Boolean is_arrive_get = agvNdcTwoDeviceDriver.getIs_arrive_get();
if (is_arrive_get) {
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
Device device_k = deviceAppService.findDeviceByCode(device_code + "_K");
Device device_m = deviceAppService.findDeviceByCode(device_code + "_M");