|
|
@ -114,7 +114,7 @@ public class DeviceController extends BaseController { |
|
|
savedDevice.getId(), savedDevice.getName(), savedDevice.getType()), null); |
|
|
savedDevice.getId(), savedDevice.getName(), savedDevice.getType()), null); |
|
|
|
|
|
|
|
|
if (device.getId() != null) { |
|
|
if (device.getId() != null) { |
|
|
sendNotificationMsgToEdgeService(savedDevice.getTenantId(), savedDevice.getId(), EdgeEventActionType.UPDATED); |
|
|
sendNotificationMsgToEdgeService(savedDevice.getTenantId(), savedDevice.getId(), EntityType.DEVICE, EdgeEventActionType.UPDATED); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
logEntityAction(savedDevice.getId(), savedDevice, |
|
|
logEntityAction(savedDevice.getId(), savedDevice, |
|
|
@ -148,7 +148,7 @@ public class DeviceController extends BaseController { |
|
|
device.getCustomerId(), |
|
|
device.getCustomerId(), |
|
|
ActionType.DELETED, null, strDeviceId); |
|
|
ActionType.DELETED, null, strDeviceId); |
|
|
|
|
|
|
|
|
sendNotificationMsgToEdgeService(getTenantId(), deviceId, EdgeEventActionType.DELETED); |
|
|
sendNotificationMsgToEdgeService(getTenantId(), deviceId, EntityType.DEVICE, EdgeEventActionType.DELETED); |
|
|
|
|
|
|
|
|
deviceStateService.onDeviceDeleted(device); |
|
|
deviceStateService.onDeviceDeleted(device); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
@ -279,7 +279,7 @@ public class DeviceController extends BaseController { |
|
|
|
|
|
|
|
|
tbClusterService.pushMsgToCore(new DeviceCredentialsUpdateNotificationMsg(getCurrentUser().getTenantId(), deviceCredentials.getDeviceId()), null); |
|
|
tbClusterService.pushMsgToCore(new DeviceCredentialsUpdateNotificationMsg(getCurrentUser().getTenantId(), deviceCredentials.getDeviceId()), null); |
|
|
|
|
|
|
|
|
sendNotificationMsgToEdgeService(getTenantId(), device.getId(), EdgeEventActionType.CREDENTIALS_UPDATED); |
|
|
sendNotificationMsgToEdgeService(getTenantId(), device.getId(), EntityType.DEVICE, EdgeEventActionType.CREDENTIALS_UPDATED); |
|
|
|
|
|
|
|
|
logEntityAction(device.getId(), device, |
|
|
logEntityAction(device.getId(), device, |
|
|
device.getCustomerId(), |
|
|
device.getCustomerId(), |
|
|
@ -583,7 +583,7 @@ public class DeviceController extends BaseController { |
|
|
savedDevice.getCustomerId(), |
|
|
savedDevice.getCustomerId(), |
|
|
ActionType.ASSIGNED_TO_EDGE, null, strDeviceId, strEdgeId, edge.getName()); |
|
|
ActionType.ASSIGNED_TO_EDGE, null, strDeviceId, strEdgeId, edge.getName()); |
|
|
|
|
|
|
|
|
sendNotificationMsgToEdgeService(getTenantId(), edgeId, savedDevice.getId(), EdgeEventActionType.ASSIGNED_TO_EDGE); |
|
|
sendNotificationMsgToEdgeService(getTenantId(), edgeId, savedDevice.getId(), EntityType.DEVICE, EdgeEventActionType.ASSIGNED_TO_EDGE); |
|
|
|
|
|
|
|
|
return savedDevice; |
|
|
return savedDevice; |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
@ -617,7 +617,7 @@ public class DeviceController extends BaseController { |
|
|
device.getCustomerId(), |
|
|
device.getCustomerId(), |
|
|
ActionType.UNASSIGNED_FROM_EDGE, null, strDeviceId, strEdgeId, edge.getName()); |
|
|
ActionType.UNASSIGNED_FROM_EDGE, null, strDeviceId, strEdgeId, edge.getName()); |
|
|
|
|
|
|
|
|
sendNotificationMsgToEdgeService(getTenantId(), edgeId, savedDevice.getId(), EdgeEventActionType.UNASSIGNED_FROM_EDGE); |
|
|
sendNotificationMsgToEdgeService(getTenantId(), edgeId, savedDevice.getId(), EntityType.DEVICE, EdgeEventActionType.UNASSIGNED_FROM_EDGE); |
|
|
|
|
|
|
|
|
return savedDevice; |
|
|
return savedDevice; |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
|