From 948fca334815eac0ea84406fec48e915dabe9649 Mon Sep 17 00:00:00 2001 From: psh Date: Sat, 28 Oct 2023 20:58:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=83=85=E5=86=B5=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=AE=8C=E6=88=90=E6=8C=87=E4=BB=A4=E6=97=B6=E4=B8=8A?= =?UTF-8?q?=E9=80=81wms=E4=BB=BB=E5=8A=A1=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InstructionServiceImpl.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index 97bd083..456805d 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpResponse; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; @@ -24,6 +25,8 @@ import org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanne import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver; import org.nl.acs.ext.wms.liKuData.*; import org.nl.acs.ext.wms.service.AcsToLiKuService; +import org.nl.acs.ext.wms.service.AcsToWmsService; +import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.opc.Device; @@ -81,6 +84,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu TaskService taskService; @Autowired AcsToLiKuService acsToLiKuService; + @Autowired + AcsToWmsService acsToWmsService; @Override public void autoInitial() { @@ -712,6 +717,17 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu } } + //异常情况手动完成指令时上送wms任务完成 + JSONObject map = new JSONObject(); + map.put("uuid", IdUtil.simpleUUID()); + map.put("taskNo", entity.getTask_code()); + map.put("businessType", "ARRIVE_TO_POINT"); + map.put("containerNo",entity.getVehicle_code()); + map.put("deviceNo",entity.getCarno()); + try (HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(map)) { + log.info("指令号:{},agv异常情况手动完成指令,上送wms任务完成", entity.getInstruction_code()); + } + removeByCodeFromCache(entity.getInstruction_code()); // this.reload(); }