优化
This commit is contained in:
@@ -624,6 +624,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
|||||||
instdto.setPriority(priority);
|
instdto.setPriority(priority);
|
||||||
instdto.setInstruction_status("0");
|
instdto.setInstruction_status("0");
|
||||||
instdto.setExecute_device_code(start_point_code);
|
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);
|
instructionService.create(instdto);
|
||||||
|
|
||||||
Instruction instdto2 = new Instruction();
|
Instruction instdto2 = new Instruction();
|
||||||
@@ -666,6 +673,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
|||||||
instdto.setPriority(priority);
|
instdto.setPriority(priority);
|
||||||
instdto.setInstruction_status("0");
|
instdto.setInstruction_status("0");
|
||||||
instdto.setExecute_device_code(start_point_code);
|
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);
|
instructionService.create(instdto);
|
||||||
|
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
@@ -698,6 +712,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
|||||||
instdto.setPriority(priority);
|
instdto.setPriority(priority);
|
||||||
instdto.setInstruction_status("0");
|
instdto.setInstruction_status("0");
|
||||||
instdto.setExecute_device_code(start_point_code);
|
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);
|
instructionService.create(instdto);
|
||||||
|
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
@@ -978,6 +999,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
|||||||
instdto.setPriority(priority);
|
instdto.setPriority(priority);
|
||||||
instdto.setInstruction_status("0");
|
instdto.setInstruction_status("0");
|
||||||
instdto.setExecute_device_code(start_point_code);
|
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);
|
instructionService.create(instdto);
|
||||||
|
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
@@ -1011,6 +1039,13 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
|||||||
instdto.setPriority(priority);
|
instdto.setPriority(priority);
|
||||||
instdto.setInstruction_status("0");
|
instdto.setInstruction_status("0");
|
||||||
instdto.setExecute_device_code(start_point_code);
|
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);
|
instructionService.create(instdto);
|
||||||
|
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
|
|||||||
Reference in New Issue
Block a user