[1078] 优化终端参数查询和设置
This commit is contained in:
@@ -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 = "特殊报警录像参数设置")
|
||||
|
||||
@@ -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) {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user