Merge remote-tracking branch 'origin/dev/springBoot3' into dev/springBoot3
This commit is contained in:
@@ -101,7 +101,8 @@ public class CommonGBChannel {
|
||||
@Schema(description = "国标-虚拟组织所属的业务分组ID")
|
||||
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;
|
||||
|
||||
// 2016
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.genersoft.iot.vmp.gb28181.bean;
|
||||
import gov.nist.javax.sip.message.SIPResponse;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.sip.header.EventHeader;
|
||||
|
||||
@Data
|
||||
public class SipTransactionInfo {
|
||||
|
||||
@@ -12,6 +14,7 @@ public class SipTransactionInfo {
|
||||
private String viaBranch;
|
||||
private int expires;
|
||||
private String user;
|
||||
private String eventId;
|
||||
|
||||
// 自己是否媒体流发送者
|
||||
private boolean asSender;
|
||||
@@ -22,6 +25,10 @@ public class SipTransactionInfo {
|
||||
this.toTag = response.getToTag();
|
||||
this.viaBranch = response.getTopmostViaHeader().getBranch();
|
||||
this.asSender = asSender;
|
||||
EventHeader header = (EventHeader)response.getHeader(EventHeader.NAME);
|
||||
if (header != null) {
|
||||
this.eventId = header.getEventId();
|
||||
}
|
||||
}
|
||||
|
||||
public SipTransactionInfo(SIPResponse response) {
|
||||
@@ -30,6 +37,10 @@ public class SipTransactionInfo {
|
||||
this.toTag = response.getToTag();
|
||||
this.viaBranch = response.getTopmostViaHeader().getBranch();
|
||||
this.asSender = false;
|
||||
EventHeader header = (EventHeader)response.getHeader(EventHeader.NAME);
|
||||
if (header != null) {
|
||||
this.eventId = header.getEventId();
|
||||
}
|
||||
}
|
||||
|
||||
public SipTransactionInfo() {
|
||||
|
||||
@@ -665,4 +665,7 @@ public interface CommonGBChannelMapper {
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryOldChanelListByChannels")
|
||||
List<CommonGBChannel> queryOldChanelListByChannels(List<CommonGBChannel> channelList);
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryMeetingChannelList")
|
||||
List<CameraChannel> queryMeetingChannelList(@Param("business") String business);
|
||||
}
|
||||
|
||||
@@ -567,13 +567,14 @@ public class ChannelProvider {
|
||||
public String queryListForSy(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
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")) {
|
||||
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'ON'");
|
||||
}
|
||||
if (params.get("online") != null && !(Boolean)params.get("online")) {
|
||||
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'OFF'");
|
||||
}
|
||||
sqlBuild.append(" order by coalesce(wdc.gb_status, wdc.status) desc");
|
||||
|
||||
return sqlBuild.toString();
|
||||
}
|
||||
@@ -581,21 +582,22 @@ public class ChannelProvider {
|
||||
public String queryListWithChildForSy(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
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) in (");
|
||||
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)) ");
|
||||
|
||||
|
||||
sqlBuild.append(" ");
|
||||
List<CameraGroup> groupList = (List<CameraGroup>)params.get("groupList");
|
||||
boolean first = true;
|
||||
for (CameraGroup group : groupList) {
|
||||
if (!first) {
|
||||
sqlBuild.append(",");
|
||||
if (groupList != null && !groupList.isEmpty()) {
|
||||
sqlBuild.append(" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
|
||||
boolean first = true;
|
||||
for (CameraGroup group : groupList) {
|
||||
if (!first) {
|
||||
sqlBuild.append(",");
|
||||
}
|
||||
sqlBuild.append("'" + group.getDeviceId() + "'");
|
||||
first = false;
|
||||
}
|
||||
sqlBuild.append("'" + group.getDeviceId() + "'");
|
||||
first = false;
|
||||
sqlBuild.append(" )");
|
||||
}
|
||||
sqlBuild.append(" )");
|
||||
|
||||
if (params.get("query") != null) {
|
||||
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 '/' )")
|
||||
@@ -654,7 +656,7 @@ public class ChannelProvider {
|
||||
public String queryListInBox(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
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(" ");
|
||||
@@ -682,7 +684,7 @@ public class ChannelProvider {
|
||||
public String queryListInCircleForMysql(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
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(" ");
|
||||
@@ -711,7 +713,7 @@ public class ChannelProvider {
|
||||
public String queryListInCircleForKingBase(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
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(" ");
|
||||
@@ -740,7 +742,7 @@ public class ChannelProvider {
|
||||
public String queryListInPolygonForMysql(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
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(" ");
|
||||
@@ -778,7 +780,7 @@ public class ChannelProvider {
|
||||
public String queryListInPolygonForKingBase(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
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(" ");
|
||||
@@ -836,19 +838,11 @@ public class ChannelProvider {
|
||||
|
||||
public String queryListByDeviceIds(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
sqlBuild.append("<script> ");
|
||||
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
|
||||
sqlBuild.append(" where coalesce(wdc.gb_device_id, wdc.device_id) in ( ");
|
||||
|
||||
List<String> deviceIds = (List<String>)params.get("deviceIds");
|
||||
boolean first = true;
|
||||
for (String deviceId : deviceIds) {
|
||||
if (!first) {
|
||||
sqlBuild.append(",");
|
||||
}
|
||||
sqlBuild.append(deviceId);
|
||||
first = false;
|
||||
}
|
||||
sqlBuild.append(" )");
|
||||
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>");
|
||||
sqlBuild.append(" </script>");
|
||||
return sqlBuild.toString() ;
|
||||
}
|
||||
|
||||
@@ -873,13 +867,20 @@ public class ChannelProvider {
|
||||
public String queryListForSyMobile(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
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) {
|
||||
sqlBuild.append(" AND coalesce(gb_business_group_id, business_group_id) = #{business}");
|
||||
}
|
||||
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 ){
|
||||
return BASE_SQL_FOR_CAMERA_DEVICE + " where wdc.id = #{gbId}";
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.sip.InvalidArgumentException;
|
||||
import javax.sip.SipException;
|
||||
@@ -25,7 +24,7 @@ import java.util.Map;
|
||||
* catalog事件
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
//@Component
|
||||
public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -269,12 +269,15 @@ public class SIPRequestHeaderProvider {
|
||||
ExpiresHeader expireHeader = SipFactory.getInstance().createHeaderFactory().createExpiresHeader(expires);
|
||||
request.addHeader(expireHeader);
|
||||
|
||||
// Event
|
||||
EventHeader eventHeader = SipFactory.getInstance().createHeaderFactory().createEventHeader(event);
|
||||
|
||||
int random = (int) Math.floor(Math.random() * 10000);
|
||||
eventHeader.setEventId(random + "");
|
||||
request.addHeader(eventHeader);
|
||||
// Event
|
||||
EventHeader eventHeader = SipFactory.getInstance().createHeaderFactory().createEventHeader(event);
|
||||
if (sipTransactionInfo != null && sipTransactionInfo.getEventId() != null) {
|
||||
eventHeader.setEventId(sipTransactionInfo.getEventId());
|
||||
}else {
|
||||
int random = (int) Math.floor(Math.random() * 10000);
|
||||
eventHeader.setEventId(random + "");
|
||||
}
|
||||
request.addHeader(eventHeader);
|
||||
|
||||
ContentTypeHeader contentTypeHeader = SipFactory.getInstance().createHeaderFactory().createContentTypeHeader("Application", "MANSCDP+xml");
|
||||
request.setContent(content, contentTypeHeader);
|
||||
|
||||
@@ -1203,7 +1203,13 @@ public class SIPCommander implements ISIPCommander {
|
||||
} else {
|
||||
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);
|
||||
return request;
|
||||
@@ -1275,8 +1281,13 @@ public class SIPCommander implements ISIPCommander {
|
||||
callIdHeader = sipSender.getNewCallIdHeader(sipLayer.getLocalIp(device.getLocalIp()),device.getTransport());
|
||||
}
|
||||
|
||||
int subscribeCycleForCatalog = device.getSubscribeCycleForCatalog();
|
||||
if (subscribeCycleForCatalog > 0) {
|
||||
// 目录订阅有效期不小于 30 秒
|
||||
subscribeCycleForCatalog = Math.max(subscribeCycleForCatalog, 30);
|
||||
}
|
||||
// 有效时间默认为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);
|
||||
sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request, errorEvent, okEvent);
|
||||
return request;
|
||||
|
||||
@@ -17,5 +17,8 @@ public class ABLUrls {
|
||||
@JSONField(name = "http-mp4")
|
||||
private String httpMp4;
|
||||
|
||||
@JSONField(name = "http-hls")
|
||||
private String httpHls;
|
||||
|
||||
private String download;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
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.Setter;
|
||||
|
||||
@@ -108,5 +108,5 @@ public class OnStreamArriveABLHookParam extends ABLHookParam{
|
||||
private Integer audioBitrate;
|
||||
|
||||
|
||||
private AblUrls url;
|
||||
private ABLUrls url;
|
||||
}
|
||||
|
||||
@@ -93,4 +93,5 @@ public interface IStreamProxyService {
|
||||
StreamProxy getStreamProxy(int id);
|
||||
|
||||
void delete(int id);
|
||||
|
||||
}
|
||||
|
||||
@@ -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.InviteErrorCode;
|
||||
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.utils.DateUtil;
|
||||
import com.genersoft.iot.vmp.utils.HttpUtils;
|
||||
@@ -72,6 +73,9 @@ public class CameraChannelController {
|
||||
@Autowired
|
||||
private IStreamPushPlayService streamPushPlayService;
|
||||
|
||||
@Autowired
|
||||
private IStreamProxyService streamProxyService;
|
||||
|
||||
|
||||
@GetMapping(value = "/camera/list")
|
||||
@ResponseBody
|
||||
@@ -108,7 +112,7 @@ public class CameraChannelController {
|
||||
@RequestParam(required = false) String query,
|
||||
@RequestParam(required = false) String sortName,
|
||||
@RequestParam(required = false) Boolean order,
|
||||
String groupAlias,
|
||||
@RequestParam(required = false) String groupAlias,
|
||||
@RequestParam(required = false) String geoCoordSys,
|
||||
@RequestParam(required = false) Boolean status){
|
||||
if (ObjectUtils.isEmpty(query)) {
|
||||
@@ -552,4 +556,14 @@ public class CameraChannelController {
|
||||
public void stop(String app, String 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -45,6 +45,10 @@ public class SignAuthenticationFilter extends OncePerRequestFilter {
|
||||
chain.doFilter(request, response);
|
||||
return;
|
||||
}
|
||||
// if (request.getParameter("ccerty") != null) {
|
||||
// chain.doFilter(request, response);
|
||||
// return;
|
||||
// }
|
||||
// 设置响应内容类型
|
||||
response.setContentType("application/json;charset=UTF-8");
|
||||
|
||||
@@ -150,9 +154,11 @@ public class SignAuthenticationFilter extends OncePerRequestFilter {
|
||||
}catch (Exception e) {
|
||||
log.info("[SY-接口验签] 读取body失败, 请求地址: {} ", requestURI, e);
|
||||
response.setStatus(Response.OK);
|
||||
PrintWriter out = response.getWriter();
|
||||
out.println(getErrorResult(6017, "接口鉴权异常"));
|
||||
out.close();
|
||||
if (!response.isCommitted()) {
|
||||
PrintWriter out = response.getWriter();
|
||||
out.println(getErrorResult(6017, "接口鉴权异常"));
|
||||
out.close();
|
||||
}
|
||||
return;
|
||||
}
|
||||
chain.doFilter(request, response);
|
||||
|
||||
@@ -207,13 +207,13 @@ public class CameraChannelService implements CommandLineRunner {
|
||||
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.ADD);
|
||||
}
|
||||
if (!resultListForUpdate.isEmpty()) {
|
||||
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.UPDATE);
|
||||
sendChannelMessage(resultListForUpdate, ChannelEvent.ChannelEventMessageType.UPDATE);
|
||||
}
|
||||
if (!resultListForOnline.isEmpty()) {
|
||||
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.ON);
|
||||
sendChannelMessage(resultListForOnline, ChannelEvent.ChannelEventMessageType.ON);
|
||||
}
|
||||
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) {
|
||||
|
||||
List<CameraGroup> groupList = null;
|
||||
// 构建组织结构信息
|
||||
CameraGroup group = groupMapper.queryGroupByAlias(groupAlias);
|
||||
Assert.notNull(group, "组织结构不存在");
|
||||
String groupDeviceId = group.getDeviceId();
|
||||
// 获取所有子节点
|
||||
List<CameraGroup> groupList = queryAllGroupChildren(group.getId(), group.getBusinessGroup());
|
||||
groupList.add(group);
|
||||
if (groupAlias != null) {
|
||||
CameraGroup group = groupMapper.queryGroupByAlias(groupAlias);
|
||||
Assert.notNull(group, "组织结构不存在");
|
||||
String groupDeviceId = group.getDeviceId();
|
||||
// 获取所有子节点
|
||||
groupList = queryAllGroupChildren(group.getId(), group.getBusinessGroup());
|
||||
groupList.add(group);
|
||||
}
|
||||
|
||||
// 构建分页
|
||||
PageHelper.startPage(page, count);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
channelList: [],
|
||||
tableHeight: `calc(100vh - ${this.$refs.queryForm.offsetHeight}px)`,
|
||||
tableHeight: `calc(100vh - 190px)`,
|
||||
searchStr: '',
|
||||
channelType: '',
|
||||
online: '',
|
||||
@@ -152,6 +152,7 @@ export default {
|
||||
|
||||
created() {
|
||||
this.initData()
|
||||
this.tableHeight = `calc(100vh - ${this.$refs.queryForm.offsetHeight}px)`
|
||||
},
|
||||
destroyed() {
|
||||
},
|
||||
|
||||
@@ -322,7 +322,7 @@ export default {
|
||||
link.click()
|
||||
},
|
||||
deleteOneRecord(row) {
|
||||
this.$confirm(`确定删除?`, '提示', {
|
||||
this.$confirm('确定删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<el-input v-model="form.gbLatitude" placeholder="请输入纬度" />
|
||||
</el-form-item>
|
||||
<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="2" />
|
||||
<el-option label="固定枪机" :value="3" />
|
||||
@@ -65,6 +65,7 @@
|
||||
<el-option label="多目设备的全景/拼接通道" :value="6" />
|
||||
<el-option label="多目设备的分割通道" :value="7" />
|
||||
<el-option label="移动设备(非标)" :value="99" />
|
||||
<el-option label="会议设备(非标)" :value="98" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -151,14 +152,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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="2" />
|
||||
<el-option label="重点" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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="2" />
|
||||
<el-option label="白光补光" :value="3" />
|
||||
@@ -167,7 +168,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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="2" />
|
||||
<el-option label="南(北向南)" :value="3" />
|
||||
@@ -190,7 +191,7 @@
|
||||
<el-input v-model="form.gbResolution" placeholder="请输入分辨率" />
|
||||
</el-form-item>
|
||||
<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="2倍速" value="2" />
|
||||
<el-option label="4倍速" value="4" />
|
||||
@@ -206,7 +207,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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="2级增强" value="2" />
|
||||
<el-option label="3级增强" value="3" />
|
||||
@@ -356,6 +357,8 @@ export default {
|
||||
},
|
||||
chooseGroup: function() {
|
||||
this.$refs.chooseGroup.openDialog((deviceId, businessGroupId) => {
|
||||
console.log(deviceId)
|
||||
console.log(businessGroupId)
|
||||
this.form.gbBusinessGroupId = businessGroupId
|
||||
this.form.gbParentId = deviceId
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:show-header="true"
|
||||
:edit="true"
|
||||
:enable-add-channel="false"
|
||||
:click-event="treeNodeClickEvent"
|
||||
@clickEvent="treeNodeClickEvent"
|
||||
:on-channel-change="onChannelChange"
|
||||
:tree-height="'45vh'"
|
||||
/>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
:show-header="true"
|
||||
:edit="true"
|
||||
:enable-add-channel="false"
|
||||
:click-event="treeNodeClickEvent"
|
||||
@clickEvent="treeNodeClickEvent"
|
||||
:on-channel-change="onChannelChange"
|
||||
:tree-height="'45vh'"
|
||||
/>
|
||||
@@ -67,6 +67,8 @@ export default {
|
||||
this.showDialog = false
|
||||
},
|
||||
treeNodeClickEvent: function(group) {
|
||||
console.log(111)
|
||||
console.log(group)
|
||||
if (group.deviceId === '' || group.deviceId === group.businessGroup) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -589,13 +589,13 @@ export default {
|
||||
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.$nextTick(() => {
|
||||
// if (data[0].edit) {
|
||||
// this.showEditInfo(data[0])
|
||||
// }else {
|
||||
// this.showChannelInfo(data[0])
|
||||
// }
|
||||
// })
|
||||
})
|
||||
this.quicklyDrawThinLoading = false
|
||||
this.$message.success({
|
||||
@@ -617,77 +617,88 @@ export default {
|
||||
if (this.channelLayer) {
|
||||
this.$refs.mapComponent.removeLayer(this.channelLayer)
|
||||
}
|
||||
|
||||
let zoomExtent = this.$refs.mapComponent.getZoomExtent()
|
||||
let cameraListInExtent = []
|
||||
let cameraListOutExtent = []
|
||||
if (this.layerGroupSource !== null) {
|
||||
// 从当前预览的数据里,获取待抽稀的数据
|
||||
let sourceCameraList = this.layerGroupSource.get(0)
|
||||
console.log(sourceCameraList)
|
||||
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) => {
|
||||
this.$message.info({
|
||||
showClose: true,
|
||||
message: '正在抽稀,请稍等'
|
||||
})
|
||||
setTimeout(() => {
|
||||
let zoomExtent = this.$refs.mapComponent.getZoomExtent()
|
||||
let cameraListInExtent = []
|
||||
let cameraListOutExtent = []
|
||||
if (this.layerGroupSource !== null) {
|
||||
let zoom = zoomExtent[0]
|
||||
// 按照层级合并每次的抽稀结果
|
||||
while (zoom < zoomExtent[1]) {
|
||||
Array.prototype.push.apply(layerGroupSource.get(zoom), this.layerGroupSource.get(zoom))
|
||||
zoom += 1
|
||||
// 从当前预览的数据里,获取待抽稀的数据
|
||||
let sourceCameraList = this.layerGroupSource.get(0)
|
||||
console.log(sourceCameraList)
|
||||
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 (cameraListOutExtent.length > 0) {
|
||||
let layerSourceForOutExtent = this.createZoomLayerSource(cameraListOutExtent, zoomExtent[0])
|
||||
layerGroupSource.set(0, layerSourceForOutExtent)
|
||||
// 如果已经在预览,清理预览图层
|
||||
if (this.drawThinLayer !== null) {
|
||||
this.$refs.mapComponent.removeLayer(this.drawThinLayer)
|
||||
this.drawThinLayer = null
|
||||
}
|
||||
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.drawThin(cameraListInExtent).then((layerGroupSource) => {
|
||||
if (this.layerGroupSource !== null) {
|
||||
let zoom = zoomExtent[0]
|
||||
// 按照层级合并每次的抽稀结果
|
||||
while (zoom < zoomExtent[1]) {
|
||||
Array.prototype.push.apply(layerGroupSource.get(zoom), this.layerGroupSource.get(zoom))
|
||||
zoom += 1
|
||||
}
|
||||
}
|
||||
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){
|
||||
@@ -810,6 +821,7 @@ export default {
|
||||
showClose: true,
|
||||
message: '保存成功'
|
||||
})
|
||||
this.showDrawThin = false
|
||||
})
|
||||
.finally(() => {
|
||||
this.saveDrawThinLoading = false
|
||||
|
||||
Reference in New Issue
Block a user