From 5afce451141f88c3f05c9dbc621e682660e82a01 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Thu, 27 Oct 2022 14:59:11 +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 | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 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 0661e9a..4e15f7c 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 @@ -277,19 +277,10 @@ public class AgvServiceImpl implements AgvService { if (ObjectUtil.isEmpty(device)) { throw new BadRequestException("未找到该设备【" + device_code + "】"); } - String inspect_in_stocck = device.getExtraValue().get("inspect_in_stocck").toString(); if (i == 0) { - 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")); - } + ja.add(destination(device_code, "Load", "1", "1")); } else if (i == pathlist.size() - 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")); } @@ -348,10 +339,26 @@ public class AgvServiceImpl implements AgvService { //orderjo.put("intendedVehicle", ""); //设置任务最终时间 orderjo.put("deadline", getNextDay(1)); + Object start_inspect_in_stocck = startdevice.getExtraValue().get("inspect_in_stocck"); + if (ObjectUtil.isEmpty(start_inspect_in_stocck)){ + start_inspect_in_stocck = "false"; + } //拼接起点子任务动作,待完善,动作码需要从数据库取值 - ja.add(destination(startAddress, "Load", "1", "1")); - //拼接终点子任务动作,待完善,动作码需要从数据库取值 - ja.add(destination(nextAddress, "Unload", "1", "1")); + if (start_inspect_in_stocck.toString().equals("true")){ + ja.add(destination(startAddress, "OP_PICK", "1", "1")); + }else { + ja.add(destination(startAddress, "Load", "1", "1")); + } + Object next_inspect_in_stocck = nextdevice.getExtraValue().get("inspect_in_stocck"); + if (ObjectUtil.isEmpty(next_inspect_in_stocck)){ + next_inspect_in_stocck = "false"; + } + if (next_inspect_in_stocck.toString().equals("true")){ + ja.add(destination(nextAddress, "OP_DUMP", "1", "1")); + }else { + //拼接终点子任务动作,待完善,动作码需要从数据库取值 + ja.add(destination(nextAddress, "Unload", "1", "1")); + } orderjo.put("destinations", ja);