|
|
@ -1469,6 +1469,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme |
|
|
|
if (CollectionUtil.isNotEmpty(frontInsts)) { |
|
|
|
frontInst = frontInsts.get(0); |
|
|
|
if (ObjectUtil.isNotEmpty(frontInst)) { |
|
|
|
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第一次查询到前叉指令号:" + frontInst.getInstruction_code())); |
|
|
|
String front_start_device_code = frontInst.getStart_device_code(); |
|
|
|
front_start_device = deviceAppService.findDeviceByCode(front_start_device_code); |
|
|
|
if (front_start_device != null) { |
|
|
@ -1503,6 +1504,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme |
|
|
|
if (ObjectUtil.isNotEmpty(inst)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
} else { |
|
|
|
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第二次查询到前叉指令号:" + frontInst.getInstruction_code())); |
|
|
|
if (frontInst.getTo_y() != null && (1 == Integer.parseInt(frontInst.getTo_y()) || 2 == Integer.parseInt(frontInst.getTo_y()))) { |
|
|
|
frontInst = null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1511,6 +1517,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme |
|
|
|
if (CollectionUtil.isNotEmpty(frontInsts)) { |
|
|
|
frontInst = frontInsts.get(0); |
|
|
|
if (ObjectUtil.isNotEmpty(frontInst)) { |
|
|
|
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第三次查询到前叉指令号:" + frontInst.getInstruction_code())); |
|
|
|
String front_start_device_code = frontInst.getStart_device_code(); |
|
|
|
front_start_device = deviceAppService.findDeviceByCode(front_start_device_code); |
|
|
|
if (front_start_device != null) { |
|
|
@ -1544,6 +1551,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme |
|
|
|
if (ObjectUtil.isNotEmpty(inst)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
}else { |
|
|
|
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第四次查询到前叉指令号:" + frontInst.getInstruction_code())); |
|
|
|
if (frontInst.getTo_y() != null && (1 == Integer.parseInt(frontInst.getTo_y()) || 2 == Integer.parseInt(frontInst.getTo_y()))) { |
|
|
|
frontInst = null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1972,7 +1984,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme |
|
|
|
} else if (StrUtil.equals(back_start_device_code, back_device_code)) { |
|
|
|
Boolean frontIsFront = Optional.ofNullable(front_device.getExtraValue().get("isFront")).map(Object::toString).map(Boolean::parseBoolean).orElse(false); |
|
|
|
Boolean backIsFront = Optional.ofNullable(back_device.getExtraValue().get("isFront")).map(Object::toString).map(Boolean::parseBoolean).orElse(false); |
|
|
|
if (frontIsFront && !backIsFront){ |
|
|
|
if (frontIsFront && !backIsFront) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
@ -2049,7 +2061,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme |
|
|
|
} else if (StrUtil.equals(back_next_device_code, back_device_code)) { |
|
|
|
Boolean frontIsFront = Optional.ofNullable(front_device.getExtraValue().get("isFront")).map(Object::toString).map(Boolean::parseBoolean).orElse(false); |
|
|
|
Boolean backIsFront = Optional.ofNullable(back_device.getExtraValue().get("isFront")).map(Object::toString).map(Boolean::parseBoolean).orElse(false); |
|
|
|
if (frontIsFront && !backIsFront){ |
|
|
|
if (frontIsFront && !backIsFront) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|