临时提交

This commit is contained in:
lin
2025-10-24 18:55:31 +08:00
parent e666b9fe00
commit cda0a803fc
7 changed files with 100 additions and 84 deletions

View File

@@ -667,5 +667,5 @@ public interface CommonGBChannelMapper {
List<CommonGBChannel> queryOldChanelListByChannels(List<CommonGBChannel> channelList); List<CommonGBChannel> queryOldChanelListByChannels(List<CommonGBChannel> channelList);
@SelectProvider(type = ChannelProvider.class, method = "queryMeetingChannelList") @SelectProvider(type = ChannelProvider.class, method = "queryMeetingChannelList")
List<CameraChannel> queryMeetingChannelList(String business); List<CameraChannel> queryMeetingChannelList(@Param("business") String business);
} }

View File

@@ -567,7 +567,7 @@ public class ChannelProvider {
public String queryListForSy(Map<String, Object> params ){ public String queryListForSy(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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")) { if (params.get("online") != null && (Boolean)params.get("online")) {
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'ON'"); sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'ON'");
} }
@@ -582,7 +582,7 @@ public class ChannelProvider {
public String queryListWithChildForSy(Map<String, Object> params ){ public String queryListWithChildForSy(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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<CameraGroup> groupList = (List<CameraGroup>)params.get("groupList"); List<CameraGroup> groupList = (List<CameraGroup>)params.get("groupList");
@@ -656,7 +656,7 @@ public class ChannelProvider {
public String queryListInBox(Map<String, Object> params ){ public String queryListInBox(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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 ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@@ -684,7 +684,7 @@ public class ChannelProvider {
public String queryListInCircleForMysql(Map<String, Object> params ){ public String queryListInCircleForMysql(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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 ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@@ -713,7 +713,7 @@ public class ChannelProvider {
public String queryListInCircleForKingBase(Map<String, Object> params ){ public String queryListInCircleForKingBase(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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 ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@@ -742,7 +742,7 @@ public class ChannelProvider {
public String queryListInPolygonForMysql(Map<String, Object> params ){ public String queryListInPolygonForMysql(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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 ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@@ -780,7 +780,7 @@ public class ChannelProvider {
public String queryListInPolygonForKingBase(Map<String, Object> params ){ public String queryListInPolygonForKingBase(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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 ("); " AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
sqlBuild.append(" "); sqlBuild.append(" ");
@@ -867,7 +867,7 @@ public class ChannelProvider {
public String queryListForSyMobile(Map<String, Object> params ){ public String queryListForSyMobile(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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) { if (params.get("business") != null) {
sqlBuild.append(" AND coalesce(gb_business_group_id, business_group_id) = #{business}"); sqlBuild.append(" AND coalesce(gb_business_group_id, business_group_id) = #{business}");
} }
@@ -877,7 +877,7 @@ public class ChannelProvider {
public String queryMeetingChannelList(Map<String, Object> params ){ public String queryMeetingChannelList(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE); 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(); return sqlBuild.toString();
} }

View File

@@ -557,7 +557,7 @@ public class CameraChannelController {
@GetMapping(value = "/camera/meeting/list") @GetMapping(value = "/camera/meeting/list")
@ResponseBody @ResponseBody
@Operation(summary = "查询拉流代理", security = @SecurityRequirement(name = JwtUtils.HEADER)) @Operation(summary = "查询会议设备", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "topGroupAlias", description = "分组别名") @Parameter(name = "topGroupAlias", description = "分组别名")
public List<CameraChannel> queryMeetingChannelList(String topGroupAlias){ public List<CameraChannel> queryMeetingChannelList(String topGroupAlias){
return channelService.queryMeetingChannelList(topGroupAlias); return channelService.queryMeetingChannelList(topGroupAlias);

View File

@@ -357,6 +357,8 @@ export default {
}, },
chooseGroup: function() { chooseGroup: function() {
this.$refs.chooseGroup.openDialog((deviceId, businessGroupId) => { this.$refs.chooseGroup.openDialog((deviceId, businessGroupId) => {
console.log(deviceId)
console.log(businessGroupId)
this.form.gbBusinessGroupId = businessGroupId this.form.gbBusinessGroupId = businessGroupId
this.form.gbParentId = deviceId this.form.gbParentId = deviceId
}) })

View File

@@ -15,7 +15,7 @@
:show-header="true" :show-header="true"
:edit="true" :edit="true"
:enable-add-channel="false" :enable-add-channel="false"
:click-event="treeNodeClickEvent" @clickEvent="treeNodeClickEvent"
:on-channel-change="onChannelChange" :on-channel-change="onChannelChange"
:tree-height="'45vh'" :tree-height="'45vh'"
/> />

View File

@@ -16,7 +16,7 @@
:show-header="true" :show-header="true"
:edit="true" :edit="true"
:enable-add-channel="false" :enable-add-channel="false"
:click-event="treeNodeClickEvent" @clickEvent="treeNodeClickEvent"
:on-channel-change="onChannelChange" :on-channel-change="onChannelChange"
:tree-height="'45vh'" :tree-height="'45vh'"
/> />
@@ -67,6 +67,8 @@ export default {
this.showDialog = false this.showDialog = false
}, },
treeNodeClickEvent: function(group) { treeNodeClickEvent: function(group) {
console.log(111)
console.log(group)
if (group.deviceId === '' || group.deviceId === group.businessGroup) { if (group.deviceId === '' || group.deviceId === group.businessGroup) {
return return
} }

View File

@@ -589,13 +589,13 @@ export default {
this.layerGroupSource = layerGroupSource this.layerGroupSource = layerGroupSource
this.drawThinLayer = this.$refs.mapComponent.addPointLayerGroup(layerGroupSource, data => { this.drawThinLayer = this.$refs.mapComponent.addPointLayerGroup(layerGroupSource, data => {
this.closeInfoBox() this.closeInfoBox()
this.$nextTick(() => { // this.$nextTick(() => {
if (data[0].edit) { // if (data[0].edit) {
this.showEditInfo(data[0]) // this.showEditInfo(data[0])
}else { // }else {
this.showChannelInfo(data[0]) // this.showChannelInfo(data[0])
} // }
}) // })
}) })
this.quicklyDrawThinLoading = false this.quicklyDrawThinLoading = false
this.$message.success({ this.$message.success({
@@ -617,77 +617,88 @@ export default {
if (this.channelLayer) { if (this.channelLayer) {
this.$refs.mapComponent.removeLayer(this.channelLayer) this.$refs.mapComponent.removeLayer(this.channelLayer)
} }
this.$message.info({
let zoomExtent = this.$refs.mapComponent.getZoomExtent() showClose: true,
let cameraListInExtent = [] message: '正在抽稀,请稍等'
let cameraListOutExtent = [] })
if (this.layerGroupSource !== null) { setTimeout(() => {
// 从当前预览的数据里,获取待抽稀的数据 let zoomExtent = this.$refs.mapComponent.getZoomExtent()
let sourceCameraList = this.layerGroupSource.get(0) let cameraListInExtent = []
console.log(sourceCameraList) let cameraListOutExtent = []
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) => {
if (this.layerGroupSource !== null) { if (this.layerGroupSource !== null) {
let zoom = zoomExtent[0] // 从当前预览的数据里,获取待抽稀的数据
// 按照层级合并每次的抽稀结果 let sourceCameraList = this.layerGroupSource.get(0)
while (zoom < zoomExtent[1]) { console.log(sourceCameraList)
Array.prototype.push.apply(layerGroupSource.get(zoom), this.layerGroupSource.get(zoom)) if (!sourceCameraList) {
zoom += 1 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]) if (this.drawThinLayer !== null) {
layerGroupSource.set(0, layerSourceForOutExtent) this.$refs.mapComponent.removeLayer(this.drawThinLayer)
this.drawThinLayer = null
} }
this.layerGroupSource = layerGroupSource this.drawThin(cameraListInExtent).then((layerGroupSource) => {
this.drawThinLayer = this.$refs.mapComponent.addPointLayerGroup(layerGroupSource, data => { if (this.layerGroupSource !== null) {
this.closeInfoBox() let zoom = zoomExtent[0]
this.$nextTick(() => { // 按照层级合并每次的抽稀结果
if (data[0].edit) { while (zoom < zoomExtent[1]) {
this.showEditInfo(data[0]) Array.prototype.push.apply(layerGroupSource.get(zoom), this.layerGroupSource.get(zoom))
}else { zoom += 1
this.showChannelInfo(data[0])
} }
}
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){ drawThin: function (cameraListInExtent){
@@ -810,6 +821,7 @@ export default {
showClose: true, showClose: true,
message: '保存成功' message: '保存成功'
}) })
this.showDrawThin = false
}) })
.finally(() => { .finally(() => {
this.saveDrawThinLoading = false this.saveDrawThinLoading = false