diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_control/StandardCoveyorControlDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_control/StandardCoveyorControlDeviceDriver.java index 58de802..dc449d9 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_control/StandardCoveyorControlDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_control/StandardCoveyorControlDeviceDriver.java @@ -192,6 +192,7 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver if(mode == 2){ if (StrUtil.equals(inst.getInstruction_status(), "1") && StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) { finish_instruction(); + container = inst.getVehicle_code(); } } if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) { @@ -946,6 +947,12 @@ public synchronized boolean instruction_apply(String container_code) throws Exce next_point_code = next_device_code; } + Device deviceByCode = deviceAppservice.findDeviceByCode(task.getStart_device_code()); + StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver; + if (deviceByCode.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) { + standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) deviceByCode.getDeviceDriver(); + createLock = standardCoveyorControlWithScannerDeviceDriver.getCreateLock(); + } //如果未锁定,就正常创建(如果锁定,就只创建输送指令) if (!createLock) { List insts = instructionService.queryAgvInstByThree(); diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index c59c052..546fa46 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -1235,7 +1235,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { //查询此终点的指令数量 List byNextDeviceCode = instructionService.findByNextDeviceCode(this_device_code); if (byNextDeviceCode.size() >= list1.size()) { - break; + continue; } for (int z = 0; z < list1.size(); z++) { String code = list1.get(i); @@ -1248,7 +1248,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { } //如果当前关联的设备中都有货的话,就返回 if (count != 0 && count >= list.size()) { - break; + continue; } // }