[1078] 优化终端参数查询和设置

This commit is contained in:
lin
2025-07-21 10:35:30 +08:00
parent a60eb082fe
commit 03b5c0241f
5 changed files with 58 additions and 46 deletions

View File

@@ -219,7 +219,7 @@ public class JTDeviceConfig {
@ConfigAttribute(id = 0x76, type="ChannelListParam", description = "音视频通道列表设置")
private JTChannelListParam channelListParam;
@ConfigAttribute(id = 0x77, type="ChannelParam", description = "视频通道列表设置")
@ConfigAttribute(id = 0x77, type="ChannelParam", description = "单独视频通道参数设置")
private JTChannelParam channelParam;
@ConfigAttribute(id = 0x79, type="AlarmRecordingParam", description = "特殊报警录像参数设置")

View File

@@ -105,20 +105,20 @@ public class jt1078ServiceImpl implements Ijt1078Service {
@EventListener
public void onApplicationEvent(RegisterEvent event) {
// 首次注册设备根据终端参数获取
JTDevice device = event.getDevice();
List<JTChannel> channelList = jtChannelMapper.selectAllByDevicePhoneNumber(device.getPhoneNumber());
if (!channelList.isEmpty()) {
return;
}
JTDeviceConfig jtDeviceConfig = queryConfig(device.getPhoneNumber(), null);
JTChannelParam channelParam = jtDeviceConfig.getChannelParam();
if (channelParam != null && channelParam.getJtAloneChanelList() != null && !channelParam.getJtAloneChanelList().isEmpty()) {
// 写入通道
List<JTAloneChanel> jtAloneChanelList = channelParam.getJtAloneChanelList();
for (JTAloneChanel jtAloneChanel : jtAloneChanelList) {
}
}
// JTDevice device = event.getDevice();
// List<JTChannel> channelList = jtChannelMapper.selectAllByDevicePhoneNumber(device.getPhoneNumber());
// if (!channelList.isEmpty()) {
// return;
// }
// JTDeviceConfig jtDeviceConfig = queryConfig(device.getPhoneNumber(), null);
// JTChannelParam channelParam = jtDeviceConfig.getChannelParam();
// if (channelParam != null && channelParam.getJtAloneChanelList() != null && !channelParam.getJtAloneChanelList().isEmpty()) {
// // 写入通道
// List<JTAloneChanel> jtAloneChanelList = channelParam.getJtAloneChanelList();
// for (JTAloneChanel jtAloneChanel : jtAloneChanelList) {
//
// }
// }
}