洁美更新

This commit is contained in:
loujf
2022-07-19 18:59:26 +08:00
parent 77a85eddc6
commit 128e2bab52
3 changed files with 28 additions and 0 deletions

View File

@@ -927,6 +927,15 @@ 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();

View File

@@ -239,6 +239,13 @@ public interface InstructionService {
*/
Instruction findByStartCodeNextCode(String srart_code,String next_code);
/**
* 根据终点设备从缓存查询指令
*
* @return Instruction
*/
List<Instruction> findByNextDeviceCode(String next_code);
/**
* 根据设备缓存查询
*

View File

@@ -1620,6 +1620,18 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
return null;
}
@Override
public List<Instruction> findByNextDeviceCode(String next_code) {
List<Instruction> list = new ArrayList<>();
for (int i = 0; i < this.instructions.size(); i++) {
Instruction inst = instructions.get(i);
if (StrUtil.equals(next_code,inst.getNext_device_code())) {
list.add(inst);
}
}
return list;
}
@Override
public Instruction findByStartCodeNextCodeJM(String start_code,String next_code) {