修复相关BUG
This commit is contained in:
@@ -505,6 +505,7 @@ public interface DeviceChannelMapper {
|
|||||||
void changeAudio(@Param("channelId") int channelId, @Param("audio") boolean audio);
|
void changeAudio(@Param("channelId") int channelId, @Param("audio") boolean audio);
|
||||||
|
|
||||||
@Update("UPDATE wvp_device_channel SET status=#{status} WHERE data_type=#{dataType} and data_device_id=#{dataDeviceId} AND device_id=#{deviceId}")
|
@Update("UPDATE wvp_device_channel SET status=#{status} WHERE data_type=#{dataType} and data_device_id=#{dataDeviceId} AND device_id=#{deviceId}")
|
||||||
|
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
|
||||||
void updateStatus(DeviceChannel channel);
|
void updateStatus(DeviceChannel channel);
|
||||||
|
|
||||||
@Update({"<script>" +
|
@Update({"<script>" +
|
||||||
|
|||||||
@@ -863,6 +863,11 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CommonGBChannel> queryListForMap(String query, Boolean online, Boolean hasRecordPlan, Integer channelType) {
|
public List<CommonGBChannel> queryListForMap(String query, Boolean online, Boolean hasRecordPlan, Integer channelType) {
|
||||||
|
if (query != null) {
|
||||||
|
query = query.replaceAll("/", "//")
|
||||||
|
.replaceAll("%", "/%")
|
||||||
|
.replaceAll("_", "/_");
|
||||||
|
}
|
||||||
return commonGBChannelMapper.queryList(query, online, hasRecordPlan, channelType, null, null);
|
return commonGBChannelMapper.queryList(query, online, hasRecordPlan, channelType, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1033,7 +1038,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||||||
saveTile(id, key, "WGS84", beforeData);
|
saveTile(id, key, "WGS84", beforeData);
|
||||||
saveTile(id, key, "GCJ02", beforeData);
|
saveTile(id, key, "GCJ02", beforeData);
|
||||||
process.updateAndGet(v -> (v + 0.5 / zoomParam.size()));
|
process.updateAndGet(v -> (v + 0.5 / zoomParam.size()));
|
||||||
saveProcess(id, process.get(), "生成mvt矢量瓦片: " + key);
|
saveProcess(id, process.get(), "发布矢量瓦片: " + key);
|
||||||
}
|
}
|
||||||
// 记录原始数据,未保存做准备
|
// 记录原始数据,未保存做准备
|
||||||
VectorTileUtils.INSTANCE.addSource(id, new ArrayList<>(useCameraMap.values()));
|
VectorTileUtils.INSTANCE.addSource(id, new ArrayList<>(useCameraMap.values()));
|
||||||
|
|||||||
@@ -122,7 +122,9 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
catalogChannelEvent.getChannel().setDataDeviceId(device.getId());
|
catalogChannelEvent.getChannel().setDataDeviceId(device.getId());
|
||||||
if (catalogChannelEvent.getChannel().getLongitude() > 0
|
if (catalogChannelEvent.getChannel().getLongitude() != null
|
||||||
|
&& catalogChannelEvent.getChannel().getLatitude() != null
|
||||||
|
&& catalogChannelEvent.getChannel().getLongitude() > 0
|
||||||
&& catalogChannelEvent.getChannel().getLatitude() > 0) {
|
&& catalogChannelEvent.getChannel().getLatitude() > 0) {
|
||||||
if (device.checkWgs84()) {
|
if (device.checkWgs84()) {
|
||||||
catalogChannelEvent.getChannel().setGbLongitude(catalogChannelEvent.getChannel().getLongitude());
|
catalogChannelEvent.getChannel().setGbLongitude(catalogChannelEvent.getChannel().getLongitude());
|
||||||
@@ -286,7 +288,7 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
|||||||
switch (notifyCatalogChannel.getType()) {
|
switch (notifyCatalogChannel.getType()) {
|
||||||
case STATUS_CHANGED:
|
case STATUS_CHANGED:
|
||||||
deviceChannelService.updateChannelStatusForNotify(notifyCatalogChannel.getChannel());
|
deviceChannelService.updateChannelStatusForNotify(notifyCatalogChannel.getChannel());
|
||||||
CommonGBChannel channelForStatus = channelService.queryCommonChannelByDeviceChannel(notifyCatalogChannel.getChannel());
|
CommonGBChannel channelForStatus = channelService.getOne(notifyCatalogChannel.getChannel().getId());
|
||||||
if ("ON".equals(notifyCatalogChannel.getChannel().getStatus()) ) {
|
if ("ON".equals(notifyCatalogChannel.getChannel().getStatus()) ) {
|
||||||
eventPublisher.channelEventPublish(channelForStatus, ChannelEvent.ChannelEventMessageType.ON);
|
eventPublisher.channelEventPublish(channelForStatus, ChannelEvent.ChannelEventMessageType.ON);
|
||||||
}else {
|
}else {
|
||||||
@@ -299,7 +301,7 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
|||||||
eventPublisher.channelEventPublish(channelForAdd, ChannelEvent.ChannelEventMessageType.ADD);
|
eventPublisher.channelEventPublish(channelForAdd, ChannelEvent.ChannelEventMessageType.ADD);
|
||||||
break;
|
break;
|
||||||
case UPDATE:
|
case UPDATE:
|
||||||
CommonGBChannel oldCommonChannel = channelService.queryCommonChannelByDeviceChannel(notifyCatalogChannel.getChannel());
|
CommonGBChannel oldCommonChannel = channelService.getOne(notifyCatalogChannel.getChannel().getId());
|
||||||
deviceChannelService.updateChannelForNotify(notifyCatalogChannel.getChannel());
|
deviceChannelService.updateChannelForNotify(notifyCatalogChannel.getChannel());
|
||||||
CommonGBChannel channel = channelService.getOne(oldCommonChannel.getGbId());
|
CommonGBChannel channel = channelService.getOne(oldCommonChannel.getGbId());
|
||||||
eventPublisher.channelEventPublishForUpdate(channel, oldCommonChannel);
|
eventPublisher.channelEventPublishForUpdate(channel, oldCommonChannel);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class RedisPushStreamListMsgListener implements MessageListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(Message message, byte[] bytes) {
|
public void onMessage(Message message, byte[] bytes) {
|
||||||
log.info("[REDIS: 流设备列表更新]: {}", new String(message.getBody()));
|
log.info("[REDIS: 推流设备列表更新]: {}", new String(message.getBody()));
|
||||||
taskQueue.offer(message);
|
taskQueue.offer(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ public class StreamProxyController {
|
|||||||
|
|
||||||
@GetMapping(value = "/start")
|
@GetMapping(value = "/start")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Operation(summary = "启用代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
@Operation(summary = "播放代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "id", description = "代理Id", required = true)
|
@Parameter(name = "id", description = "代理Id", required = true)
|
||||||
public DeferredResult<WVPResult<StreamContent>> start(HttpServletRequest request, int id){
|
public DeferredResult<WVPResult<StreamContent>> start(HttpServletRequest request, int id){
|
||||||
log.info("播放代理: {}", id);
|
log.info("播放代理: {}", id);
|
||||||
@@ -214,10 +214,10 @@ public class StreamProxyController {
|
|||||||
|
|
||||||
@GetMapping(value = "/stop")
|
@GetMapping(value = "/stop")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Operation(summary = "停用代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
@Operation(summary = "停止播放", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "id", description = "代理Id", required = true)
|
@Parameter(name = "id", description = "代理Id", required = true)
|
||||||
public void stop(int id){
|
public void stop(int id){
|
||||||
log.info("停用代理: {}", id);
|
log.info("停止播放: {}", id);
|
||||||
streamProxyPlayService.stop(id);
|
streamProxyPlayService.stop(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -364,15 +364,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
|||||||
streamProxy.setMediaServerId(mediaServerId);
|
streamProxy.setMediaServerId(mediaServerId);
|
||||||
streamProxy.setUpdateTime(DateUtil.getNow());
|
streamProxy.setUpdateTime(DateUtil.getNow());
|
||||||
streamProxyMapper.updateStream(streamProxy);
|
streamProxyMapper.updateStream(streamProxy);
|
||||||
|
|
||||||
streamProxy.setGbStatus(status ? "ON" : "OFF");
|
|
||||||
if (streamProxy.getGbId() > 0) {
|
|
||||||
if (status) {
|
|
||||||
gbChannelService.online(streamProxy.buildCommonGBChannel());
|
|
||||||
} else {
|
|
||||||
gbChannelService.offline(streamProxy.buildCommonGBChannel());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class StreamPushController {
|
|||||||
@Operation(summary = "删除", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
@Operation(summary = "删除", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "id", description = "应用名", required = true)
|
@Parameter(name = "id", description = "应用名", required = true)
|
||||||
public void delete(int id){
|
public void delete(int id){
|
||||||
if (streamPushService.delete(id) > 0){
|
if (streamPushService.delete(id) <= 0){
|
||||||
throw new ControllerException(ErrorCode.ERROR100);
|
throw new ControllerException(ErrorCode.ERROR100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ export default {
|
|||||||
updateLooper: 0, // 数据刷新轮训标志
|
updateLooper: 0, // 数据刷新轮训标志
|
||||||
searchStr: '',
|
searchStr: '',
|
||||||
channelType: '',
|
channelType: '',
|
||||||
online: 'true',
|
online: '',
|
||||||
subStream: '',
|
subStream: '',
|
||||||
winHeight: window.innerHeight - 200,
|
winHeight: window.innerHeight - 200,
|
||||||
currentPage: this.defaultPage | 1,
|
currentPage: this.defaultPage | 1,
|
||||||
|
|||||||
@@ -201,26 +201,6 @@
|
|||||||
<el-option label="其他" :value="9" />
|
<el-option label="其他" :value="9" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="监视方位">
|
|
||||||
<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" />
|
|
||||||
<el-option label="北(南向北)" :value="4" />
|
|
||||||
<el-option label="东南(西北到东南)" :value="5" />
|
|
||||||
<el-option label="东北(西南到东北)" :value="6" />
|
|
||||||
<el-option label="西南(东北到西南)" :value="7" />
|
|
||||||
<el-option label="西北(东南到西北)" :value="8" />
|
|
||||||
<el-option label="左(非标)" :value="91" />
|
|
||||||
<el-option label="后(非标)" :value="92" />
|
|
||||||
<el-option label="前(非标)" :value="93" />
|
|
||||||
<el-option label="右(非标)" :value="94" />
|
|
||||||
<el-option label="左前(非标)" :value="95" />
|
|
||||||
<el-option label="右前(非标)" :value="96" />
|
|
||||||
<el-option label="左后(非标)" :value="97" />
|
|
||||||
<el-option label="右后(非标)" :value="98" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分辨率">
|
<el-form-item label="分辨率">
|
||||||
<el-input v-model="form.gbResolution" placeholder="请输入分辨率" />
|
<el-input v-model="form.gbResolution" placeholder="请输入分辨率" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -314,6 +294,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
queryModel(queryString, callback) {
|
queryModel(queryString, callback) {
|
||||||
|
// 过滤可选项
|
||||||
let modelList = this.modelList
|
let modelList = this.modelList
|
||||||
var results = queryString ? modelList.filter(((state) => {
|
var results = queryString ? modelList.filter(((state) => {
|
||||||
return (state.alias.toLowerCase().indexOf(queryString.toLowerCase()) === 0 || state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
|
return (state.alias.toLowerCase().indexOf(queryString.toLowerCase()) === 0 || state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
deletePush: function(id) {
|
deletePush: function(id) {
|
||||||
this.$confirm(`确定删除通道?`, '提示', {
|
this.$confirm('确定删除通道?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -246,6 +246,10 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
this.$store.dispatch('streamPush/remove', id)
|
this.$store.dispatch('streamPush/remove', id)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
this.$message.success({
|
||||||
|
showClose: true,
|
||||||
|
message: '删除成功'
|
||||||
|
})
|
||||||
this.initData()
|
this.initData()
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user