REM:
1.解决manger层设备新增和更新设备能力信息未成功的问题
This commit is contained in:
chenlinghy 2020-09-09 16:30:52 +08:00
parent bb482c54c2
commit e25785d366
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,7 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager {
// 添加设备能力信息 // 添加设备能力信息
if (err == ErrorCode.ERR_OK) { if (err == ErrorCode.ERR_OK) {
dev.getDevCapacity().forEach(v-> v.setDeviceId(dev.getId()));
disposeCapacityMapper.addNewDisposeCapacity(dev.getDevCapacity()); disposeCapacityMapper.addNewDisposeCapacity(dev.getDevCapacity());
} }
@ -160,7 +161,10 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager {
disposeCapacityMapper.delDeviceDisposeCapacity(tDev.getId()); disposeCapacityMapper.delDeviceDisposeCapacity(tDev.getId());
// 新增能力信息完成更新 // 新增能力信息完成更新
Long devId = tDev.getId();
if (tDev.getDevCapacity().size() != 0) { if (tDev.getDevCapacity().size() != 0) {
tDev.getDevCapacity().forEach(v-> v.setDeviceId(devId));
disposeCapacityMapper.addNewDisposeCapacity(tDev.getDevCapacity()); disposeCapacityMapper.addNewDisposeCapacity(tDev.getDevCapacity());
} }