This commit is contained in:
loujf
2022-07-19 19:01:33 +08:00
parent 128e2bab52
commit d2a8f5cdcd

View File

@@ -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<String> list = deviceservice.queryLinkDeviceByCode(next_point_code);
//查询此终点的指令数量
List<Instruction> 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<String> list = deviceservice.queryLinkDeviceByCode(next_point_code);
//查询此终点的指令数量
List<Instruction> 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<String> list = deviceservice.queryLinkDeviceByCode(next_point_code);
//查询此终点的指令数量
List<Instruction> 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<String> list = deviceservice.queryLinkDeviceByCode(next_point_code);
//查询此终点的指令数量
List<Instruction> 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<String> list = deviceservice.queryLinkDeviceByCode(next_point_code);
//查询此终点的指令数量
List<Instruction> byNextDeviceCode = instructionService.findByNextDeviceCode(next_device_code);
if (byNextDeviceCode.size() >= list.size()) {
return true;
}
instructionService.create(instdto);
//创建指令后修改任务状态