From 084d3b8cffe8d29361c3d74ff3cddf90001dc949 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Fri, 2 Oct 2026 11:34:07 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E9=80=9F=E9=94=90=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=83=BD=E5=8F=8D=E9=A6=88=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../suray/service/impl/SurayToAcsServiceImpl.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/extInterface/suray/service/impl/SurayToAcsServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/extInterface/suray/service/impl/SurayToAcsServiceImpl.java index 4808123..af3bfae 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/extInterface/suray/service/impl/SurayToAcsServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/extInterface/suray/service/impl/SurayToAcsServiceImpl.java @@ -58,13 +58,19 @@ public class SurayToAcsServiceImpl implements SurayToAcsService { instructionService.update(instruction); } } + if (2 == request.getTaskStatus()){ + if (instruction != null && instruction.instruction_status.equals("0")) { + instruction.setInstruction_status(InstructionStatusEnum.BUSY.getIndex()); + instructionService.update(instruction); + } + } if (8 == request.getTaskStatus()) { // 任务完成 if (instruction != null) { try { instructionService.finish(instruction.getInstruction_id()); } catch (Exception e) { - return TaskStatusReportResponse.failed(e.getMessage()); + return TaskStatusReportResponse.success(); } } } @@ -72,7 +78,7 @@ public class SurayToAcsServiceImpl implements SurayToAcsService { try { instructionService.cancel(instruction.getInstruction_id()); } catch (Exception e) { - return TaskStatusReportResponse.failed(e.getMessage()); + return TaskStatusReportResponse.success(); } } return TaskStatusReportResponse.success(); @@ -101,7 +107,7 @@ public class SurayToAcsServiceImpl implements SurayToAcsService { return response; } - Device device = deviceAppService.findDeviceByCode(request.getPointCode()); + Device device = deviceAppService.findDeviceByCode("1001"); if (device != null && device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) { BeltConveyorDeviceDriver driver = (BeltConveyorDeviceDriver) device.getDeviceDriver(); if (driver.getMove() == 0) {