From 3302c9ba91e8d66ef2e10efce0f423bb2707b84f Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Mon, 24 Oct 2022 16:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../acs/agv/server/impl/AgvServiceImpl.java | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java index c6ee065..0661e9a 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java @@ -42,6 +42,7 @@ import org.nl.exception.BadRequestException; import org.nl.logger.BusinessLogger; import org.nl.start.auto.run.NDCSocketConnectionAutoRun; import org.nl.utils.SpringContextHolder; +import org.nl.wql.core.bean.WQLObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -266,21 +267,29 @@ public class AgvServiceImpl implements AgvService { String compound_inst_data = inst.getCompound_inst_data(); String[] str = null; List pathlist = null; - + WQLObject wo = WQLObject.getWQLObject("acs_device_extra"); if (StrUtil.equals("2", inst.getInstruction_type()) && !StrUtil.isEmpty(compound_inst_data)) { str = compound_inst_data.split("->"); pathlist = Arrays.asList(str); - for (int i = 0; i < pathlist.size(); i++) { String device_code = pathlist.get(i); Device device = deviceAppService.findDeviceByCode(device_code); if (ObjectUtil.isEmpty(device)) { throw new BadRequestException("未找到该设备【" + device_code + "】"); } + String inspect_in_stocck = device.getExtraValue().get("inspect_in_stocck").toString(); if (i == 0) { - ja.add(destination(device_code, "Load", "1", "1")); + if (!StrUtil.equals(inspect_in_stocck,"true")){ + ja.add(destination(device_code, "Load", "1", "1")); + } else { + ja.add(destination(device_code, "OP_PICK", "1", "1")); + } } else if (i == pathlist.size() - 1) { - ja.add(destination(device_code, "Unload", "1", "1")); + if (!StrUtil.equals(inspect_in_stocck,"true")){ + ja.add(destination(device_code, "Unload", "1", "1")); + } else { + ja.add(destination(device_code, "OP_DUMP", "1", "1")); + } } else { ja.add(destination(device_code, "OP_DUMP", "1", "4")); } @@ -571,7 +580,7 @@ public class AgvServiceImpl implements AgvService { if (result.getStatus() == 200) { arr.add(result.body()); } - } catch (Exception e ){ + } catch (Exception e) { e.printStackTrace(); } } @@ -876,7 +885,7 @@ public class AgvServiceImpl implements AgvService { yzjaSpecialDeviceDriver.setManua_confirm(0); inst.setExecute_status("1"); is_feedback = true; - } else if (ObjectUtil.isEmpty(inst.getExecute_status()) || !inst.getExecute_status().equals("1")){ + } else if (ObjectUtil.isEmpty(inst.getExecute_status()) || !inst.getExecute_status().equals("1")) { yzjaSpecialDeviceDriver.setManua_confirm(1); } } else { @@ -892,7 +901,7 @@ public class AgvServiceImpl implements AgvService { yzjaSpecialDeviceDriver.setManua_confirm(0); inst.setExecute_status("3"); is_feedback = true; - } else if (ObjectUtil.isEmpty(inst.getExecute_status()) || !inst.getExecute_status().equals("3")){ + } else if (ObjectUtil.isEmpty(inst.getExecute_status()) || !inst.getExecute_status().equals("3")) { yzjaSpecialDeviceDriver.setManua_confirm(1); } } else { @@ -1106,7 +1115,7 @@ public class AgvServiceImpl implements AgvService { //请求进 if (StrUtil.equals(type, "07") && address.endsWith("IQ")) { sandardManipulatorInspectSiteDeviceDriver.writing(1, 7); - if ( sandardManipulatorInspectSiteDeviceDriver.getIo_action() == 1 + if (sandardManipulatorInspectSiteDeviceDriver.getIo_action() == 1 || sandardManipulatorInspectSiteDeviceDriver.getIo_action() == 3) { is_feedback = true; }