From b641cf71573bd920880c8b6397024378e6a169d5 Mon Sep 17 00:00:00 2001 From: tuqiang <437016993@qq.com> Date: Sat, 14 Sep 2024 17:36:35 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E4=BC=98=E5=8C=96=E6=89=8B=E6=8C=81?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E4=BB=BB=E5=8A=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/ndctwo/AgvNdcTwoDeviceDriver.java | 10 ++++++++++ .../main/java/org/nl/hand/dto/B2HeadDto.java | 15 +++------------ .../main/java/org/nl/hand/dto/HeadDto.java | 2 +- .../org/nl/hand/rest/B2HandController.java | 2 +- .../hand/service/impl/B2HandServiceImpl.java | 19 +++---------------- .../nl/hand/service/impl/HandServiceImpl.java | 2 +- 6 files changed, 19 insertions(+), 31 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java index 4c375b9..c2ea864 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java @@ -243,6 +243,15 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic .build(); logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); + } else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ + standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); } else { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() @@ -252,6 +261,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); } + } // 取货完毕 diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/dto/B2HeadDto.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/dto/B2HeadDto.java index 2988dec..5edf56e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/dto/B2HeadDto.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/dto/B2HeadDto.java @@ -13,25 +13,16 @@ public class B2HeadDto implements Serializable { /** * 起始设备编码1 */ - private String start_device_code1; + private String start_device_code; /** * 目标设备编码1 */ - private String next_device_code1; + private String next_device_code; - /** - * 起始设备编码2 - */ - private String start_device_code2; - - /** - * 目标设备编码2 - */ - private String next_device_code2; /** * 任务类型 */ - private String task_type; + private String type; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/dto/HeadDto.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/dto/HeadDto.java index 35bc4b7..1bd4dbe 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/dto/HeadDto.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/dto/HeadDto.java @@ -24,6 +24,6 @@ public class HeadDto implements Serializable { /** * 任务类型 */ - private String task_type; + private String type; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/rest/B2HandController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/rest/B2HandController.java index 8d1c518..08526be 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/rest/B2HandController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/rest/B2HandController.java @@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequiredArgsConstructor @Api(tags = "手持接口") -@RequestMapping("api/hands") +@RequestMapping("api/task") @Slf4j public class B2HandController { @Autowired diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/B2HandServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/B2HandServiceImpl.java index ee9b95d..70ad95b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/B2HandServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/B2HandServiceImpl.java @@ -47,11 +47,9 @@ public class B2HandServiceImpl implements B2HandService { @Override public Map callTask(B2HeadDto dto) { JSONArray errArr = new JSONArray(); - String start_device_code = dto.getStart_device_code1(); - String next_device_code = dto.getNext_device_code1(); - String start_device_code2 = dto.getStart_device_code2(); - String next_device_code2 = dto.getNext_device_code2(); - String task_type = dto.getTask_type(); + String start_device_code = dto.getStart_device_code(); + String next_device_code = dto.getNext_device_code(); + String task_type = dto.getType(); if (StrUtil.isEmpty(start_device_code)) { throw new BadRequestException("起点1不能为空"); @@ -64,17 +62,6 @@ public class B2HandServiceImpl implements B2HandService { } JSONObject jo = new JSONObject(); - if (StrUtil.equals(task_type, CommonFinalParam.TYPE_ONE)) { - jo.put("start_device_code2", start_device_code2); - jo.put("next_device_code2", next_device_code2); - jo.put("start_point_code2", start_device_code2); - jo.put("next_point_code2", next_device_code2); - } else if (StrUtil.equals(task_type, CommonFinalParam.TYPE_TWO)) { - jo.put("start_device_code2", start_device_code2); - jo.put("next_device_code2", next_device_code2); - jo.put("start_point_code2", start_device_code2); - jo.put("next_point_code2", next_device_code2); - } jo.put("start_device_code", start_device_code); jo.put("next_device_code", next_device_code); jo.put("start_point_code", start_device_code); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java index f036ed8..8d4b28c 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java @@ -118,7 +118,7 @@ public class HandServiceImpl implements HandService { JSONArray errArr = new JSONArray(); String start_device_code = dto.getStart_device_code(); String next_device_code = dto.getNext_device_code(); - String task_type = dto.getTask_type(); + String task_type = dto.getType(); if (StrUtil.isEmpty(start_device_code)) { throw new BadRequestException("起点不能为空");