#添加了设备类型查询显示

This commit is contained in:
2026-10-30 09:07:08 +08:00
parent e501d58563
commit f25a0b5018
4 changed files with 42 additions and 24 deletions

View File

@@ -234,6 +234,12 @@ public class Device extends BaseDO {
private Boolean hasHost;
@TableField(exist = false)
private String productModel;// 产品型号
@TableField(exist = false)
private String deviceType;
@TableField(exist = false)
private LocationMessage locationMessage;

View File

@@ -570,16 +570,16 @@ public class HostMessageHandler implements CustomMqttMessageHandler {
}
}
}
// try {
// NettyDevice device = deviceSessionManager.getDevice(deviceId);
// if (device != null && device.getDevice() != null) {
// Long siteId = device.getDevice().getSiteId();
// websocketMesDispather.mapMessageDispather(siteId,
// JsonUtils.toJsonString(sendDto));
// }
// } catch (Exception e) {
// log.error("实时地图数据websocket推送失败: siteId={}, error={}", e);
// }
try {
NettyDevice device = deviceSessionManager.getDevice(deviceId);
if (device != null && device.getDevice() != null) {
Long siteId = device.getDevice().getSiteId();
websocketMesDispather.mapMessageDispather(siteId,
JsonUtils.toJsonString(sendDto));
}
} catch (Exception e) {
log.error("实时地图数据websocket推送失败: siteId={}, error={}", e);
}
// todo 推送实时位置和状态消息到外部
try {
GlobalMemory.customMqttDeviceMonitor.publish(mqttClientId,