From d2a8f5cdcd00ab28452ffdf3bf584e7e320f35de Mon Sep 17 00:00:00 2001 From: loujf Date: Tue, 19 Jul 2022 19:01:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardCoveyorControlDeviceDriver.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) 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 50e6e07..07d95cd 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 @@ -624,6 +624,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce instdto.setPriority(priority); instdto.setInstruction_status("0"); instdto.setExecute_device_code(start_point_code); + //查询关联设备数量 + List list = deviceservice.queryLinkDeviceByCode(next_point_code); + //查询此终点的指令数量 + List byNextDeviceCode = instructionService.findByNextDeviceCode(next_device_code); + if (byNextDeviceCode.size() >= list.size()) { + return true; + } instructionService.create(instdto); Instruction instdto2 = new Instruction(); @@ -666,6 +673,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce instdto.setPriority(priority); instdto.setInstruction_status("0"); instdto.setExecute_device_code(start_point_code); + //查询关联设备数量 + List list = deviceservice.queryLinkDeviceByCode(next_point_code); + //查询此终点的指令数量 + List byNextDeviceCode = instructionService.findByNextDeviceCode(next_device_code); + if (byNextDeviceCode.size() >= list.size()) { + return true; + } instructionService.create(instdto); //创建指令后修改任务状态 @@ -698,6 +712,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce instdto.setPriority(priority); instdto.setInstruction_status("0"); instdto.setExecute_device_code(start_point_code); + //查询关联设备数量 + List list = deviceservice.queryLinkDeviceByCode(next_point_code); + //查询此终点的指令数量 + List byNextDeviceCode = instructionService.findByNextDeviceCode(next_device_code); + if (byNextDeviceCode.size() >= list.size()) { + return true; + } instructionService.create(instdto); //创建指令后修改任务状态 @@ -978,6 +999,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce instdto.setPriority(priority); instdto.setInstruction_status("0"); instdto.setExecute_device_code(start_point_code); + //查询关联设备数量 + List list = deviceservice.queryLinkDeviceByCode(next_point_code); + //查询此终点的指令数量 + List byNextDeviceCode = instructionService.findByNextDeviceCode(next_device_code); + if (byNextDeviceCode.size() >= list.size()) { + return true; + } instructionService.create(instdto); //创建指令后修改任务状态 @@ -1011,6 +1039,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce instdto.setPriority(priority); instdto.setInstruction_status("0"); instdto.setExecute_device_code(start_point_code); + //查询关联设备数量 + List list = deviceservice.queryLinkDeviceByCode(next_point_code); + //查询此终点的指令数量 + List byNextDeviceCode = instructionService.findByNextDeviceCode(next_device_code); + if (byNextDeviceCode.size() >= list.size()) { + return true; + } instructionService.create(instdto); //创建指令后修改任务状态