洁美更新
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -239,6 +239,13 @@ public interface InstructionService {
|
||||
*/
|
||||
Instruction findByStartCodeNextCode(String srart_code,String next_code);
|
||||
|
||||
/**
|
||||
* 根据终点设备从缓存查询指令
|
||||
*
|
||||
* @return Instruction
|
||||
*/
|
||||
List<Instruction> findByNextDeviceCode(String next_code);
|
||||
|
||||
/**
|
||||
* 根据设备缓存查询
|
||||
*
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user