From 6619c5c53df5f3cdfe858389a763c4b1ddbbcddd Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 11 Jul 2024 18:25:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/gb28181/bean/AudioBroadcastCatch.java | 2 +- .../iot/vmp/gb28181/bean/CommonGBChannel.java | 2 +- .../controller}/AlarmController.java | 2 +- .../controller/CommonChannelController.java | 43 +++++ .../controller}/DeviceConfig.java | 2 +- .../controller}/DeviceControl.java | 2 +- .../controller}/DeviceQuery.java | 20 +-- .../controller}/GBRecordController.java | 2 +- .../controller}/MediaController.java | 2 +- .../controller}/MobilePositionController.java | 2 +- .../controller}/PlatformController.java | 6 +- .../controller}/PlayController.java | 2 +- .../controller}/PlaybackController.java | 2 +- .../controller}/PtzController.java | 2 +- .../controller}/SseController.java | 2 +- .../controller}/bean/AudioBroadcastEvent.java | 2 +- .../controller}/bean/ChannelReduce.java | 2 +- .../controller}/bean/PlayResult.java | 3 +- .../controller}/bean/UpdateChannelParam.java | 2 +- .../gb28181/dao/CommonGBChannelMapper.java | 1 + .../vmp/gb28181/dao/DeviceChannelMapper.java | 3 +- .../iot/vmp/gb28181/dao/DeviceMapper.java | 4 + .../gb28181/dao/PlatformChannelMapper.java | 2 +- .../gb28181/service/IGbChannelService.java | 2 + .../service/impl/GbChannelServiceImpl.java | 5 + .../vmp/service/IDeviceChannelService.java | 5 +- .../vmp/service/IPlatformChannelService.java | 2 +- .../iot/vmp/service/IPlayService.java | 4 +- .../iot/vmp/service/bean/GPSMsgInfo.java | 69 +------- .../impl/DeviceChannelServiceImpl.java | 7 +- .../impl/PlatformChannelServiceImpl.java | 2 +- .../iot/vmp/service/impl/PlayServiceImpl.java | 2 +- .../vmp/storager/IVideoManagerStorage.java | 2 +- .../impl/VideoManagerStorageImpl.java | 2 +- .../service/impl/StreamProxyServiceImpl.java | 14 +- .../controller/StreamPushController.java | 2 +- .../enent/StreamPushUploadFileHandler.java | 2 +- .../service/impl/StreamPushServiceImpl.java | 6 +- web_src/src/components/ChannelEdit.vue | 150 +++++++++++++++--- web_src/src/components/channelList.vue | 2 +- 数据库/2.7.2-重构/初始化-mysql-2.7.2.sql | 2 +- 41 files changed, 248 insertions(+), 144 deletions(-) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/alarm => gb28181/controller}/AlarmController.java (99%) create mode 100755 src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/device => gb28181/controller}/DeviceConfig.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/device => gb28181/controller}/DeviceControl.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/device => gb28181/controller}/DeviceQuery.java (97%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/record => gb28181/controller}/GBRecordController.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/media => gb28181/controller}/MediaController.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/MobilePosition => gb28181/controller}/MobilePositionController.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/platform => gb28181/controller}/PlatformController.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/play => gb28181/controller}/PlayController.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/playback => gb28181/controller}/PlaybackController.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/ptz => gb28181/controller}/PtzController.java (99%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/sse => gb28181/controller}/SseController.java (96%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/play => gb28181/controller}/bean/AudioBroadcastEvent.java (61%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/platform => gb28181/controller}/bean/ChannelReduce.java (97%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/play => gb28181/controller}/bean/PlayResult.java (88%) rename src/main/java/com/genersoft/iot/vmp/{vmanager/gb28181/platform => gb28181/controller}/bean/UpdateChannelParam.java (95%) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/AudioBroadcastCatch.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/AudioBroadcastCatch.java index 2b5e16bd..bc65d951 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/AudioBroadcastCatch.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/AudioBroadcastCatch.java @@ -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; /** diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java index 0c0d7367..4995d923 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/alarm/AlarmController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/AlarmController.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/alarm/AlarmController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/AlarmController.java index ff9fd168..cddccf83 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/alarm/AlarmController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/AlarmController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java new file mode 100755 index 00000000..f1f8cbad --- /dev/null +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java @@ -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); + } +} diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceConfig.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceConfig.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceConfig.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceConfig.java index 5dc0031b..62d2ff88 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceConfig.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceControl.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceControl.java index 8dedd57c..92001016 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceControl.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceQuery.java similarity index 97% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceQuery.java index 401be794..2619c9c7 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceQuery.java @@ -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); + } } diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/record/GBRecordController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/GBRecordController.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/record/GBRecordController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/GBRecordController.java index ab8381a8..d90fc1b8 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/record/GBRecordController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/GBRecordController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/MediaController.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/MediaController.java index 352bbf3e..ff41a54c 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/MediaController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/MobilePositionController.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/MobilePositionController.java index f5b0385d..4f66cff2 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/MobilePositionController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java index 3d2c0580..861b2b59 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlayController.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlayController.java index b6c32225..36534be3 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlayController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlaybackController.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlaybackController.java index e65cf5bb..a5674753 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlaybackController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/ptz/PtzController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PtzController.java similarity index 99% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/ptz/PtzController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/PtzController.java index b5851005..39e4ff2f 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/ptz/PtzController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PtzController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/sse/SseController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/SseController.java similarity index 96% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/sse/SseController.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/SseController.java index 575f22b3..2ca1a4db 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/sse/SseController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/SseController.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/bean/AudioBroadcastEvent.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/AudioBroadcastEvent.java similarity index 61% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/bean/AudioBroadcastEvent.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/AudioBroadcastEvent.java index 55b710f2..3c58934e 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/bean/AudioBroadcastEvent.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/AudioBroadcastEvent.java @@ -1,4 +1,4 @@ -package com.genersoft.iot.vmp.vmanager.gb28181.play.bean; +package com.genersoft.iot.vmp.gb28181.controller.bean; /** diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/bean/ChannelReduce.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/ChannelReduce.java similarity index 97% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/bean/ChannelReduce.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/ChannelReduce.java index 2b01d45b..b4c1d015 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/bean/ChannelReduce.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/ChannelReduce.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/bean/PlayResult.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/PlayResult.java similarity index 88% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/bean/PlayResult.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/PlayResult.java index 58d4ce20..630eb667 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/bean/PlayResult.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/PlayResult.java @@ -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 { diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/bean/UpdateChannelParam.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/UpdateChannelParam.java similarity index 95% rename from src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/bean/UpdateChannelParam.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/UpdateChannelParam.java index 2d598e44..4bd50a91 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/bean/UpdateChannelParam.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/bean/UpdateChannelParam.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java index 29450730..42910594 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java @@ -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" + diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java index 9f08602c..03d5769f 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java index 380253bc..22d9d545 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java @@ -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 "+ " ") List getDeviceList(@Param("query") String query, @Param("status") Boolean status); + + @Select("select * from wvp_device_channel where id = #{id}") + DeviceChannel getRawChannel(@Param("id") int id); } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java index 724215df..94a047bf 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IGbChannelService.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IGbChannelService.java index c599ccba..8a3eed5e 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IGbChannelService.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IGbChannelService.java @@ -27,4 +27,6 @@ public interface IGbChannelService { void updateStatus(List channelList); List queryByPlatformId(Integer platformId); + + CommonGBChannel getOne(int id); } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java index 6e0d671f..8bb0ee94 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java @@ -227,4 +227,9 @@ public class GbChannelServiceImpl implements IGbChannelService { return commonGBChannelMapper.queryByPlatformId(platformId); } + + @Override + public CommonGBChannel getOne(int id) { + return commonGBChannelMapper.queryById(id); + } } diff --git a/src/main/java/com/genersoft/iot/vmp/service/IDeviceChannelService.java b/src/main/java/com/genersoft/iot/vmp/service/IDeviceChannelService.java index b6fcfb15..e9ce0cb0 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/IDeviceChannelService.java +++ b/src/main/java/com/genersoft/iot/vmp/service/IDeviceChannelService.java @@ -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 queryDeviceWithAsMessageChannel(); + + DeviceChannel getRawChannel(int id); + } diff --git a/src/main/java/com/genersoft/iot/vmp/service/IPlatformChannelService.java b/src/main/java/com/genersoft/iot/vmp/service/IPlatformChannelService.java index 49d74282..59ac09fb 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/IPlatformChannelService.java +++ b/src/main/java/com/genersoft/iot/vmp/service/IPlatformChannelService.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/service/IPlayService.java b/src/main/java/com/genersoft/iot/vmp/service/IPlayService.java index b3cab0e8..7b067e3c 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/IPlayService.java +++ b/src/main/java/com/genersoft/iot/vmp/service/IPlayService.java @@ -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; /** * 点播处理 diff --git a/src/main/java/com/genersoft/iot/vmp/service/bean/GPSMsgInfo.java b/src/main/java/com/genersoft/iot/vmp/service/bean/GPSMsgInfo.java index 3b84420f..445b08e7 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/bean/GPSMsgInfo.java +++ b/src/main/java/com/genersoft/iot/vmp/service/bean/GPSMsgInfo.java @@ -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; - } } diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java index 9b5e4797..4ccf15b8 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java @@ -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 queryDeviceWithAsMessageChannel() { return deviceMapper.queryDeviceWithAsMessageChannel(); } + + @Override + public DeviceChannel getRawChannel(int id) { + return deviceMapper.getRawChannel(id); + } } diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java index ebe6b17e..c332e20b 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java index c353d0f2..915155e2 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java index a5f3e4b7..6a4e58d5 100755 --- a/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java index 3ea3c68f..d3e0c7f2 100755 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java @@ -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; diff --git a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java index d5d45040..c038a845 100755 --- a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java @@ -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 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 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()); diff --git a/src/main/java/com/genersoft/iot/vmp/streamPush/controller/StreamPushController.java b/src/main/java/com/genersoft/iot/vmp/streamPush/controller/StreamPushController.java index 094fdf4c..5a370abf 100755 --- a/src/main/java/com/genersoft/iot/vmp/streamPush/controller/StreamPushController.java +++ b/src/main/java/com/genersoft/iot/vmp/streamPush/controller/StreamPushController.java @@ -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); diff --git a/src/main/java/com/genersoft/iot/vmp/streamPush/enent/StreamPushUploadFileHandler.java b/src/main/java/com/genersoft/iot/vmp/streamPush/enent/StreamPushUploadFileHandler.java index 09ac285d..2dbd6c33 100755 --- a/src/main/java/com/genersoft/iot/vmp/streamPush/enent/StreamPushUploadFileHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/streamPush/enent/StreamPushUploadFileHandler.java @@ -104,7 +104,7 @@ public class StreamPushUploadFileHandler extends AnalysisEventListener -
- - - - - - -
- 保存 - 取消 -
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 保存 + 取消 +
@@ -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 + ]) } }, }; diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue index 29a552c9..1ae9b550 100755 --- a/web_src/src/components/channelList.vue +++ b/web_src/src/components/channelList.vue @@ -161,7 +161,7 @@ - +
diff --git a/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql b/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql index dcca7599..dfb0f852 100644 --- a/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql +++ b/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql @@ -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),