支持展示行政区划节点异常的通道数据
parent
a05c2f8640
commit
cbcd99da40
|
@ -141,6 +141,25 @@ public class CommonChannelController {
|
||||||
return channelService.queryListByCivilCode(page, count, query, online, channelType, civilCode);
|
return channelService.queryListByCivilCode(page, count, query, online, channelType, civilCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "存在行政区划但无法挂载的通道列表", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
|
@Parameter(name = "page", description = "当前页", required = true)
|
||||||
|
@Parameter(name = "count", description = "每页查询数量", required = true)
|
||||||
|
@Parameter(name = "query", description = "查询内容")
|
||||||
|
@Parameter(name = "online", description = "是否在线")
|
||||||
|
@Parameter(name = "channelType", description = "通道类型, 0:国标设备,1:推流设备,2:拉流代理")
|
||||||
|
@Parameter(name = "civilCode", description = "行政区划")
|
||||||
|
@GetMapping("/civilCode/unusual/list")
|
||||||
|
public PageInfo<CommonGBChannel> queryListByCivilCodeForUnusual(int page, int count,
|
||||||
|
@RequestParam(required = false) String query,
|
||||||
|
@RequestParam(required = false) Boolean online,
|
||||||
|
@RequestParam(required = false) Integer channelType){
|
||||||
|
if (ObjectUtils.isEmpty(query)){
|
||||||
|
query = null;
|
||||||
|
}
|
||||||
|
return channelService.queryListByCivilCodeForUnusual(page, count, query, online, channelType);
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取关联业务分组通道列表", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
@Operation(summary = "获取关联业务分组通道列表", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "page", description = "当前页", required = true)
|
@Parameter(name = "page", description = "当前页", required = true)
|
||||||
@Parameter(name = "count", description = "每页查询数量", required = true)
|
@Parameter(name = "count", description = "每页查询数量", required = true)
|
||||||
|
|
|
@ -544,4 +544,8 @@ public interface CommonGBChannelMapper {
|
||||||
|
|
||||||
@SelectProvider(type = ChannelProvider.class, method = "queryByDataId")
|
@SelectProvider(type = ChannelProvider.class, method = "queryByDataId")
|
||||||
CommonGBChannel queryByDataId(@Param("dataType") Integer dataType, @Param("dataDeviceId") Integer dataDeviceId);
|
CommonGBChannel queryByDataId(@Param("dataType") Integer dataType, @Param("dataDeviceId") Integer dataDeviceId);
|
||||||
|
|
||||||
|
@SelectProvider(type = ChannelProvider.class, method = "queryListByCivilCodeForUnusual")
|
||||||
|
List<CommonGBChannel> queryListByCivilCodeForUnusual(@Param("query") String query, @Param("online") Boolean online, @Param("dataType")Integer dataType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,50 @@ public class ChannelProvider {
|
||||||
" from wvp_device_channel\n"
|
" from wvp_device_channel\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
public final static String BASE_SQL_TABLE_NAME = "select\n" +
|
||||||
|
" wdc.id as gb_id,\n" +
|
||||||
|
" wdc.data_type,\n" +
|
||||||
|
" wdc.data_device_id,\n" +
|
||||||
|
" wdc.create_time,\n" +
|
||||||
|
" wdc.update_time,\n" +
|
||||||
|
" wdc.record_plan_id,\n" +
|
||||||
|
" coalesce(wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" +
|
||||||
|
" coalesce(wdc.gb_name, wdc.name) as gb_name,\n" +
|
||||||
|
" coalesce(wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" +
|
||||||
|
" coalesce(wdc.gb_model, wdc.model) as gb_model,\n" +
|
||||||
|
" coalesce(wdc.gb_owner, wdc.owner) as gb_owner,\n" +
|
||||||
|
" coalesce(wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" +
|
||||||
|
" coalesce(wdc.gb_block, wdc.block) as gb_block,\n" +
|
||||||
|
" coalesce(wdc.gb_address, wdc.address) as gb_address,\n" +
|
||||||
|
" coalesce(wdc.gb_parental, wdc.parental) as gb_parental,\n" +
|
||||||
|
" coalesce(wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" +
|
||||||
|
" coalesce(wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" +
|
||||||
|
" coalesce(wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" +
|
||||||
|
" coalesce(wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" +
|
||||||
|
" coalesce(wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" +
|
||||||
|
" coalesce(wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" +
|
||||||
|
" coalesce(wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" +
|
||||||
|
" coalesce(wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" +
|
||||||
|
" coalesce(wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" +
|
||||||
|
" coalesce(wdc.gb_port, wdc.port) as gb_port,\n" +
|
||||||
|
" coalesce(wdc.gb_password, wdc.password) as gb_password,\n" +
|
||||||
|
" coalesce(wdc.gb_status, wdc.status) as gb_status,\n" +
|
||||||
|
" coalesce(wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" +
|
||||||
|
" coalesce(wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" +
|
||||||
|
" coalesce(wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" +
|
||||||
|
" coalesce(wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" +
|
||||||
|
" coalesce(wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" +
|
||||||
|
" coalesce(wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" +
|
||||||
|
" coalesce(wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" +
|
||||||
|
" coalesce(wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" +
|
||||||
|
" coalesce(wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" +
|
||||||
|
" coalesce(wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" +
|
||||||
|
" coalesce(wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" +
|
||||||
|
" coalesce(wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" +
|
||||||
|
" coalesce(wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" +
|
||||||
|
" from wvp_device_channel wdc\n"
|
||||||
|
;
|
||||||
|
|
||||||
private final static String BASE_SQL_FOR_PLATFORM =
|
private final static String BASE_SQL_FOR_PLATFORM =
|
||||||
"select\n" +
|
"select\n" +
|
||||||
" wdc.id as gb_id,\n" +
|
" wdc.id as gb_id,\n" +
|
||||||
|
@ -364,4 +408,27 @@ public class ChannelProvider {
|
||||||
sqlBuild.append(" where wpgc.platform_id = #{platformId} and coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) = #{civilCode}");
|
sqlBuild.append(" where wpgc.platform_id = #{platformId} and coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) = #{civilCode}");
|
||||||
return sqlBuild.toString() ;
|
return sqlBuild.toString() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String queryListByCivilCodeForUnusual(Map<String, Object> params ){
|
||||||
|
StringBuilder sqlBuild = new StringBuilder();
|
||||||
|
sqlBuild.append(BASE_SQL_TABLE_NAME);
|
||||||
|
sqlBuild.append(" left join (select wcr.device_id from wvp_common_region wcr) temp on temp.device_id = coalesce(wdc.gb_civil_code, wdc.civil_code)" +
|
||||||
|
" where coalesce(wdc.gb_civil_code, wdc.civil_code) is not null and temp.device_id is null ");
|
||||||
|
sqlBuild.append(" AND wdc.channel_type = 0 ");
|
||||||
|
if (params.get("query") != null) {
|
||||||
|
sqlBuild.append(" AND (coalesce(wdc.gb_device_id, wdc.device_id) LIKE concat('%',#{query},'%') escape '/'" +
|
||||||
|
" OR coalesce(wdc.gb_name, wdc.name) LIKE concat('%',#{query},'%') escape '/' )")
|
||||||
|
;
|
||||||
|
}
|
||||||
|
if (params.get("online") != null && (Boolean)params.get("online")) {
|
||||||
|
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'ON'");
|
||||||
|
}
|
||||||
|
if (params.get("online") != null && !(Boolean)params.get("online")) {
|
||||||
|
sqlBuild.append(" AND coalesce(wdc.gb_status, wdc.status) = 'OFF'");
|
||||||
|
}
|
||||||
|
if (params.get("dataType") != null) {
|
||||||
|
sqlBuild.append(" AND wdc.data_type = #{dataType}");
|
||||||
|
}
|
||||||
|
return sqlBuild.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,4 +90,5 @@ public interface IGbChannelService {
|
||||||
|
|
||||||
void queryRecordInfo(CommonGBChannel channel, String startTime, String endTime, ErrorCallback<RecordInfo> callback);
|
void queryRecordInfo(CommonGBChannel channel, String startTime, String endTime, ErrorCallback<RecordInfo> callback);
|
||||||
|
|
||||||
|
PageInfo<CommonGBChannel> queryListByCivilCodeForUnusual(int page, int count, String query, Boolean online, Integer channelType);
|
||||||
}
|
}
|
||||||
|
|
|
@ -750,4 +750,16 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
||||||
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<CommonGBChannel> queryListByCivilCodeForUnusual(int page, int count, String query, Boolean online, Integer channelType) {
|
||||||
|
PageHelper.startPage(page, count);
|
||||||
|
if (query != null) {
|
||||||
|
query = query.replaceAll("/", "//")
|
||||||
|
.replaceAll("%", "/%")
|
||||||
|
.replaceAll("_", "/_");
|
||||||
|
}
|
||||||
|
List<CommonGBChannel> all = commonGBChannelMapper.queryListByCivilCodeForUnusual(query, online, channelType);
|
||||||
|
return new PageInfo<>(all);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,183 @@
|
||||||
|
<template>
|
||||||
|
<div id="gbChannelSelect" v-loading="getChannelListLoading">
|
||||||
|
<el-dialog
|
||||||
|
title="异常挂载通道"
|
||||||
|
width="60%"
|
||||||
|
top="2rem"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="showDialog"
|
||||||
|
:destroy-on-close="true"
|
||||||
|
append-to-body
|
||||||
|
@close="close()"
|
||||||
|
>
|
||||||
|
<div class="page-header" style="width: 100%">
|
||||||
|
<div class="page-header-btn" style="width: 100%; text-align: left">
|
||||||
|
搜索:
|
||||||
|
<el-input @input="getChannelList" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
|
||||||
|
prefix-icon="el-icon-search" v-model="searchSrt" clearable></el-input>
|
||||||
|
在线状态:
|
||||||
|
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="online" placeholder="请选择"
|
||||||
|
default-first-option>
|
||||||
|
<el-option label="全部" value=""></el-option>
|
||||||
|
<el-option label="在线" value="true"></el-option>
|
||||||
|
<el-option label="离线" value="false"></el-option>
|
||||||
|
</el-select>
|
||||||
|
类型:
|
||||||
|
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="channelType" placeholder="请选择"
|
||||||
|
default-first-option>
|
||||||
|
<el-option label="全部" value=""></el-option>
|
||||||
|
<el-option label="国标设备" :value="1"></el-option>
|
||||||
|
<el-option label="推流设备" :value="2"></el-option>
|
||||||
|
<el-option label="拉流代理" :value="3"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button size="mini" type="primary" :loading="getChannelListLoading" :disabled="multipleSelection.length ===0"
|
||||||
|
@click="clearUnusualRegion()">清除</el-button>
|
||||||
|
<el-button size="mini" :loading="getChannelListLoading"
|
||||||
|
@click="clearUnusualRegion()">全部清除</el-button>
|
||||||
|
<el-button size="mini" :loading="getChannelListLoading"
|
||||||
|
@click="getChannelList()">刷新</el-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--通道列表-->
|
||||||
|
<el-table size="small" ref="channelListTable" :data="channelList" :height="winHeight" style="width: 100%;"
|
||||||
|
header-row-class-name="table-header" @selection-change="handleSelectionChange" >
|
||||||
|
<el-table-column type="selection" width="55" >
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="gbName" label="名称" min-width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="gbDeviceId" label="编号" min-width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="gbManufacturer" label="厂家" min-width="100">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="gbCivilCode" label="行政区划" min-width="100">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="类型" min-width="100">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<el-tag size="medium" effect="plain" v-if="scope.row.dataType === 1">国标设备</el-tag>
|
||||||
|
<el-tag size="medium" effect="plain" type="success" v-else-if="scope.row.dataType === 2" >推流设备</el-tag>
|
||||||
|
<el-tag size="medium" effect="plain" type="warning" v-else-if="scope.row.dataType === 3">拉流代理</el-tag>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" min-width="100">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<el-tag size="medium" v-if="scope.row.gbStatus === 'ON'">在线</el-tag>
|
||||||
|
<el-tag size="medium" type="info" v-if="scope.row.gbStatus !== 'ON'">离线</el-tag>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" min-width="140" fixed="right">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="addRegion(scope.row)"
|
||||||
|
>
|
||||||
|
添加行政区划
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="display: grid; grid-template-columns: 1fr 1fr">
|
||||||
|
<div style="text-align: left; line-height: 32px">
|
||||||
|
<i class="el-icon-info"></i>清除后通道可正常添加到行政区划,添加行政区划可以自动添加对应的行政区划节点。
|
||||||
|
</div>
|
||||||
|
<el-pagination
|
||||||
|
style="text-align: right"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
:current-page="currentPage"
|
||||||
|
:page-size="count"
|
||||||
|
:page-sizes="[10, 25, 35, 50, 200, 1000, 50000]"
|
||||||
|
layout="total, sizes, prev, pager, next"
|
||||||
|
:total="total">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "UnusualRegionChannelSelect",
|
||||||
|
props: [],
|
||||||
|
computed: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showDialog: false,
|
||||||
|
channelList: [], //设备列表
|
||||||
|
searchSrt: "",
|
||||||
|
online: null,
|
||||||
|
channelType: "",
|
||||||
|
winHeight: 580,
|
||||||
|
currentPage: 1,
|
||||||
|
count: 10,
|
||||||
|
total: 0,
|
||||||
|
getChannelListLoading: false,
|
||||||
|
multipleSelection: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData: function () {
|
||||||
|
this.getChannelList();
|
||||||
|
},
|
||||||
|
currentChange: function (val) {
|
||||||
|
this.currentPage = val;
|
||||||
|
this.getChannelList();
|
||||||
|
},
|
||||||
|
handleSizeChange: function (val) {
|
||||||
|
this.count = val;
|
||||||
|
this.getChannelList();
|
||||||
|
},
|
||||||
|
handleSelectionChange: function (val){
|
||||||
|
this.multipleSelection = val;
|
||||||
|
},
|
||||||
|
getChannelList: function () {
|
||||||
|
this.getChannelListLoading = true;
|
||||||
|
this.$axios({
|
||||||
|
method: 'get',
|
||||||
|
url: `/api/common/channel/civilCode/unusual/list`,
|
||||||
|
params: {
|
||||||
|
page: this.currentPage,
|
||||||
|
count: this.count,
|
||||||
|
channelType: this.channelType,
|
||||||
|
query: this.searchSrt,
|
||||||
|
online: this.online,
|
||||||
|
}
|
||||||
|
}).then( (res)=> {
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
this.total = res.data.data.total;
|
||||||
|
this.channelList = res.data.data.list;
|
||||||
|
}
|
||||||
|
}).catch( (error)=> {
|
||||||
|
console.error(error);
|
||||||
|
}).finally(()=>{
|
||||||
|
this.getChannelListLoading = false;
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
openDialog: function () {
|
||||||
|
console.log(2222)
|
||||||
|
this.showDialog = true;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
close: function () {
|
||||||
|
this.showDialog = false;
|
||||||
|
},
|
||||||
|
clearUnusualRegion: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
addRegion: function (row) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -41,6 +41,9 @@
|
||||||
<el-button v-bind:disabled="multipleSelection.length === 0" size="mini" type="danger" @click="remove()">
|
<el-button v-bind:disabled="multipleSelection.length === 0" size="mini" type="danger" @click="remove()">
|
||||||
移除通道
|
移除通道
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button plain size="mini" type="warning" @click="showUnusualChanel()">
|
||||||
|
异常挂载通道
|
||||||
|
</el-button>
|
||||||
<el-button icon="el-icon-refresh-right" circle size="mini" @click="getChannelList()"></el-button>
|
<el-button icon="el-icon-refresh-right" circle size="mini" @click="getChannelList()"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -87,6 +90,7 @@
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<GbChannelSelect ref="gbChannelSelect" dataType="civilCode"></GbChannelSelect>
|
<GbChannelSelect ref="gbChannelSelect" dataType="civilCode"></GbChannelSelect>
|
||||||
|
<UnusualRegionChannelSelect ref="unusualRegionChannelSelect" ></UnusualRegionChannelSelect>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -95,6 +99,7 @@ import uiHeader from '../layout/UiHeader.vue'
|
||||||
import DeviceService from "./service/DeviceService";
|
import DeviceService from "./service/DeviceService";
|
||||||
import RegionTree from "./common/RegionTree.vue";
|
import RegionTree from "./common/RegionTree.vue";
|
||||||
import GbChannelSelect from "./dialog/GbChannelSelect.vue";
|
import GbChannelSelect from "./dialog/GbChannelSelect.vue";
|
||||||
|
import UnusualRegionChannelSelect from "./dialog/UnusualRegionChannelSelect.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'channelList',
|
name: 'channelList',
|
||||||
|
@ -102,6 +107,7 @@ export default {
|
||||||
GbChannelSelect,
|
GbChannelSelect,
|
||||||
uiHeader,
|
uiHeader,
|
||||||
RegionTree,
|
RegionTree,
|
||||||
|
UnusualRegionChannelSelect,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -269,6 +275,9 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
showUnusualChanel: function () {
|
||||||
|
this.$refs.unusualRegionChannelSelect.openDialog()
|
||||||
|
},
|
||||||
getSnap: function (row) {
|
getSnap: function (row) {
|
||||||
let baseUrl = window.baseUrl ? window.baseUrl : "";
|
let baseUrl = window.baseUrl ? window.baseUrl : "";
|
||||||
return ((process.env.NODE_ENV === 'development') ? process.env.BASE_API : baseUrl) + '/api/device/query/snap/' + this.deviceId + '/' + row.deviceId;
|
return ((process.env.NODE_ENV === 'development') ? process.env.BASE_API : baseUrl) + '/api/device/query/snap/' + this.deviceId + '/' + row.deviceId;
|
||||||
|
|
Loading…
Reference in New Issue