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 efd390b23..63d64375c 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 @@ -667,5 +667,5 @@ public interface CommonGBChannelMapper { List queryOldChanelListByChannels(List channelList); @SelectProvider(type = ChannelProvider.class, method = "queryMeetingChannelList") - List queryMeetingChannelList(String business); + List queryMeetingChannelList(@Param("business") String business); } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/provider/ChannelProvider.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/provider/ChannelProvider.java index 14b52f83d..78c6b7ea3 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/provider/ChannelProvider.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/provider/ChannelProvider.java @@ -567,7 +567,7 @@ public class ChannelProvider { public String queryListForSy(Map 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 != 98 && 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'"); } @@ -582,7 +582,7 @@ public class ChannelProvider { public String queryListWithChildForSy(Map params ){ StringBuilder sqlBuild = new StringBuilder(); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); - sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && 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)) "); List groupList = (List)params.get("groupList"); @@ -656,7 +656,7 @@ public class ChannelProvider { public String queryListInBox(Map params ){ StringBuilder sqlBuild = new StringBuilder(); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); - sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && 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(" "); @@ -684,7 +684,7 @@ public class ChannelProvider { public String queryListInCircleForMysql(Map params ){ StringBuilder sqlBuild = new StringBuilder(); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); - sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && 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(" "); @@ -713,7 +713,7 @@ public class ChannelProvider { public String queryListInCircleForKingBase(Map params ){ StringBuilder sqlBuild = new StringBuilder(); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); - sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && 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(" "); @@ -742,7 +742,7 @@ public class ChannelProvider { public String queryListInPolygonForMysql(Map params ){ StringBuilder sqlBuild = new StringBuilder(); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); - sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && 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(" "); @@ -780,7 +780,7 @@ public class ChannelProvider { public String queryListInPolygonForKingBase(Map params ){ StringBuilder sqlBuild = new StringBuilder(); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); - sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && 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(" "); @@ -867,7 +867,7 @@ public class ChannelProvider { public String queryListForSyMobile(Map params ){ StringBuilder sqlBuild = new StringBuilder(); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); - sqlBuild.append(" WHERE wdc.gb_ptz_type = 99 and wdc.channel_type != 1 "); + 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}"); } @@ -877,7 +877,7 @@ public class ChannelProvider { public String queryMeetingChannelList(Map params ){ StringBuilder sqlBuild = new StringBuilder(); sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); - sqlBuild.append(" WHERE wdc.channel_type = 2 and wdc.gb_ptz_type = 98 and coalesce(gb_business_group_id, business_group_id) = #{business}"); + 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(); } diff --git a/src/main/java/com/genersoft/iot/vmp/web/custom/CameraChannelController.java b/src/main/java/com/genersoft/iot/vmp/web/custom/CameraChannelController.java index 6d9e10575..169ef1268 100644 --- a/src/main/java/com/genersoft/iot/vmp/web/custom/CameraChannelController.java +++ b/src/main/java/com/genersoft/iot/vmp/web/custom/CameraChannelController.java @@ -557,7 +557,7 @@ public class CameraChannelController { @GetMapping(value = "/camera/meeting/list") @ResponseBody - @Operation(summary = "查询拉流代理", security = @SecurityRequirement(name = JwtUtils.HEADER)) + @Operation(summary = "查询会议设备", security = @SecurityRequirement(name = JwtUtils.HEADER)) @Parameter(name = "topGroupAlias", description = "分组别名") public List queryMeetingChannelList(String topGroupAlias){ return channelService.queryMeetingChannelList(topGroupAlias); diff --git a/web/src/views/common/CommonChannelEdit.vue b/web/src/views/common/CommonChannelEdit.vue index 330106565..a653ecd52 100644 --- a/web/src/views/common/CommonChannelEdit.vue +++ b/web/src/views/common/CommonChannelEdit.vue @@ -357,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 }) diff --git a/web/src/views/dialog/chooseCivilCode.vue b/web/src/views/dialog/chooseCivilCode.vue index b53b020f9..c8a7da955 100644 --- a/web/src/views/dialog/chooseCivilCode.vue +++ b/web/src/views/dialog/chooseCivilCode.vue @@ -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'" /> diff --git a/web/src/views/dialog/chooseGroup.vue b/web/src/views/dialog/chooseGroup.vue index d46efa3e3..572e81916 100644 --- a/web/src/views/dialog/chooseGroup.vue +++ b/web/src/views/dialog/chooseGroup.vue @@ -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 } diff --git a/web/src/views/map/index.vue b/web/src/views/map/index.vue index 03170ab70..98c12c363 100755 --- a/web/src/views/map/index.vue +++ b/web/src/views/map/index.vue @@ -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