Merge remote-tracking branch 'origin/dev/springBoot3' into dev/springBoot3

This commit is contained in:
lin 2025-10-26 20:51:28 +08:00
commit d117a0d83a
20 changed files with 221 additions and 195 deletions

View File

@ -101,7 +101,8 @@ public class CommonGBChannel {
@Schema(description = "国标-虚拟组织所属的业务分组ID") @Schema(description = "国标-虚拟组织所属的业务分组ID")
private String gbBusinessGroupId; private String gbBusinessGroupId;
@Schema(description = "国标-摄像机结构类型,标识摄像机类型: 1-球机; 2-半球; 3-固定枪机; 4-遥控枪机;5-遥控半球;6-多目设备的全景/拼接通道;7-多目设备的分割通道; 99-移动设备(非标)") @Schema(description = "国标-摄像机结构类型,标识摄像机类型: 1-球机; 2-半球; 3-固定枪机; 4-遥控枪机;5-遥控半球;6-多目设备的全景/拼接通道;" +
"7-多目设备的分割通道; 99-移动设备非标98-会议设备(非标)")
private Integer gbPtzType; private Integer gbPtzType;
// 2016 // 2016

View File

@ -3,6 +3,8 @@ package com.genersoft.iot.vmp.gb28181.bean;
import gov.nist.javax.sip.message.SIPResponse; import gov.nist.javax.sip.message.SIPResponse;
import lombok.Data; import lombok.Data;
import javax.sip.header.EventHeader;
@Data @Data
public class SipTransactionInfo { public class SipTransactionInfo {
@ -12,6 +14,7 @@ public class SipTransactionInfo {
private String viaBranch; private String viaBranch;
private int expires; private int expires;
private String user; private String user;
private String eventId;
// 自己是否媒体流发送者 // 自己是否媒体流发送者
private boolean asSender; private boolean asSender;
@ -22,6 +25,10 @@ public class SipTransactionInfo {
this.toTag = response.getToTag(); this.toTag = response.getToTag();
this.viaBranch = response.getTopmostViaHeader().getBranch(); this.viaBranch = response.getTopmostViaHeader().getBranch();
this.asSender = asSender; this.asSender = asSender;
EventHeader header = (EventHeader)response.getHeader(EventHeader.NAME);
if (header != null) {
this.eventId = header.getEventId();
}
} }
public SipTransactionInfo(SIPResponse response) { public SipTransactionInfo(SIPResponse response) {
@ -30,6 +37,10 @@ public class SipTransactionInfo {
this.toTag = response.getToTag(); this.toTag = response.getToTag();
this.viaBranch = response.getTopmostViaHeader().getBranch(); this.viaBranch = response.getTopmostViaHeader().getBranch();
this.asSender = false; this.asSender = false;
EventHeader header = (EventHeader)response.getHeader(EventHeader.NAME);
if (header != null) {
this.eventId = header.getEventId();
}
} }
public SipTransactionInfo() { public SipTransactionInfo() {

View File

@ -665,4 +665,7 @@ public interface CommonGBChannelMapper {
@SelectProvider(type = ChannelProvider.class, method = "queryOldChanelListByChannels") @SelectProvider(type = ChannelProvider.class, method = "queryOldChanelListByChannels")
List<CommonGBChannel> queryOldChanelListByChannels(List<CommonGBChannel> channelList); List<CommonGBChannel> queryOldChanelListByChannels(List<CommonGBChannel> channelList);
@SelectProvider(type = ChannelProvider.class, method = "queryMeetingChannelList")
List<CameraChannel> queryMeetingChannelList(@Param("business") String business);
} }

View File

@ -567,13 +567,14 @@ public class ChannelProvider {
public String queryListForSy(Map<String, Object> params ){ public String queryListForSy(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) AND coalesce(wdc.gb_parent_id, wdc.parent_id) = #{groupDeviceId}"); sqlBuild.append(" where wdc.channel_type = 0 AND wdc.data_type != 2 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) AND coalesce(wdc.gb_parent_id, wdc.parent_id) = #{groupDeviceId}");
if (params.get("online") != null && (Boolean)params.get("online")) { if (params.get("online") != null && (Boolean)params.get("online")) {
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'ON'"); sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'ON'");
} }
if (params.get("online") != null && !(Boolean)params.get("online")) { if (params.get("online") != null && !(Boolean)params.get("online")) {
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'OFF'"); sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'OFF'");
} }
sqlBuild.append(" order by coalesce(wdc.gb_status, wdc.status) desc");
return sqlBuild.toString(); return sqlBuild.toString();
} }
@ -581,21 +582,22 @@ public class ChannelProvider {
public String queryListWithChildForSy(Map<String, Object> params ){ public String queryListWithChildForSy(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " + sqlBuild.append(" where wdc.channel_type = 0 AND wdc.data_type != 2 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) ");
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" ");
List<CameraGroup> groupList = (List<CameraGroup>)params.get("groupList"); List<CameraGroup> groupList = (List<CameraGroup>)params.get("groupList");
boolean first = true; if (groupList != null && !groupList.isEmpty()) {
for (CameraGroup group : groupList) { sqlBuild.append(" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
if (!first) { boolean first = true;
sqlBuild.append(","); for (CameraGroup group : groupList) {
if (!first) {
sqlBuild.append(",");
}
sqlBuild.append("'" + group.getDeviceId() + "'");
first = false;
} }
sqlBuild.append("'" + group.getDeviceId() + "'"); sqlBuild.append(" )");
first = false;
} }
sqlBuild.append(" )");
if (params.get("query") != null) { if (params.get("query") != null) {
sqlBuild.append(" AND (coalesce(wdc.gb_device_id, wdc.device_id) LIKE concat('%',#{query},'%') escape '/'" + sqlBuild.append(" AND (coalesce(wdc.gb_device_id, wdc.device_id) LIKE concat('%',#{query},'%') escape '/'" +
" OR coalesce(wdc.gb_name, wdc.name) LIKE concat('%',#{query},'%') escape '/' )") " OR coalesce(wdc.gb_name, wdc.name) LIKE concat('%',#{query},'%') escape '/' )")
@ -654,7 +656,7 @@ public class ChannelProvider {
public String queryListInBox(Map<String, Object> params ){ public String queryListInBox(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " + sqlBuild.append(" where wdc.channel_type = 0 AND wdc.data_type != 2 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@ -682,7 +684,7 @@ public class ChannelProvider {
public String queryListInCircleForMysql(Map<String, Object> params ){ public String queryListInCircleForMysql(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " + sqlBuild.append(" where wdc.channel_type = 0 AND wdc.data_type != 2 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@ -711,7 +713,7 @@ public class ChannelProvider {
public String queryListInCircleForKingBase(Map<String, Object> params ){ public String queryListInCircleForKingBase(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " + sqlBuild.append(" where wdc.channel_type = 0 AND wdc.data_type != 2 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@ -740,7 +742,7 @@ public class ChannelProvider {
public String queryListInPolygonForMysql(Map<String, Object> params ){ public String queryListInPolygonForMysql(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " + sqlBuild.append(" where wdc.channel_type = 0 AND wdc.data_type != 2 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@ -778,7 +780,7 @@ public class ChannelProvider {
public String queryListInPolygonForKingBase(Map<String, Object> params ){ public String queryListInPolygonForKingBase(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where wdc.channel_type = 0 AND (wdc.gb_ptz_type is null || wdc.gb_ptz_type != 99) " + sqlBuild.append(" where wdc.channel_type = 0 AND wdc.data_type != 2 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@ -836,19 +838,11 @@ public class ChannelProvider {
public String queryListByDeviceIds(Map<String, Object> params ){ public String queryListByDeviceIds(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append("<script> ");
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" where coalesce(wdc.gb_device_id, wdc.device_id) in ( "); sqlBuild.append(" where coalesce(wdc.gb_device_id, wdc.device_id) in ");
sqlBuild.append(" <foreach item='item' index='index' collection='deviceIds' open='(' separator=',' close=')'> #{item} </foreach>");
List<String> deviceIds = (List<String>)params.get("deviceIds"); sqlBuild.append(" </script>");
boolean first = true;
for (String deviceId : deviceIds) {
if (!first) {
sqlBuild.append(",");
}
sqlBuild.append(deviceId);
first = false;
}
sqlBuild.append(" )");
return sqlBuild.toString() ; return sqlBuild.toString() ;
} }
@ -873,13 +867,20 @@ public class ChannelProvider {
public String queryListForSyMobile(Map<String, Object> params ){ public String queryListForSyMobile(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" WHERE wdc.gb_ptz_type = 99 "); sqlBuild.append(" WHERE wdc.gb_ptz_type = 99 and wdc.channel_type = 0 AND wdc.data_type != 2 ");
if (params.get("business") != null) { if (params.get("business") != null) {
sqlBuild.append(" AND coalesce(gb_business_group_id, business_group_id) = #{business}"); sqlBuild.append(" AND coalesce(gb_business_group_id, business_group_id) = #{business}");
} }
return sqlBuild.toString(); return sqlBuild.toString();
} }
public String queryMeetingChannelList(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
sqlBuild.append(" WHERE wdc.channel_type = 0 AND wdc.data_type = 3 and wdc.gb_ptz_type = 98 and coalesce(wdc.gb_business_group_id, wdc.business_group_id) = #{business}");
return sqlBuild.toString();
}
public String queryCameraChannelById(Map<String, Object> params ){ public String queryCameraChannelById(Map<String, Object> params ){
return BASE_SQL_FOR_CAMERA_DEVICE + " where wdc.id = #{gbId}"; return BASE_SQL_FOR_CAMERA_DEVICE + " where wdc.id = #{gbId}";

View File

@ -11,7 +11,6 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import javax.sip.InvalidArgumentException; import javax.sip.InvalidArgumentException;
import javax.sip.SipException; import javax.sip.SipException;
@ -25,7 +24,7 @@ import java.util.Map;
* catalog事件 * catalog事件
*/ */
@Slf4j @Slf4j
@Component //@Component
public class CatalogEventLister implements ApplicationListener<CatalogEvent> { public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
@Autowired @Autowired

View File

@ -269,12 +269,15 @@ public class SIPRequestHeaderProvider {
ExpiresHeader expireHeader = SipFactory.getInstance().createHeaderFactory().createExpiresHeader(expires); ExpiresHeader expireHeader = SipFactory.getInstance().createHeaderFactory().createExpiresHeader(expires);
request.addHeader(expireHeader); request.addHeader(expireHeader);
// Event // Event
EventHeader eventHeader = SipFactory.getInstance().createHeaderFactory().createEventHeader(event); EventHeader eventHeader = SipFactory.getInstance().createHeaderFactory().createEventHeader(event);
if (sipTransactionInfo != null && sipTransactionInfo.getEventId() != null) {
int random = (int) Math.floor(Math.random() * 10000); eventHeader.setEventId(sipTransactionInfo.getEventId());
eventHeader.setEventId(random + ""); }else {
request.addHeader(eventHeader); int random = (int) Math.floor(Math.random() * 10000);
eventHeader.setEventId(random + "");
}
request.addHeader(eventHeader);
ContentTypeHeader contentTypeHeader = SipFactory.getInstance().createHeaderFactory().createContentTypeHeader("Application", "MANSCDP+xml"); ContentTypeHeader contentTypeHeader = SipFactory.getInstance().createHeaderFactory().createContentTypeHeader("Application", "MANSCDP+xml");
request.setContent(content, contentTypeHeader); request.setContent(content, contentTypeHeader);

View File

@ -1203,7 +1203,13 @@ public class SIPCommander implements ISIPCommander {
} else { } else {
callIdHeader = sipSender.getNewCallIdHeader(sipLayer.getLocalIp(device.getLocalIp()),device.getTransport()); callIdHeader = sipSender.getNewCallIdHeader(sipLayer.getLocalIp(device.getLocalIp()),device.getTransport());
} }
SIPRequest request = (SIPRequest) headerProvider.createSubscribeRequest(device, subscribePostitionXml.toString(), sipTransactionInfo, device.getSubscribeCycleForMobilePosition(), "presence",callIdHeader); //Position;id=" + tm.substring(tm.length() - 4));
int subscribeCycleForMobilePosition = device.getSubscribeCycleForMobilePosition();
if (subscribeCycleForMobilePosition > 0) {
// 移动位置订阅有效期不小于 30
subscribeCycleForMobilePosition = Math.max(subscribeCycleForMobilePosition, 30);
}
SIPRequest request = (SIPRequest) headerProvider.createSubscribeRequest(device, subscribePostitionXml.toString(), sipTransactionInfo, subscribeCycleForMobilePosition, "presence",callIdHeader); //Position;id=" + tm.substring(tm.length() - 4));
sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request, errorEvent, okEvent); sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request, errorEvent, okEvent);
return request; return request;
@ -1275,8 +1281,13 @@ public class SIPCommander implements ISIPCommander {
callIdHeader = sipSender.getNewCallIdHeader(sipLayer.getLocalIp(device.getLocalIp()),device.getTransport()); callIdHeader = sipSender.getNewCallIdHeader(sipLayer.getLocalIp(device.getLocalIp()),device.getTransport());
} }
int subscribeCycleForCatalog = device.getSubscribeCycleForCatalog();
if (subscribeCycleForCatalog > 0) {
// 目录订阅有效期不小于 30
subscribeCycleForCatalog = Math.max(subscribeCycleForCatalog, 30);
}
// 有效时间默认为60秒以上 // 有效时间默认为60秒以上
SIPRequest request = (SIPRequest) headerProvider.createSubscribeRequest(device, cmdXml.toString(), sipTransactionInfo, device.getSubscribeCycleForCatalog(), "Catalog", SIPRequest request = (SIPRequest) headerProvider.createSubscribeRequest(device, cmdXml.toString(), sipTransactionInfo, subscribeCycleForCatalog, "Catalog",
callIdHeader); callIdHeader);
sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request, errorEvent, okEvent); sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request, errorEvent, okEvent);
return request; return request;

View File

@ -17,5 +17,8 @@ public class ABLUrls {
@JSONField(name = "http-mp4") @JSONField(name = "http-mp4")
private String httpMp4; private String httpMp4;
@JSONField(name = "http-hls")
private String httpHls;
private String download; private String download;
} }

View File

@ -1,58 +0,0 @@
package com.genersoft.iot.vmp.media.abl.bean;
public class AblUrls {
private String rtsp;
private String rtmp;
private String httpFlv;
private String wsFlv;
private String httpMp4;
private String httpHls;
public String getRtsp() {
return rtsp;
}
public void setRtsp(String rtsp) {
this.rtsp = rtsp;
}
public String getRtmp() {
return rtmp;
}
public void setRtmp(String rtmp) {
this.rtmp = rtmp;
}
public String getHttpFlv() {
return httpFlv;
}
public void setHttpFlv(String httpFlv) {
this.httpFlv = httpFlv;
}
public String getWsFlv() {
return wsFlv;
}
public void setWsFlv(String wsFlv) {
this.wsFlv = wsFlv;
}
public String getHttpMp4() {
return httpMp4;
}
public void setHttpMp4(String httpMp4) {
this.httpMp4 = httpMp4;
}
public String getHttpHls() {
return httpHls;
}
public void setHttpHls(String httpHls) {
this.httpHls = httpHls;
}
}

View File

@ -1,6 +1,6 @@
package com.genersoft.iot.vmp.media.abl.bean.hook; package com.genersoft.iot.vmp.media.abl.bean.hook;
import com.genersoft.iot.vmp.media.abl.bean.AblUrls; import com.genersoft.iot.vmp.media.abl.bean.ABLUrls;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -108,5 +108,5 @@ public class OnStreamArriveABLHookParam extends ABLHookParam{
private Integer audioBitrate; private Integer audioBitrate;
private AblUrls url; private ABLUrls url;
} }

View File

@ -93,4 +93,5 @@ public interface IStreamProxyService {
StreamProxy getStreamProxy(int id); StreamProxy getStreamProxy(int id);
void delete(int id); void delete(int id);
} }

View File

@ -13,6 +13,7 @@ import com.genersoft.iot.vmp.service.bean.CloudRecordItem;
import com.genersoft.iot.vmp.service.bean.ErrorCallback; import com.genersoft.iot.vmp.service.bean.ErrorCallback;
import com.genersoft.iot.vmp.service.bean.InviteErrorCode; import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.streamProxy.service.IStreamProxyService;
import com.genersoft.iot.vmp.streamPush.service.IStreamPushPlayService; import com.genersoft.iot.vmp.streamPush.service.IStreamPushPlayService;
import com.genersoft.iot.vmp.utils.DateUtil; import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.utils.HttpUtils; import com.genersoft.iot.vmp.utils.HttpUtils;
@ -72,6 +73,9 @@ public class CameraChannelController {
@Autowired @Autowired
private IStreamPushPlayService streamPushPlayService; private IStreamPushPlayService streamPushPlayService;
@Autowired
private IStreamProxyService streamProxyService;
@GetMapping(value = "/camera/list") @GetMapping(value = "/camera/list")
@ResponseBody @ResponseBody
@ -108,7 +112,7 @@ public class CameraChannelController {
@RequestParam(required = false) String query, @RequestParam(required = false) String query,
@RequestParam(required = false) String sortName, @RequestParam(required = false) String sortName,
@RequestParam(required = false) Boolean order, @RequestParam(required = false) Boolean order,
String groupAlias, @RequestParam(required = false) String groupAlias,
@RequestParam(required = false) String geoCoordSys, @RequestParam(required = false) String geoCoordSys,
@RequestParam(required = false) Boolean status){ @RequestParam(required = false) Boolean status){
if (ObjectUtils.isEmpty(query)) { if (ObjectUtils.isEmpty(query)) {
@ -552,4 +556,14 @@ public class CameraChannelController {
public void stop(String app, String stream){ public void stop(String app, String stream){
streamPushPlayService.stop(app, stream); streamPushPlayService.stop(app, stream);
} }
@GetMapping(value = "/camera/meeting/list")
@ResponseBody
@Operation(summary = "查询会议设备", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "topGroupAlias", description = "分组别名")
public List<CameraChannel> queryMeetingChannelList(String topGroupAlias){
return channelService.queryMeetingChannelList(topGroupAlias);
}
} }

View File

@ -45,6 +45,10 @@ public class SignAuthenticationFilter extends OncePerRequestFilter {
chain.doFilter(request, response); chain.doFilter(request, response);
return; return;
} }
// if (request.getParameter("ccerty") != null) {
// chain.doFilter(request, response);
// return;
// }
// 设置响应内容类型 // 设置响应内容类型
response.setContentType("application/json;charset=UTF-8"); response.setContentType("application/json;charset=UTF-8");
@ -150,9 +154,11 @@ public class SignAuthenticationFilter extends OncePerRequestFilter {
}catch (Exception e) { }catch (Exception e) {
log.info("[SY-接口验签] 读取body失败, 请求地址: {} ", requestURI, e); log.info("[SY-接口验签] 读取body失败, 请求地址: {} ", requestURI, e);
response.setStatus(Response.OK); response.setStatus(Response.OK);
PrintWriter out = response.getWriter(); if (!response.isCommitted()) {
out.println(getErrorResult(6017, "接口鉴权异常")); PrintWriter out = response.getWriter();
out.close(); out.println(getErrorResult(6017, "接口鉴权异常"));
out.close();
}
return; return;
} }
chain.doFilter(request, response); chain.doFilter(request, response);

View File

@ -207,13 +207,13 @@ public class CameraChannelService implements CommandLineRunner {
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.ADD); sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.ADD);
} }
if (!resultListForUpdate.isEmpty()) { if (!resultListForUpdate.isEmpty()) {
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.UPDATE); sendChannelMessage(resultListForUpdate, ChannelEvent.ChannelEventMessageType.UPDATE);
} }
if (!resultListForOnline.isEmpty()) { if (!resultListForOnline.isEmpty()) {
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.ON); sendChannelMessage(resultListForOnline, ChannelEvent.ChannelEventMessageType.ON);
} }
if (!resultListForOffline.isEmpty()) { if (!resultListForOffline.isEmpty()) {
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.OFF); sendChannelMessage(resultListForOffline, ChannelEvent.ChannelEventMessageType.OFF);
} }
} }
@ -273,13 +273,18 @@ public class CameraChannelService implements CommandLineRunner {
} }
public PageInfo<CameraChannel> queryListWithChild(Integer page, Integer count, String query, String sortName, Boolean order, String groupAlias, Boolean status, String geoCoordSys) { public PageInfo<CameraChannel> queryListWithChild(Integer page, Integer count, String query, String sortName, Boolean order, String groupAlias, Boolean status, String geoCoordSys) {
List<CameraGroup> groupList = null;
// 构建组织结构信息 // 构建组织结构信息
CameraGroup group = groupMapper.queryGroupByAlias(groupAlias); if (groupAlias != null) {
Assert.notNull(group, "组织结构不存在"); CameraGroup group = groupMapper.queryGroupByAlias(groupAlias);
String groupDeviceId = group.getDeviceId(); Assert.notNull(group, "组织结构不存在");
// 获取所有子节点 String groupDeviceId = group.getDeviceId();
List<CameraGroup> groupList = queryAllGroupChildren(group.getId(), group.getBusinessGroup()); // 获取所有子节点
groupList.add(group); groupList = queryAllGroupChildren(group.getId(), group.getBusinessGroup());
groupList.add(group);
}
// 构建分页 // 构建分页
PageHelper.startPage(page, count); PageHelper.startPage(page, count);
if (query != null) { if (query != null) {
@ -635,4 +640,12 @@ public class CameraChannelService implements CommandLineRunner {
} }
public List<CameraChannel> queryMeetingChannelList(String topGroupAlias) {
CameraGroup cameraGroup = groupMapper.queryGroupByAlias(topGroupAlias);
Assert.notNull(cameraGroup, "域不存在");
String business = cameraGroup.getDeviceId();
Assert.notNull(business, "域不存在");
return channelMapper.queryMeetingChannelList(business);
}
} }

View File

@ -132,7 +132,7 @@ export default {
data() { data() {
return { return {
channelList: [], channelList: [],
tableHeight: `calc(100vh - ${this.$refs.queryForm.offsetHeight}px)`, tableHeight: `calc(100vh - 190px)`,
searchStr: '', searchStr: '',
channelType: '', channelType: '',
online: '', online: '',
@ -152,6 +152,7 @@ export default {
created() { created() {
this.initData() this.initData()
this.tableHeight = `calc(100vh - ${this.$refs.queryForm.offsetHeight}px)`
}, },
destroyed() { destroyed() {
}, },

View File

@ -322,7 +322,7 @@ export default {
link.click() link.click()
}, },
deleteOneRecord(row) { deleteOneRecord(row) {
this.$confirm(`确定删除?`, '提示', { this.$confirm('确定删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'

View File

@ -56,7 +56,7 @@
<el-input v-model="form.gbLatitude" placeholder="请输入纬度" /> <el-input v-model="form.gbLatitude" placeholder="请输入纬度" />
</el-form-item> </el-form-item>
<el-form-item label="摄像机类型"> <el-form-item label="摄像机类型">
<el-select v-model="form.gbPtzType" style="width: 100%" placeholder="请选择云台类型"> <el-select v-model="form.gbPtzType" style="width: 100%" placeholder="请选择摄像机类型">
<el-option label="球机" :value="1" /> <el-option label="球机" :value="1" />
<el-option label="半球" :value="2" /> <el-option label="半球" :value="2" />
<el-option label="固定枪机" :value="3" /> <el-option label="固定枪机" :value="3" />
@ -65,6 +65,7 @@
<el-option label="多目设备的全景/拼接通道" :value="6" /> <el-option label="多目设备的全景/拼接通道" :value="6" />
<el-option label="多目设备的分割通道" :value="7" /> <el-option label="多目设备的分割通道" :value="7" />
<el-option label="移动设备(非标)" :value="99" /> <el-option label="移动设备(非标)" :value="99" />
<el-option label="会议设备(非标)" :value="98" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
@ -151,14 +152,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="用途"> <el-form-item label="用途">
<el-select v-model="form.gbUseType" style="width: 100%" placeholder="请选择位置类型"> <el-select v-model="form.gbUseType" style="width: 100%" placeholder="请选择用途类型">
<el-option label="治安" :value="1" /> <el-option label="治安" :value="1" />
<el-option label="交通" :value="2" /> <el-option label="交通" :value="2" />
<el-option label="重点" :value="3" /> <el-option label="重点" :value="3" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="补光"> <el-form-item label="补光">
<el-select v-model="form.gbSupplyLightType" style="width: 100%" placeholder="请选择位置类型"> <el-select v-model="form.gbSupplyLightType" style="width: 100%" placeholder="请选择补光类型">
<el-option label="无补光" :value="1" /> <el-option label="无补光" :value="1" />
<el-option label="红外补光" :value="2" /> <el-option label="红外补光" :value="2" />
<el-option label="白光补光" :value="3" /> <el-option label="白光补光" :value="3" />
@ -167,7 +168,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="监视方位"> <el-form-item label="监视方位">
<el-select v-model="form.gbDirectionType" style="width: 100%" placeholder="请选择置类型"> <el-select v-model="form.gbDirectionType" style="width: 100%" placeholder="请选择监视方位">
<el-option label="东(西向东)" :value="1" /> <el-option label="东(西向东)" :value="1" />
<el-option label="西(东向西)" :value="2" /> <el-option label="西(东向西)" :value="2" />
<el-option label="南(北向南)" :value="3" /> <el-option label="南(北向南)" :value="3" />
@ -190,7 +191,7 @@
<el-input v-model="form.gbResolution" placeholder="请输入分辨率" /> <el-input v-model="form.gbResolution" placeholder="请输入分辨率" />
</el-form-item> </el-form-item>
<el-form-item label="下载倍速"> <el-form-item label="下载倍速">
<el-select v-model="form.gbDownloadSpeedArray" multiple style="width: 100%" placeholder="请选择位置类型"> <el-select v-model="form.gbDownloadSpeedArray" multiple style="width: 100%" placeholder="请选择下载倍速">
<el-option label="1倍速" value="1" /> <el-option label="1倍速" value="1" />
<el-option label="2倍速" value="2" /> <el-option label="2倍速" value="2" />
<el-option label="4倍速" value="4" /> <el-option label="4倍速" value="4" />
@ -206,7 +207,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="时域编码能力"> <el-form-item label="时域编码能力">
<el-select v-model="form.gbSvcTimeSupportMode" style="width: 100%" placeholder="请选择域编码能力"> <el-select v-model="form.gbSvcTimeSupportMode" style="width: 100%" placeholder="请选择域编码能力">
<el-option label="1级增强" value="1" /> <el-option label="1级增强" value="1" />
<el-option label="2级增强" value="2" /> <el-option label="2级增强" value="2" />
<el-option label="3级增强" value="3" /> <el-option label="3级增强" value="3" />
@ -356,6 +357,8 @@ export default {
}, },
chooseGroup: function() { chooseGroup: function() {
this.$refs.chooseGroup.openDialog((deviceId, businessGroupId) => { this.$refs.chooseGroup.openDialog((deviceId, businessGroupId) => {
console.log(deviceId)
console.log(businessGroupId)
this.form.gbBusinessGroupId = businessGroupId this.form.gbBusinessGroupId = businessGroupId
this.form.gbParentId = deviceId this.form.gbParentId = deviceId
}) })

View File

@ -15,7 +15,7 @@
:show-header="true" :show-header="true"
:edit="true" :edit="true"
:enable-add-channel="false" :enable-add-channel="false"
:click-event="treeNodeClickEvent" @clickEvent="treeNodeClickEvent"
:on-channel-change="onChannelChange" :on-channel-change="onChannelChange"
:tree-height="'45vh'" :tree-height="'45vh'"
/> />

View File

@ -16,7 +16,7 @@
:show-header="true" :show-header="true"
:edit="true" :edit="true"
:enable-add-channel="false" :enable-add-channel="false"
:click-event="treeNodeClickEvent" @clickEvent="treeNodeClickEvent"
:on-channel-change="onChannelChange" :on-channel-change="onChannelChange"
:tree-height="'45vh'" :tree-height="'45vh'"
/> />
@ -67,6 +67,8 @@ export default {
this.showDialog = false this.showDialog = false
}, },
treeNodeClickEvent: function(group) { treeNodeClickEvent: function(group) {
console.log(111)
console.log(group)
if (group.deviceId === '' || group.deviceId === group.businessGroup) { if (group.deviceId === '' || group.deviceId === group.businessGroup) {
return return
} }

View File

@ -589,13 +589,13 @@ export default {
this.layerGroupSource = layerGroupSource this.layerGroupSource = layerGroupSource
this.drawThinLayer = this.$refs.mapComponent.addPointLayerGroup(layerGroupSource, data => { this.drawThinLayer = this.$refs.mapComponent.addPointLayerGroup(layerGroupSource, data => {
this.closeInfoBox() this.closeInfoBox()
this.$nextTick(() => { // this.$nextTick(() => {
if (data[0].edit) { // if (data[0].edit) {
this.showEditInfo(data[0]) // this.showEditInfo(data[0])
}else { // }else {
this.showChannelInfo(data[0]) // this.showChannelInfo(data[0])
} // }
}) // })
}) })
this.quicklyDrawThinLoading = false this.quicklyDrawThinLoading = false
this.$message.success({ this.$message.success({
@ -617,77 +617,88 @@ export default {
if (this.channelLayer) { if (this.channelLayer) {
this.$refs.mapComponent.removeLayer(this.channelLayer) this.$refs.mapComponent.removeLayer(this.channelLayer)
} }
this.$message.info({
let zoomExtent = this.$refs.mapComponent.getZoomExtent() showClose: true,
let cameraListInExtent = [] message: '正在抽稀,请稍等'
let cameraListOutExtent = [] })
if (this.layerGroupSource !== null) { setTimeout(() => {
// let zoomExtent = this.$refs.mapComponent.getZoomExtent()
let sourceCameraList = this.layerGroupSource.get(0) let cameraListInExtent = []
console.log(sourceCameraList) let cameraListOutExtent = []
if (!sourceCameraList) {
this.$message.warning({
showClose: true,
message: '数据已经全部抽稀'
})
return
}
for (let i = 0; i < sourceCameraList.length; i++) {
let value = sourceCameraList[i]
if (!value.data.gbLongitude || !value.data.gbLatitude) {
continue
}
if (value.data.gbLongitude >= extent[0] && value.data.gbLongitude <= extent[2]
&& value.data.gbLatitude >= extent[1] && value.data.gbLatitude <= extent[3]) {
cameraListInExtent.push(value.data)
}else {
cameraListOutExtent.push(value.data)
}
}
}else {
for (let i = 0; i < cameraListForSource.length; i++) {
let value = cameraListForSource[i]
if (!value.gbLongitude || !value.gbLatitude) {
continue
}
if (value.gbLongitude >= extent[0] && value.gbLongitude <= extent[2]
&& value.gbLatitude >= extent[1] && value.gbLatitude <= extent[3]) {
cameraListInExtent.push(value)
}else {
cameraListOutExtent.push(value)
}
}
}
//
if (this.drawThinLayer !== null) {
this.$refs.mapComponent.removeLayer(this.drawThinLayer)
this.drawThinLayer = null
}
this.drawThin(cameraListInExtent).then((layerGroupSource) => {
if (this.layerGroupSource !== null) { if (this.layerGroupSource !== null) {
let zoom = zoomExtent[0] //
// let sourceCameraList = this.layerGroupSource.get(0)
while (zoom < zoomExtent[1]) { console.log(sourceCameraList)
Array.prototype.push.apply(layerGroupSource.get(zoom), this.layerGroupSource.get(zoom)) if (!sourceCameraList) {
zoom += 1 this.$message.warning({
showClose: true,
message: '数据已经全部抽稀'
})
return
}
for (let i = 0; i < sourceCameraList.length; i++) {
let value = sourceCameraList[i]
if (!value.data.gbLongitude || !value.data.gbLatitude) {
continue
}
if (value.data.gbLongitude >= extent[0] && value.data.gbLongitude <= extent[2]
&& value.data.gbLatitude >= extent[1] && value.data.gbLatitude <= extent[3]) {
cameraListInExtent.push(value.data)
}else {
cameraListOutExtent.push(value.data)
}
}
}else {
for (let i = 0; i < cameraListForSource.length; i++) {
let value = cameraListForSource[i]
if (!value.gbLongitude || !value.gbLatitude) {
continue
}
if (value.gbLongitude >= extent[0] && value.gbLongitude <= extent[2]
&& value.gbLatitude >= extent[1] && value.gbLatitude <= extent[3]) {
cameraListInExtent.push(value)
}else {
cameraListOutExtent.push(value)
}
} }
} }
if (cameraListOutExtent.length > 0) { //
let layerSourceForOutExtent = this.createZoomLayerSource(cameraListOutExtent, zoomExtent[0]) if (this.drawThinLayer !== null) {
layerGroupSource.set(0, layerSourceForOutExtent) this.$refs.mapComponent.removeLayer(this.drawThinLayer)
this.drawThinLayer = null
} }
this.layerGroupSource = layerGroupSource this.drawThin(cameraListInExtent).then((layerGroupSource) => {
this.drawThinLayer = this.$refs.mapComponent.addPointLayerGroup(layerGroupSource, data => { if (this.layerGroupSource !== null) {
this.closeInfoBox() let zoom = zoomExtent[0]
this.$nextTick(() => { //
if (data[0].edit) { while (zoom < zoomExtent[1]) {
this.showEditInfo(data[0]) Array.prototype.push.apply(layerGroupSource.get(zoom), this.layerGroupSource.get(zoom))
}else { zoom += 1
this.showChannelInfo(data[0])
} }
}
if (cameraListOutExtent.length > 0) {
let layerSourceForOutExtent = this.createZoomLayerSource(cameraListOutExtent, zoomExtent[0])
layerGroupSource.set(0, layerSourceForOutExtent)
}
this.layerGroupSource = layerGroupSource
this.drawThinLayer = this.$refs.mapComponent.addPointLayerGroup(layerGroupSource, data => {
this.closeInfoBox()
// this.$nextTick(() => {
// if (data[0].edit) {
// this.showEditInfo(data[0])
// }else {
// this.showChannelInfo(data[0])
// }
// })
})
this.$message.success({
showClose: true,
message: '抽稀完成,请预览无误后保存抽稀结果,如需继续,请再次点击局部抽稀按钮'
}) })
}) })
}) }, 100)
}) })
}, },
drawThin: function (cameraListInExtent){ drawThin: function (cameraListInExtent){
@ -810,6 +821,7 @@ export default {
showClose: true, showClose: true,
message: '保存成功' message: '保存成功'
}) })
this.showDrawThin = false
}) })
.finally(() => { .finally(() => {
this.saveDrawThinLoading = false this.saveDrawThinLoading = false