REM:
1.优化添加设备节点代码
This commit is contained in:
chenlinghy 2021-01-29 16:20:09 +08:00
parent 70a22ee297
commit 8b1a247b32
2 changed files with 5 additions and 2 deletions

View File

@ -157,6 +157,10 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager {
// 更新值 // 更新值
upgradeDisposeDeviceProperties(tDev, dev); upgradeDisposeDeviceProperties(tDev, dev);
dev.setUrlType(tDev.getUrlType());
dev.setIpAddr(tDev.getIpAddr());
dev.setIpPort(tDev.getIpPort());
// 更新设备数据库 // 更新设备数据库
disposeDeviceMapper.upgradeDisposeDevice(tDev); disposeDeviceMapper.upgradeDisposeDevice(tDev);

View File

@ -43,8 +43,7 @@ public class DisposeDeviceManagerServiceImpl implements DisposeDeviceManagerServ
try { try {
MulReturnType<ErrorCode, Long> ret = disposeDeviceManager.addDisposeDevice(v); MulReturnType<ErrorCode, Long> ret = disposeDeviceManager.addDisposeDevice(v);
v.setId(ret.getSecondParam()); v.setId(ret.getSecondParam());
DisposeDevice dev = disposeDeviceManager.getDisposeDevices(v.getId(),v.getAreaCode()).get(0); rspList.add(new MulReturnType<>(ret.getFirstParam(), v));
rspList.add(new MulReturnType<>(ret.getFirstParam(), dev));
} catch (Exception e) { } catch (Exception e) {
rspList.add(new MulReturnType<>(ErrorCode.ERR_SYSTEMEXCEPTION, v)); rspList.add(new MulReturnType<>(ErrorCode.ERR_SYSTEMEXCEPTION, v));
} }