设备初始化缓存修改

This commit is contained in:
huguanghan 2024-12-20 13:14:06 +08:00
parent 7bc12a449e
commit e8b88343e1

View File

@ -1,6 +1,7 @@
package com.das.modules.data.service;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.das.common.utils.PageDataInfo;
import com.das.modules.cache.domain.DeviceInfoCache;
@ -896,7 +897,7 @@ public class TDEngineService {
deviceEventInfo.setDeviceId(rs.getString("device_id"));
DeviceInfoCache deviceInfoCache = cacheService.getEquipmentCache().getDeviceInfoCacheById(rs.getLong("device_id"));
deviceEventInfo.setDeviceName(rs.getString("device_name"));
deviceEventInfo.setFirstTriggeredCode(rs.getInt("first_triggered_code"));
deviceEventInfo.setFirstTriggeredCode(ObjectUtil.isEmpty(rs.getString("first_triggered_code")) ? null : Integer.valueOf(rs.getString("first_triggered_code")));
deviceEventInfo.setMadeinFactory(deviceInfoCache.getMadeinFactory());
deviceEventInfo.setModel(deviceInfoCache.getModel());
result.add(deviceEventInfo);