parent
f649ac0207
commit
11b93e1ce2
|
@ -206,15 +206,10 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
|
|||
for (AbilityInfo v : getAllAbilityDevices()) {
|
||||
DisposeDevice dev = disposeDeviceManager.getDisposeDeviceById(v.getDev().getId());
|
||||
|
||||
if (dev != null && !dev.getStatus().equals(ObjectStatus.NORMAL)) {
|
||||
// 更新设备状态
|
||||
v.getDev().setStatus(dev.getStatus());
|
||||
|
||||
v.getDb().periodTaskRuntime();
|
||||
|
||||
// 同步最新处置平台业务信息到设备
|
||||
v.getDb().upgradeServiceGroup(serviceGroupMapper.selectAll());
|
||||
|
||||
if (dev == null || !dev.getStatus().equals(ObjectStatus.NORMAL)) {
|
||||
// 如果数据库中设备不存在,那么删除该设备
|
||||
v.getDev().setStatus(ObjectStatus.DELETED);
|
||||
} else {
|
||||
// 数据库中的设备信息和缓存中的设备信息同步
|
||||
v.getDev().getDevCapacity().forEach(k -> dev.getDevCapacity().forEach(m -> {
|
||||
if (k.getId().equals(m.getId())) {
|
||||
|
@ -239,6 +234,10 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
|
|||
}
|
||||
}
|
||||
}));
|
||||
|
||||
v.getDb().periodTaskRuntime();
|
||||
// 同步最新处置平台业务信息到设备
|
||||
v.getDb().upgradeServiceGroup(serviceGroupMapper.selectAll());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue