修复相关BUG

This commit is contained in:
lin
2025-11-04 11:22:03 +08:00
parent f8235d5b3f
commit 0eefabd034
10 changed files with 24 additions and 40 deletions

View File

@@ -505,6 +505,7 @@ public interface DeviceChannelMapper {
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}")
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
void updateStatus(DeviceChannel channel);
@Update({"<script>" +

View File

@@ -863,6 +863,11 @@ public class GbChannelServiceImpl implements IGbChannelService {
@Override
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);
}
@@ -1033,7 +1038,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
saveTile(id, key, "WGS84", beforeData);
saveTile(id, key, "GCJ02", beforeData);
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()));

View File

@@ -122,7 +122,9 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
continue;
}
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) {
if (device.checkWgs84()) {
catalogChannelEvent.getChannel().setGbLongitude(catalogChannelEvent.getChannel().getLongitude());
@@ -286,7 +288,7 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
switch (notifyCatalogChannel.getType()) {
case STATUS_CHANGED:
deviceChannelService.updateChannelStatusForNotify(notifyCatalogChannel.getChannel());
CommonGBChannel channelForStatus = channelService.queryCommonChannelByDeviceChannel(notifyCatalogChannel.getChannel());
CommonGBChannel channelForStatus = channelService.getOne(notifyCatalogChannel.getChannel().getId());
if ("ON".equals(notifyCatalogChannel.getChannel().getStatus()) ) {
eventPublisher.channelEventPublish(channelForStatus, ChannelEvent.ChannelEventMessageType.ON);
}else {
@@ -299,7 +301,7 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
eventPublisher.channelEventPublish(channelForAdd, ChannelEvent.ChannelEventMessageType.ADD);
break;
case UPDATE:
CommonGBChannel oldCommonChannel = channelService.queryCommonChannelByDeviceChannel(notifyCatalogChannel.getChannel());
CommonGBChannel oldCommonChannel = channelService.getOne(notifyCatalogChannel.getChannel().getId());
deviceChannelService.updateChannelForNotify(notifyCatalogChannel.getChannel());
CommonGBChannel channel = channelService.getOne(oldCommonChannel.getGbId());
eventPublisher.channelEventPublishForUpdate(channel, oldCommonChannel);

View File

@@ -40,7 +40,7 @@ public class RedisPushStreamListMsgListener implements MessageListener {
@Override
public void onMessage(Message message, byte[] bytes) {
log.info("[REDIS: 流设备列表更新] {}", new String(message.getBody()));
log.info("[REDIS: 流设备列表更新] {}", new String(message.getBody()));
taskQueue.offer(message);
}

View File

@@ -168,7 +168,7 @@ public class StreamProxyController {
@GetMapping(value = "/start")
@ResponseBody
@Operation(summary = "启用代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Operation(summary = "播放代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "代理Id", required = true)
public DeferredResult<WVPResult<StreamContent>> start(HttpServletRequest request, int id){
log.info("播放代理: {}", id);
@@ -214,10 +214,10 @@ public class StreamProxyController {
@GetMapping(value = "/stop")
@ResponseBody
@Operation(summary = "用代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Operation(summary = "止播放", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "代理Id", required = true)
public void stop(int id){
log.info("用代理 {}", id);
log.info("止播放 {}", id);
streamProxyPlayService.stop(id);
}
}

View File

@@ -364,15 +364,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
streamProxy.setMediaServerId(mediaServerId);
streamProxy.setUpdateTime(DateUtil.getNow());
streamProxyMapper.updateStream(streamProxy);
streamProxy.setGbStatus(status ? "ON" : "OFF");
if (streamProxy.getGbId() > 0) {
if (status) {
gbChannelService.online(streamProxy.buildCommonGBChannel());
} else {
gbChannelService.offline(streamProxy.buildCommonGBChannel());
}
}
}
@Override

View File

@@ -100,7 +100,7 @@ public class StreamPushController {
@Operation(summary = "删除", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "应用名", required = true)
public void delete(int id){
if (streamPushService.delete(id) > 0){
if (streamPushService.delete(id) <= 0){
throw new ControllerException(ErrorCode.ERROR100);
}
}

View File

@@ -235,7 +235,7 @@ export default {
updateLooper: 0, // 数据刷新轮训标志
searchStr: '',
channelType: '',
online: 'true',
online: '',
subStream: '',
winHeight: window.innerHeight - 200,
currentPage: this.defaultPage | 1,

View File

@@ -201,26 +201,6 @@
<el-option label="其他" :value="9" />
</el-select>
</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-input v-model="form.gbResolution" placeholder="请输入分辨率" />
</el-form-item>
@@ -314,6 +294,7 @@ export default {
},
methods: {
queryModel(queryString, callback) {
// 过滤可选项
let modelList = this.modelList
var results = queryString ? modelList.filter(((state) => {
return (state.alias.toLowerCase().indexOf(queryString.toLowerCase()) === 0 || state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)

View File

@@ -238,7 +238,7 @@ export default {
})
},
deletePush: function(id) {
this.$confirm(`确定删除通道?`, '提示', {
this.$confirm('确定删除通道?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -246,6 +246,10 @@ export default {
this.loading = true
this.$store.dispatch('streamPush/remove', id)
.then((data) => {
this.$message.success({
showClose: true,
message: '删除成功'
})
this.initData()
})
}).catch(() => {