临时提交
parent
84dcd4d8b8
commit
6619c5c53d
|
@ -2,7 +2,7 @@ package com.genersoft.iot.vmp.gb28181.bean;
|
|||
|
||||
|
||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.AudioBroadcastEvent;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.AudioBroadcastEvent;
|
||||
import gov.nist.javax.sip.message.SIPResponse;
|
||||
|
||||
/**
|
||||
|
|
|
@ -82,7 +82,7 @@ public class CommonGBChannel {
|
|||
private String gbPassword;
|
||||
|
||||
@Schema(description = "国标-设备状态")
|
||||
private Integer gbStatus;
|
||||
private String gbStatus;
|
||||
|
||||
@Schema(description = "国标-经度 WGS-84坐标系")
|
||||
private Double gbLongitude;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.alarm;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
|
@ -0,0 +1,43 @@
|
|||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
|
||||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
|
||||
@Tag(name = "全局通道管理")
|
||||
@Controller
|
||||
@Slf4j
|
||||
@RequestMapping(value = "/api/common/channel")
|
||||
public class CommonChannelController {
|
||||
|
||||
@Autowired
|
||||
private IRedisCatchStorage redisCatchStorage;
|
||||
|
||||
@Autowired
|
||||
private IGbChannelService channelService;
|
||||
|
||||
@Autowired
|
||||
private IMediaServerService mediaServerService;
|
||||
|
||||
|
||||
@Operation(summary = "查询通道信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@Parameter(name = "id", description = "通道的数据库自增Id", required = true)
|
||||
@GetMapping(value = "/one")
|
||||
@ResponseBody
|
||||
public CommonGBChannel getOne(int id){
|
||||
return channelService.getOne(id);
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
* @date 2021年2月2日
|
||||
*/
|
||||
|
||||
package com.genersoft.iot.vmp.vmanager.gb28181.device;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
|
@ -5,7 +5,7 @@
|
|||
* @date 2021年2月1日
|
||||
*/
|
||||
|
||||
package com.genersoft.iot.vmp.vmanager.gb28181.device;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.device;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||
|
@ -116,15 +116,6 @@ public class DeviceQuery {
|
|||
|
||||
/**
|
||||
* 分页查询通道数
|
||||
*
|
||||
* @param deviceId 设备id
|
||||
* @param page 当前页
|
||||
* @param count 每页条数
|
||||
* @param query 查询内容
|
||||
* @param online 是否在线 在线 true / 离线 false
|
||||
* @param channelType 设备 false/子目录 true
|
||||
* @param catalogUnderDevice 是否直属与设备的目录
|
||||
* @return 通道列表
|
||||
*/
|
||||
@GetMapping("/devices/{deviceId}/channels")
|
||||
@Operation(summary = "分页查询通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
|
@ -148,8 +139,6 @@ public class DeviceQuery {
|
|||
|
||||
/**
|
||||
* 同步设备通道
|
||||
* @param deviceId 设备id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "同步设备通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@Parameter(name = "deviceId", description = "设备国标编号", required = true)
|
||||
|
@ -494,4 +483,11 @@ public class DeviceQuery {
|
|||
resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/channel/raw")
|
||||
@Operation(summary = "国标通道编辑时的数据回显")
|
||||
@Parameter(name = "id", description = "通道的Id", required = true)
|
||||
public DeviceChannel getRawChannel(int id) {
|
||||
return deviceChannelService.getRawChannel(id);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.record;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.media;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.MobilePosition;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.platform;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
@ -12,6 +12,8 @@ import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
|||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.PlatformCatalog;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.SubscribeHolder;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.UpdateChannelParam;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||
import com.genersoft.iot.vmp.service.IDeviceChannelService;
|
||||
import com.genersoft.iot.vmp.service.IPlatformChannelService;
|
||||
|
@ -20,8 +22,6 @@ import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
|||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.UpdateChannelParam;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.play;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.playback;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.common.InviteInfo;
|
||||
import com.genersoft.iot.vmp.common.InviteSessionType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.ptz;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.sse;
|
||||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEventListener;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.play.bean;
|
||||
package com.genersoft.iot.vmp.gb28181.controller.bean;
|
||||
|
||||
|
||||
/**
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.platform.bean;
|
||||
package com.genersoft.iot.vmp.gb28181.controller.bean;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
@ -1,9 +1,8 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.play.bean;
|
||||
package com.genersoft.iot.vmp.gb28181.controller.bean;
|
||||
|
||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.context.request.async.DeferredResult;
|
||||
|
||||
public class PlayResult {
|
|
@ -1,4 +1,4 @@
|
|||
package com.genersoft.iot.vmp.vmanager.gb28181.platform.bean;
|
||||
package com.genersoft.iot.vmp.gb28181.controller.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
|
@ -165,6 +165,7 @@ public interface CommonGBChannelMapper {
|
|||
" has_audio,\n" +
|
||||
" gps_time,\n" +
|
||||
" stream_identification,\n" +
|
||||
" device_db_id as gb_device_db_id,\n" +
|
||||
" coalesce(gb_device_id, device_id) as gb_device_id,\n" +
|
||||
" coalesce(gb_name, name) as gb_name,\n" +
|
||||
" coalesce(gb_manufacturer, manufacturer) as gb_manufacturer,\n" +
|
||||
|
|
|
@ -2,8 +2,7 @@ package com.genersoft.iot.vmp.gb28181.dao;
|
|||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannelInPlatform;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.web.gb28181.dto.DeviceChannelExtend;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.genersoft.iot.vmp.gb28181.dao;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
@ -342,4 +343,7 @@ public interface DeviceMapper {
|
|||
" order by create_time desc "+
|
||||
" </script>")
|
||||
List<Device> getDeviceList(@Param("query") String query, @Param("status") Boolean status);
|
||||
|
||||
@Select("select * from wvp_device_channel where id = #{id}")
|
||||
DeviceChannel getRawChannel(@Param("id") int id);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.genersoft.iot.vmp.gb28181.dao;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -27,4 +27,6 @@ public interface IGbChannelService {
|
|||
void updateStatus(List<CommonGBChannel> channelList);
|
||||
|
||||
List<CommonGBChannel> queryByPlatformId(Integer platformId);
|
||||
|
||||
CommonGBChannel getOne(int id);
|
||||
}
|
||||
|
|
|
@ -227,4 +227,9 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
|
||||
return commonGBChannelMapper.queryByPlatformId(platformId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonGBChannel getOne(int id) {
|
||||
return commonGBChannelMapper.queryById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.genersoft.iot.vmp.gb28181.bean.Device;
|
|||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.MobilePosition;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.web.gb28181.dto.DeviceChannelExtend;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
|
@ -115,4 +115,7 @@ public interface IDeviceChannelService {
|
|||
|
||||
|
||||
List<Device> queryDeviceWithAsMessageChannel();
|
||||
|
||||
DeviceChannel getRawChannel(int id);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.genersoft.iot.vmp.service;
|
||||
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.genersoft.iot.vmp.service;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||
import com.genersoft.iot.vmp.conf.exception.ServiceException;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
|
@ -12,14 +11,13 @@ import com.genersoft.iot.vmp.media.bean.MediaServer;
|
|||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.bean.SSRCInfo;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.AudioBroadcastEvent;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.AudioBroadcastEvent;
|
||||
import gov.nist.javax.sip.message.SIPResponse;
|
||||
|
||||
import javax.sip.InvalidArgumentException;
|
||||
import javax.sip.SipException;
|
||||
import javax.sip.header.CallIdHeader;
|
||||
import java.text.ParseException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 点播处理
|
||||
|
|
|
@ -2,11 +2,13 @@ package com.genersoft.iot.vmp.service.bean;
|
|||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.MobilePosition;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class GPSMsgInfo {
|
||||
|
||||
/**
|
||||
*
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
@ -53,69 +55,4 @@ public class GPSMsgInfo {
|
|||
gpsMsgInfo.setTime(DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime()));
|
||||
return gpsMsgInfo;
|
||||
}
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public double getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public void setLng(double lng) {
|
||||
this.lng = lng;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(String direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public String getAltitude() {
|
||||
return altitude;
|
||||
}
|
||||
|
||||
public void setAltitude(String altitude) {
|
||||
this.altitude = altitude;
|
||||
}
|
||||
|
||||
public boolean isStored() {
|
||||
return stored;
|
||||
}
|
||||
|
||||
public void setStored(boolean stored) {
|
||||
this.stored = stored;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
|||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.web.gb28181.dto.DeviceChannelExtend;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
@ -580,4 +580,9 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
|||
public List<Device> queryDeviceWithAsMessageChannel() {
|
||||
return deviceMapper.queryDeviceWithAsMessageChannel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceChannel getRawChannel(int id) {
|
||||
return deviceMapper.getRawChannel(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.genersoft.iot.vmp.gb28181.dao.DeviceChannelMapper;
|
|||
import com.genersoft.iot.vmp.gb28181.dao.ParentPlatformMapper;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.PlatformCatalogMapper;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.PlatformChannelMapper;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
|
|
|
@ -41,7 +41,7 @@ import com.genersoft.iot.vmp.utils.DateUtil;
|
|||
import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.AudioBroadcastEvent;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.AudioBroadcastEvent;
|
||||
import gov.nist.javax.sip.message.SIPResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.genersoft.iot.vmp.storager;
|
|||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
|||
import com.genersoft.iot.vmp.storager.dao.GbStreamMapper;
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
|
|
|
@ -301,8 +301,8 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
|||
|| streamInfo.getOriginType() == OriginType.FFMPEG_PULL.ordinal() ) {
|
||||
if (streamProxyMapForDb.get(key) != null) {
|
||||
redisCatchStorage.addStream(mediaServer, "pull", streamInfo.getApp(), streamInfo.getStream(), streamInfo.getMediaInfo());
|
||||
if (streamProxy.getGbStatus() == 1 && streamProxy.getGbId() > 0) {
|
||||
streamProxy.setGbStatus(1);
|
||||
if ("OFF".equalsIgnoreCase(streamProxy.getGbStatus()) && streamProxy.getGbId() > 0) {
|
||||
streamProxy.setGbStatus("ON");
|
||||
channelListForOnline.add(streamProxy.getCommonGBChannel());
|
||||
}
|
||||
streamProxyMapForDb.remove(key);
|
||||
|
@ -317,8 +317,8 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
|||
List<StreamProxy> streamProxiesForRemove = new ArrayList<>();
|
||||
if (!streamProxyMapForDb.isEmpty()) {
|
||||
for (StreamProxy streamProxy : streamProxyMapForDb.values()) {
|
||||
if (streamProxy.getGbStatus() == 0 && streamProxy.getGbId() > 0) {
|
||||
streamProxy.setGbStatus(0);
|
||||
if ("ON".equalsIgnoreCase(streamProxy.getGbStatus()) && streamProxy.getGbId() > 0) {
|
||||
streamProxy.setGbStatus("OFF");
|
||||
channelListForOffline.add(streamProxy.getCommonGBChannel());
|
||||
}
|
||||
// 移除开启了无人观看自动移除的流
|
||||
|
@ -359,13 +359,13 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
|||
List<CommonGBChannel> channelListForOffline = new ArrayList<>();
|
||||
|
||||
for (StreamProxy streamProxy : streamProxies) {
|
||||
if (streamProxy.getGbId() > 0 && streamProxy.getGbStatus() == 1) {
|
||||
if (streamProxy.getGbId() > 0 && "ON".equalsIgnoreCase(streamProxy.getGbStatus())) {
|
||||
channelListForOffline.add(streamProxy.getCommonGBChannel());
|
||||
}
|
||||
if (streamProxy.getGbId() == 0 && streamProxy.isEnableRemoveNoneReader()) {
|
||||
streamProxiesForRemove.add(streamProxy);
|
||||
}
|
||||
if (streamProxy.getGbStatus() == 1) {
|
||||
if ("ON".equalsIgnoreCase(streamProxy.getGbStatus())) {
|
||||
streamProxiesForSendMessage.add(streamProxy);
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
|||
}
|
||||
streamProxy.setStatus(true);
|
||||
streamProxyMapper.online(streamProxy.getId());
|
||||
streamProxy.setGbStatus(status?1:0);
|
||||
streamProxy.setGbStatus(status?"ON":"OFF");
|
||||
if (streamProxy.getGbId() > 0) {
|
||||
if (status) {
|
||||
gbChannelService.online(streamProxy.getCommonGBChannel());
|
||||
|
|
|
@ -239,7 +239,7 @@ public class StreamPushController {
|
|||
if (ObjectUtils.isEmpty(stream.getApp()) && ObjectUtils.isEmpty(stream.getStream())) {
|
||||
throw new ControllerException(ErrorCode.ERROR400.getCode(), "app或stream不可为空");
|
||||
}
|
||||
stream.setGbStatus(0);
|
||||
stream.setGbStatus("OFF");
|
||||
stream.setPushIng(false);
|
||||
if (!streamPushService.add(stream)) {
|
||||
throw new ControllerException(ErrorCode.ERROR100);
|
||||
|
|
|
@ -104,7 +104,7 @@ public class StreamPushUploadFileHandler extends AnalysisEventListener<StreamPus
|
|||
streamPush.setApp(streamPushExcelDto.getApp());
|
||||
streamPush.setStream(streamPushExcelDto.getStream());
|
||||
streamPush.setGbDeviceId(streamPushExcelDto.getGbId());
|
||||
streamPush.setGbStatus(streamPushExcelDto.isStatus()?1:0);
|
||||
streamPush.setGbStatus(streamPushExcelDto.isStatus()?"ON":"OFF");
|
||||
streamPush.setCreateTime(DateUtil.getNow());
|
||||
streamPush.setMediaServerId(defaultMediaServerId);
|
||||
streamPush.setGbName(streamPushExcelDto.getName());
|
||||
|
|
|
@ -153,7 +153,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
push.setPushIng(false);
|
||||
if (push.getGbDeviceId() != null) {
|
||||
if (userSetting.isUsePushingAsStatus()) {
|
||||
push.setGbStatus(0);
|
||||
push.setGbStatus("OFF");
|
||||
updateStatus(push);
|
||||
// streamPushMapper.updatePushStatus(event.getApp(), event.getStream(), false);
|
||||
// eventPublisher.catalogEventPublishForStream(null, gbStream, CatalogEvent.OFF);
|
||||
|
@ -511,7 +511,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
if (push.getGbDeviceId() != null) {
|
||||
return;
|
||||
}
|
||||
if (push.getGbStatus() == 1) {
|
||||
if ("ON".equalsIgnoreCase(push.getGbStatus())) {
|
||||
gbChannelService.online(push.getCommonGBChannel());
|
||||
}else {
|
||||
gbChannelService.offline(push.getCommonGBChannel());
|
||||
|
@ -525,7 +525,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
StreamPush streamPushInDb = streamPushMapper.select(streamPushId);
|
||||
streamPushInDb.setPushIng(pushIng);
|
||||
if (userSetting.isUsePushingAsStatus()) {
|
||||
streamPushInDb.setGbStatus(pushIng?1:0);
|
||||
streamPushInDb.setGbStatus(pushIng?"ON":"OFF");
|
||||
}
|
||||
streamPushInDb.setPushTime(DateUtil.getNow());
|
||||
updateStatus(streamPushInDb);
|
||||
|
|
|
@ -1,16 +1,89 @@
|
|||
<template>
|
||||
<div id="ChannelEdit" v-loading="isLoging" style="width: 100%">
|
||||
<el-form ref="passwordForm" :rules="rules" status-icon label-width="80px">
|
||||
<!-- <el-form-item label="gbName" prop="gbName">-->
|
||||
<!-- <el-input v-model="form.gbName"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item>
|
||||
<div style="float: right;">
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</div>
|
||||
<div id="ChannelEdit" v-loading="locading" style="width: 100%">
|
||||
<el-form ref="passwordForm" status-icon label-width="160px" style="padding-top: 1rem">
|
||||
<el-form-item label="名称" >
|
||||
<el-input v-if="form.name" v-model="form.gbName" :placeholder="form.name"></el-input>
|
||||
<el-input v-if="!form.name" v-model="form.gbName" placeholder="请输入通道名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码" >
|
||||
<el-input v-if="form.deviceId" v-model="form.gbDeviceId" :placeholder="form.deviceId"></el-input>
|
||||
<el-input v-if="!form.deviceId" v-model="form.gbDeviceId" placeholder="请输入通道编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备厂商" >
|
||||
<el-input v-if="form.manufacturer" v-model="form.gbManufacturer" :placeholder="form.manufacturer"></el-input>
|
||||
<el-input v-if="!form.manufacturer" v-model="form.gbManufacturer" placeholder="请输入设备厂商"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备型号" >
|
||||
<el-input v-if="form.model" v-model="form.gbModel" :placeholder="form.model"></el-input>
|
||||
<el-input v-if="!form.model" v-model="form.gbModel" placeholder="请输入设备型号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备归属" >
|
||||
<el-input v-if="form.owner" v-model="form.gbOwner" :placeholder="form.owner"></el-input>
|
||||
<el-input v-if="!form.owner" v-model="form.gbOwner" placeholder="请输入设备归属"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="行政区域" >
|
||||
<el-input v-if="form.civilCode" v-model="form.gbCivilCode" :placeholder="form.civilCode"></el-input>
|
||||
<el-input v-if="!form.civilCode" v-model="form.gbCivilCode" placeholder="请输入行政区域"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="警区" >
|
||||
<el-input v-if="form.block" v-model="form.gbBlock" :placeholder="form.block"></el-input>
|
||||
<el-input v-if="!form.block" v-model="form.gbBlock" placeholder="请输入警区"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="安装地址" >
|
||||
<el-input v-if="form.address" v-model="form.gbAddress" :placeholder="form.address"></el-input>
|
||||
<el-input v-if="!form.address" v-model="form.gbAddress" placeholder="请输入安装地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="子设备" >
|
||||
<el-select v-model="form.gbParental" style="width: 100%" placeholder="请选择">
|
||||
<el-option label="有" :value="1"></el-option>
|
||||
<el-option label="无" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="父节点编码" >
|
||||
<el-input v-if="form.parentId" v-model="form.gbParentId" :placeholder="form.parentId"></el-input>
|
||||
<el-input v-if="!form.parentId" v-model="form.gbParentId" placeholder="请输入父节点编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="信令安全模式" >
|
||||
<el-select v-model="form.gbSafetyWay" style="width: 100%" placeholder="请选择">
|
||||
<el-option label="不采用" :value="0"></el-option>
|
||||
<el-option label="S/MIME签名" :value="2"></el-option>
|
||||
<el-option label="S/MIME加密签名同时采用" :value="3"></el-option>
|
||||
<el-option label="数字摘要" :value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册方式" >
|
||||
<el-select v-model="form.gbRegisterWay" style="width: 100%" placeholder="请选择">
|
||||
<el-option label="IETFRFC3261标准" :value="1"></el-option>
|
||||
<el-option label="基于口令的双向认证" :value="2"></el-option>
|
||||
<el-option label="基于数字证书的双向认证注册" :value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书序列号" >
|
||||
<el-input type="number" v-if="form.certNum" v-model="form.gbCertNum" :placeholder="form.certNum"></el-input>
|
||||
<el-input type="number" v-if="!form.certNum" v-model="form.gbCertNum" placeholder="请输入证书序列号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书有效标识" >
|
||||
<el-select v-model="form.gbCertifiable" style="width: 100%" placeholder="请选择">
|
||||
<el-option label="有效" :value="1"></el-option>
|
||||
<el-option label="无效" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="无效原因码" >
|
||||
<el-input type="errCode" v-if="form.gbErrCode" v-model="form.gbCertNum" :placeholder="form.errCode"></el-input>
|
||||
<el-input type="errCode" v-if="!form.gbErrCode" v-model="form.gbCertNum" placeholder="请输入无效原因码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书终止有效期" >
|
||||
<el-date-picker
|
||||
v-model="form.gbEndTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<div style="float: right;">
|
||||
<el-button type="primary" size="mini" @click="onSubmit">保存</el-button>
|
||||
<el-button size="mini" @click="close">取消</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -23,12 +96,26 @@ export default {
|
|||
computed: {},
|
||||
created() {
|
||||
// 获取完整信息
|
||||
// 国标类型特殊处理
|
||||
|
||||
this.getCommonChannel(data=>{
|
||||
if (data.gbDeviceDbId) {
|
||||
// 国标类型特殊处理
|
||||
this.getDeviceChannel(chanel=>{
|
||||
this.form = chanel;
|
||||
console.log(chanel)
|
||||
})
|
||||
}else {
|
||||
this.form = data;
|
||||
console.log(data)
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
locading: true,
|
||||
form: {
|
||||
gbName: "测试",
|
||||
gbNameLabel: "测试"
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -38,18 +125,43 @@ export default {
|
|||
close: function () {
|
||||
|
||||
},
|
||||
getChannel:function () {
|
||||
getCommonChannel:function (callback) {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: "/api/role/all"
|
||||
url: "/api/common/channel/one",
|
||||
params: {
|
||||
id: this.id
|
||||
}
|
||||
}).then((res) => {
|
||||
this.loading = true;
|
||||
if (res.data.code === 0) {
|
||||
this.options=res.data.data
|
||||
if(callback) {
|
||||
callback(res.data.data)
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error)
|
||||
});
|
||||
}).finally(()=>[
|
||||
this.locading = false
|
||||
])
|
||||
},
|
||||
getDeviceChannel:function (callback) {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: "/api/device/query/channel/raw",
|
||||
params: {
|
||||
id: this.id
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
if(callback) {
|
||||
callback(res.data.data)
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error)
|
||||
}).finally(()=>[
|
||||
this.locading = false
|
||||
])
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
</el-pagination>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<channel-edit v-if="editId" id="editId"></channel-edit>
|
||||
<channel-edit v-if="editId" :id="editId"></channel-edit>
|
||||
<!--设备列表-->
|
||||
|
||||
</div>
|
||||
|
|
|
@ -160,7 +160,7 @@ create table wvp_device_channel (
|
|||
gb_ip_address character varying(50),
|
||||
gb_port integer,
|
||||
gb_password character varying(50),
|
||||
gb_status integer,
|
||||
gb_status character varying(50) default 'OFF',
|
||||
gb_longitude double,
|
||||
gb_latitude double,
|
||||
gb_business_group_id character varying(50),
|
||||
|
|
Loading…
Reference in New Issue