| | |
| | | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; |
| | | import com.genersoft.iot.vmp.policeBodyCamera.entity.DeviceChannelPoliceCamera; |
| | | import com.genersoft.iot.vmp.policeBodyCamera.service.DeviceChannelPoliceCameraService; |
| | | import com.genersoft.iot.vmp.service.IGbStreamService; |
| | | import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | |
| | | @Autowired |
| | | private MediaServerMapper mediaServerMapper; |
| | | |
| | | @Autowired |
| | | private DeviceChannelPoliceCameraService deviceChannelPoliceCameraService; |
| | | |
| | | private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | |
| | |
| | | public synchronized void updateChannel(String deviceId, DeviceChannel channel) { |
| | | String channelId = channel.getChannelId(); |
| | | channel.setDeviceId(deviceId); |
| | | //更新通道数据 |
| | | StreamInfo streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId); |
| | | if (streamInfo != null) { |
| | | channel.setStreamId(streamInfo.getStream()); |
| | |
| | | deviceChannelMapper.update(channel); |
| | | } |
| | | deviceChannelMapper.updateChannelSubCount(deviceId,channel.getParentId()); |
| | | //如果是是执法记录仪 |
| | | if (null!=channel.getName() && channel.getName().contains("执法记录仪")){ |
| | | //更新执法记录仪信息 |
| | | deviceChannelPoliceCameraService.updateChannelPoliceCamera(channel); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public int delChannel(String deviceId, String channelId) { |
| | | //查询设备信息 |
| | | DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(deviceId, channelId); |
| | | if (deviceChannel.getName().contains("执法记录仪")){ |
| | | //同时删除执法记录仪信息 |
| | | deviceChannelPoliceCameraService.del(deviceId, channelId); |
| | | } |
| | | return deviceChannelMapper.del(deviceId, channelId); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public synchronized boolean insertMobilePosition(MobilePosition mobilePosition) { |
| | | if (mobilePosition.getDeviceName().contains("执法记录仪")){ |
| | | deviceChannelPoliceCameraService.insertNewPositionPoliceCamera(mobilePosition); |
| | | } |
| | | return deviceMobilePositionMapper.insertNewPosition(mobilePosition) > 0; |
| | | } |
| | | |