Browse Source

add agv自动门驱动

master
zhoujj 1 week ago
parent
commit
a5d2768a90
  1. 15
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java
  2. 32
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
  3. 4
      acs/nladmin-ui/.env.production
  4. 4
      acs/nladmin-ui/public/config.js

15
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.getTo_command() == 1) {
if (standardAutodoorDeviceDriver.getDoor() == 1) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
} else {
log.info("未下发NDC信号原因: 读取下发信号值为:{}", standardAutodoorDeviceDriver.getTo_command());
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);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
}
}
} 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 {

32
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<InstructionMapper,
//
// } else
//1=XZ 2=NDC
if (ObjectUtil.isNotEmpty(entity.getAgv_system_type()) && entity.getAgv_system_type().equals(CommonFinalParam.TWO)) {
// NDC agv指令不当场取消指令,需要等agv上报
if (!StrUtil.isEmpty(entity.getAgv_jobno())) {
ndcAgvService.deleteAgvInstToNDC(BeanUtil.copyProperties(entity, Instruction.class));
flag = true;
} else {
flag = true;
}
} else if (ObjectUtil.isNotEmpty(entity.getAgv_system_type()) && entity.getAgv_system_type().equals(CommonFinalParam.ONE)
&& !StrUtil.equals(entity.getSend_status(), "2")) {
XianGongAgvService xianGongAgvService = SpringContextHolder.getBean(XianGongAgvService.class);
xianGongAgvService.deleteXZAgvInst(entity.getInstruction_code());
flag = true;
} else if (ObjectUtil.isNotEmpty(entity.getAgv_system_type()) && entity.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type)
&& !StrUtil.equals(entity.getSend_status(), "2")) {
XianGongAgvService xianGongAgvService = SpringContextHolder.getBean(XianGongAgvService.class);
xianGongAgvService.deleteXZAgvInst(entity.getInstruction_code());
flag = true;
} else {
flag = true;
}
if (flag) {
String currentUsername = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
@ -1549,7 +1530,6 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
return inst;
}
}
return null;
}
@ -1607,18 +1587,6 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
@Override
public Integer querySameOriginInst(String devicecode) {
int num = 0;
Iterator<Instruction> 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;
}

4
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'

4
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'
}
}

Loading…
Cancel
Save