diff --git a/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java b/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java index be5b5397..06dda68d 100644 --- a/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java @@ -103,9 +103,12 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ */ @Override public void upgradeDisposeDevice(Long id, ObjectStatus objStatus) { - getAllAbilityDevices().stream() - .filter(v -> v.getDev().getId().equals(id)) - .forEach(v -> v.getDev().setStatus(objStatus)); + DisposeDevice dev = disposeDeviceManager.getDisposeDeviceById(id); + for (AbilityInfo ai : getAllAbilityDevices()) { + if (ai.getDev().getId().equals(id)) { + ai.setDev(dev); + } + } } /**