diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java index 9752976..10371b7 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java @@ -249,16 +249,20 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { log.info(agvaddr + "对应设备号为空!"); return; } + device = deviceAppService.findDeviceByCode(device_code); if (ObjectUtil.isNotEmpty(device)) { if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); - if (standardAutodoorDeviceDriver.getDoor() == 1) { + if(device_code.equals("AD1")||device_code.equals("AD2")||device_code.equals("AD3")||device_code.equals("AD4")) { + standardAutodoorDeviceDriver.writing("to_command", 1); + if (standardAutodoorDeviceDriver.getDoor() == 1) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + } else { + log.info("未下发NDC信号原因: 读取开门到位信号值为:{}", standardAutodoorDeviceDriver.getDoor()); + } + }else if(device_code.equals("AD5")||device_code.equals("AD6")||device_code.equals("AD7")||device_code.equals("AD8")||device_code.equals("AD9")) { standardAutodoorDeviceDriver.writing("to_command", 1); - } - if (standardAutodoorDeviceDriver.getTo_command() == 1) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - } else { - log.info("未下发NDC信号原因: 读取下发信号值为:{}", standardAutodoorDeviceDriver.getTo_command()); } } } else { @@ -270,8 +274,11 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { log.info(agvaddr + "对应设备号为空!"); return; } + device = deviceAppService.findDeviceByCode(device_code); if (ObjectUtil.isNotEmpty(device)) { + standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { + standardAutodoorDeviceDriver.writing("to_command", 2); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } } else { @@ -350,13 +357,13 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { dos.flush(); } catch (Exception e) { // TODO Auto-generated catch block - try { + try{ Thread.sleep(5000); log.info("再次下发agv数据:" + Bytes2HexString(b)); System.out.println("再次下发agv数据:" + Bytes2HexString(b)); dos.write(b); dos.flush(); - } catch (Exception e1) { + } catch (Exception e1){ e1.printStackTrace(); } diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index aadcd96..624fc41 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -1176,27 +1176,8 @@ public class InstructionServiceImpl extends CommonServiceImpl it = instructions.iterator(); - while (it.hasNext()) { - Instruction inst = it.next(); - // 处理空盘位站点 - String start_code = inst.getStart_point_code(); - if (start_code.indexOf(".") != -1) { - start_code = start_code.substring(0, start_code.indexOf(".")); - } - if (StrUtil.equals(devicecode, start_code)) { - num = num + 1; - } - } return num; } diff --git a/acs/nladmin-ui/.env.production b/acs/nladmin-ui/.env.production index 14155f9..402606c 100644 --- a/acs/nladmin-ui/.env.production +++ b/acs/nladmin-ui/.env.production @@ -2,6 +2,6 @@ ENV = 'production' # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http -VUE_APP_BASE_API = 'http://192.168.0.8:8011' +VUE_APP_BASE_API = 'http://10.200.172.67.8:8011' # 如果接口是 http 形式, wss 需要改为 ws -VUE_APP_WS_API = 'ws://192.168.0.8:8011' +VUE_APP_WS_API = 'ws://10.200.172.67:8011' diff --git a/acs/nladmin-ui/public/config.js b/acs/nladmin-ui/public/config.js index ca5cd6f..a64ed4b 100644 --- a/acs/nladmin-ui/public/config.js +++ b/acs/nladmin-ui/public/config.js @@ -1,9 +1,9 @@ window.g = { dev: { - VUE_APP_BASE_API: 'http://127.0.0.1:8011' + VUE_APP_BASE_API: 'http://10.200.172.67:8011' }, prod: { - VUE_APP_BASE_API: 'http://192.168.0.8:8011' + VUE_APP_BASE_API: 'http://10.200.172.67:8011' } }