From 54860951068d78d6e17626648ee7119e9018b205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?= Date: Thu, 12 Oct 2023 17:57:46 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BB=99=E5=B7=A5API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/server/impl/XianGongAgvServiceImpl.java | 8 ++++++-- .../auto/run/NDCSocketConnectionAutoRun.java | 5 ++++- acs/nladmin-system/src/main/resources/rebel.xml | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 acs/nladmin-system/src/main/resources/rebel.xml diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java index 5f8ac52..0252675 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java @@ -207,9 +207,13 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue(); String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue(); - agvurl = agvurl + ":" + agvport + "/api/route/transportOrders/" + instCode + "/withdrawal"; + JSONObject param = new JSONObject(); + param.put("id", instCode); + param.put("disableVehicle", false); + agvurl = agvurl + ":" + agvport + "/terminate"; log.info("删除agv指令请求agvurl:{}", agvurl); HttpResponse result = HttpRequest.post(agvurl) + .body(param.toJSONString()) .timeout(20000)//超时,毫秒 .execute(); log.info("删除agv指令请求反馈:{}", result); @@ -222,7 +226,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { @LokiLog(type = LokiLogType.AGV) @Override public HttpResponse sendOrderSequencesToXZ(Instruction inst) throws Exception { - com.alibaba.fastjson.JSONObject jo = new com.alibaba.fastjson.JSONObject(); + JSONObject jo = new JSONObject(); jo.put("id", inst.getInstruction_code()); jo.put("complete", true); jo.put("blocks", createBlocksData(inst)); diff --git a/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java index 2be3ad3..a264a7e 100644 --- a/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java @@ -70,8 +70,11 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { } public void autoRun() throws IOException { + if (!"2".equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue())) { + return; + } + System.out.println("1楼NDCAgv链接开始"); - ParamService ParamService = SpringContextHolder.getBean(ParamServiceImpl.class); InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); NDCAgvService NDCAgvService = SpringContextHolder.getBean(NDCAgvService.class); diff --git a/acs/nladmin-system/src/main/resources/rebel.xml b/acs/nladmin-system/src/main/resources/rebel.xml new file mode 100644 index 0000000..4719f5d --- /dev/null +++ b/acs/nladmin-system/src/main/resources/rebel.xml @@ -0,0 +1,16 @@ + + + + + + nladmin-system + + + + + + +