Browse Source

add:NDC交互逻辑

master
张江玮 2 years ago
parent
commit
43467c27ae
  1. 18
      acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

18
acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

@ -186,7 +186,9 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
//检测站点 //检测站点
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
if (standardInspectSiteDeviceDriver.getMove() != 0) { standardInspectSiteDeviceDriver.writing(2);
if (standardInspectSiteDeviceDriver.getMode() != 0
&& standardInspectSiteDeviceDriver.getMove() != 0) {
inst.setExecute_status("1"); inst.setExecute_status("1");
instructionService.update(inst); instructionService.update(inst);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
@ -242,7 +244,9 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
} }
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
if (standardInspectSiteDeviceDriver.getMove() == 0) { standardInspectSiteDeviceDriver.writing(3);
if (standardInspectSiteDeviceDriver.getMode() != 0
&& standardInspectSiteDeviceDriver.getMove() == 0) {
inst.setExecute_status("5"); inst.setExecute_status("5");
instructionService.update(inst); instructionService.update(inst);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
@ -274,7 +278,9 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
} }
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
if (standardInspectSiteDeviceDriver.getMove() == 0) { inst.setExecute_status("3"); standardInspectSiteDeviceDriver.writing(4);
if (standardInspectSiteDeviceDriver.getMode() != 0
&& standardInspectSiteDeviceDriver.getMove() == 0) { inst.setExecute_status("3");
instructionService.update(inst); instructionService.update(inst);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
flag = true; flag = true;
@ -310,7 +316,9 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
} }
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
if (standardInspectSiteDeviceDriver.getMove() != 0) { standardInspectSiteDeviceDriver.writing(5);
if (standardInspectSiteDeviceDriver.getMode() != 0
&& standardInspectSiteDeviceDriver.getMove() != 0) {
inst.setExecute_status("6"); inst.setExecute_status("6");
instructionService.update(inst); instructionService.update(inst);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
@ -369,6 +377,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
standardAutodoorDeviceDriver.OpenOrClose("1"); standardAutodoorDeviceDriver.OpenOrClose("1");
standardAutodoorDeviceDriver.writeing(1);
if (standardAutodoorDeviceDriver.getAction() == 1) { if (standardAutodoorDeviceDriver.getAction() == 1) {
standardAutodoorDeviceDriver.OpenOrClose("1"); standardAutodoorDeviceDriver.OpenOrClose("1");
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
@ -381,6 +390,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
standardAutodoorDeviceDriver.OpenOrClose("2"); standardAutodoorDeviceDriver.OpenOrClose("2");
standardAutodoorDeviceDriver.writeing(2);
if (standardAutodoorDeviceDriver.getAction() == 2) { if (standardAutodoorDeviceDriver.getAction() == 2) {
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
} }

Loading…
Cancel
Save