Compare commits

...

9 Commits

Author SHA1 Message Date
阿斌
aed1df64a4
Pre Merge pull request !36 from 阿斌/N/A 2025-06-12 07:28:37 +00:00
lin
3a5513a2e6 调整前端通用通道api顺序 2025-06-12 15:28:20 +08:00
lin
770e5410bf Merge remote-tracking branch 'origin/master' 2025-06-12 11:05:06 +08:00
lin
c7dbf77a8d 调整前端通道管理名为组织结构 2025-06-12 11:04:55 +08:00
648540858
ebcbc486b3
Merge pull request #1885 from q792602257/795
支持查询时根据channelId查询报警
2025-06-12 09:22:42 +08:00
648540858
a1cb616b0b
Merge pull request #1883 from q792602257/bugfix
knife4j文档中描述使用相对地址,可以直接点击打开对应页面
2025-06-12 09:22:15 +08:00
Jerry Yan
68806b4202 支持查询时根据channelId查询报警
Fixes #795
2025-06-11 13:00:27 +08:00
Jerry Yan
e6228df7a1 knife4j文档,描述使用相对地址,可以直接点击打开对应页面 2025-06-11 11:49:53 +08:00
阿斌
da98101aac
update src/main/resources/civilCode.csv.
行政规划错误。江苏南通海门市,修改为海门区,浙江杭州删除下城区、江干区,新增钱塘区,临平区

Signed-off-by: 阿斌 <38912748@qq.com>
2024-12-15 08:58:42 +00:00
8 changed files with 234 additions and 213 deletions

View File

@ -39,9 +39,9 @@ public class SpringDocConfig {
.info(new Info().title("WVP-PRO 接口文档")
.contact(contact)
.description("开箱即用的28181协议视频平台。 <br/>" +
"1. 打开http://127.0.0.1:18080/doc.html#/1.%20全部/用户管理/login_1" +
"1. 打开<a href='/doc.html#/1.%20全部/用户管理/login_1'>登录</a>接口" +
" 登录成功后返回AccessToken。 <br/>" +
"2. 填写到AccessToken到参数值 http://127.0.0.1:18080/doc.html#/Authorize/1.%20全部 <br/>" +
"2. 填写到AccessToken到参数值 <a href='/doc.html#/Authorize/1.%20全部'>Token配置</a> <br/>" +
"后续接口就可以直接测试了")
.version("v3.1.0")
.license(new License().name("Apache 2.0").url("http://springdoc.org")));

View File

@ -148,6 +148,7 @@ public class AlarmController {
@Parameter(name = "page",description = "当前页",required = true)
@Parameter(name = "count",description = "每页查询数量",required = true)
@Parameter(name = "deviceId",description = "设备id")
@Parameter(name = "channelId",description = "通道id")
@Parameter(name = "alarmPriority",description = "查询内容")
@Parameter(name = "alarmMethod",description = "查询内容")
@Parameter(name = "alarmType",description = "每页查询数量")
@ -157,7 +158,8 @@ public class AlarmController {
public PageInfo<DeviceAlarm> getAll(
@RequestParam int page,
@RequestParam int count,
@RequestParam(required = false) String deviceId,
@RequestParam(required = false) String deviceId,
@RequestParam(required = false) String channelId,
@RequestParam(required = false) String alarmPriority,
@RequestParam(required = false) String alarmMethod,
@RequestParam(required = false) String alarmType,
@ -186,7 +188,7 @@ public class AlarmController {
throw new ControllerException(ErrorCode.ERROR400.getCode(), "endTime格式为" + DateUtil.PATTERN);
}
return deviceAlarmService.getAllAlarm(page, count, deviceId, alarmPriority, alarmMethod,
return deviceAlarmService.getAllAlarm(page, count, deviceId, channelId, alarmPriority, alarmMethod,
alarmType, startTime, endTime);
}
}

View File

@ -26,6 +26,7 @@ public interface DeviceAlarmMapper {
" SELECT * FROM wvp_device_alarm " +
" WHERE 1=1 " +
" <if test=\"deviceId != null\" > AND device_id = #{deviceId}</if>" +
" <if test=\"channelId != null\" > AND channel_id = #{channelId}</if>" +
" <if test=\"alarmPriority != null\" > AND alarm_priority = #{alarmPriority} </if>" +
" <if test=\"alarmMethod != null\" > AND alarm_method = #{alarmMethod} </if>" +
" <if test=\"alarmType != null\" > AND alarm_type = #{alarmType} </if>" +
@ -33,7 +34,7 @@ public interface DeviceAlarmMapper {
" <if test=\"endTime != null\" > AND alarm_time &lt;= #{endTime} </if>" +
" ORDER BY alarm_time ASC " +
" </script>"})
List<DeviceAlarm> query(@Param("deviceId") String deviceId, @Param("alarmPriority") String alarmPriority, @Param("alarmMethod") String alarmMethod,
List<DeviceAlarm> query(@Param("deviceId") String deviceId, @Param("channelId") String channelId, @Param("alarmPriority") String alarmPriority, @Param("alarmMethod") String alarmMethod,
@Param("alarmType") String alarmType, @Param("startTime") String startTime, @Param("endTime") String endTime);

View File

@ -23,7 +23,7 @@ public interface IDeviceAlarmService {
* @param endTime 结束时间
* @return 报警列表
*/
PageInfo<DeviceAlarm> getAllAlarm(int page, int count, String deviceId, String alarmPriority, String alarmMethod,
PageInfo<DeviceAlarm> getAllAlarm(int page, int count, String deviceId, String channelId, String alarmPriority, String alarmMethod,
String alarmType, String startTime, String endTime);
/**

View File

@ -17,9 +17,9 @@ public class DeviceAlarmServiceImpl implements IDeviceAlarmService {
private DeviceAlarmMapper deviceAlarmMapper;
@Override
public PageInfo<DeviceAlarm> getAllAlarm(int page, int count, String deviceId, String alarmPriority, String alarmMethod, String alarmType, String startTime, String endTime) {
public PageInfo<DeviceAlarm> getAllAlarm(int page, int count, String deviceId, String channelId, String alarmPriority, String alarmMethod, String alarmType, String startTime, String endTime) {
PageHelper.startPage(page, count);
List<DeviceAlarm> all = deviceAlarmMapper.query(deviceId, alarmPriority, alarmMethod, alarmType, startTime, endTime);
List<DeviceAlarm> all = deviceAlarmMapper.query(deviceId, channelId, alarmPriority, alarmMethod, alarmType, startTime, endTime);
return new PageInfo<>(all);
}

View File

@ -861,7 +861,7 @@
320623,如东县,3206
320681,启东市,3206
320682,如皋市,3206
320684,海门,3206
320684,海门,3206
320685,海安市,3206
3207,连云港市,32
320703,连云区,3207
@ -918,8 +918,6 @@
33,浙江省,
3301,杭州市,33
330102,上城区,3301
330103,下城区,3301
330104,江干区,3301
330105,拱墅区,3301
330106,西湖区,3301
330108,滨江区,3301
@ -927,6 +925,8 @@
330110,余杭区,3301
330111,富阳区,3301
330112,临安区,3301
330113,临平区,3301
330114,钱塘区,3301
330122,桐庐县,3301
330127,淳安县,3301
330182,建德市,3301

1 编号 名称 上级
861 320623 如东县 3206
862 320681 启东市 3206
863 320682 如皋市 3206
864 320684 海门市 海门区 3206
865 320685 海安市 3206
866 3207 连云港市 32
867 320703 连云区 3207
918 33 浙江省
919 3301 杭州市 33
920 330102 上城区 3301
330103 下城区 3301
330104 江干区 3301
921 330105 拱墅区 3301
922 330106 西湖区 3301
923 330108 滨江区 3301
925 330110 余杭区 3301
926 330111 富阳区 3301
927 330112 临安区 3301
928 330113 临平区 3301
929 330114 钱塘区 3301
930 330122 桐庐县 3301
931 330127 淳安县 3301
932 330182 建德市 3301

View File

@ -2,32 +2,6 @@ import request from '@/utils/request'
// 通用通道API
export function update(data) {
return request({
method: 'post',
url: '/api/common/channel/update',
data: data
})
}
export function add(data) {
return request({
method: 'post',
url: '/api/common/channel/add',
data: data
})
}
export function reset(id) {
return request({
method: 'post',
url: '/api/common/channel/reset',
params: {
id: id
}
})
}
export function queryOne(id) {
return request({
method: 'get',
@ -38,180 +12,6 @@ export function queryOne(id) {
})
}
export function addDeviceToGroup(params) {
const { parentId, businessGroup, deviceIds } = params
return request({
method: 'post',
url: `/api/common/channel/group/device/add`,
data: {
parentId: parentId,
businessGroup: businessGroup,
deviceIds: deviceIds
}
})
}
export function addToGroup(params) {
const { parentId, businessGroup, channelIds } = params
return request({
method: 'post',
url: `/api/common/channel/group/add`,
data: {
parentId: parentId,
businessGroup: businessGroup,
channelIds: channelIds
}
})
}
export function deleteDeviceFromGroup(deviceIds) {
return request({
method: 'post',
url: `/api/common/channel/group/device/delete`,
data: {
deviceIds: deviceIds
}
})
}
export function deleteFromGroup(channels) {
return request({
method: 'post',
url: `/api/common/channel/group/delete`,
data: {
channelIds: channels
}
})
}
export function addDeviceToRegion(params) {
const { civilCode, deviceIds } = params
return request({
method: 'post',
url: `/api/common/channel/region/device/add`,
data: {
civilCode: civilCode,
deviceIds: deviceIds
}
})
}
export function addToRegion(params) {
const { civilCode, channelIds } = params
return request({
method: 'post',
url: `/api/common/channel/region/add`,
data: {
civilCode: civilCode,
channelIds: channelIds
}
})
}
export function deleteDeviceFromRegion(deviceIds) {
return request({
method: 'post',
url: `/api/common/channel/region/device/delete`,
data: {
deviceIds: deviceIds
}
})
}
export function deleteFromRegion(channels) {
return request({
method: 'post',
url: `/api/common/channel/region/delete`,
data: {
channelIds: channels
}
})
}
export function getCivilCodeList(params) {
const { page, count, channelType, query, online, civilCode } = params
return request({
method: 'get',
url: `/api/common/channel/civilcode/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online,
civilCode: civilCode
}
})
}
export function getParentList(params) {
const { page, count, channelType, query, online, groupDeviceId } = params
return request({
method: 'get',
url: `/api/common/channel/parent/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online,
groupDeviceId: groupDeviceId
}
})
}
export function getUnusualParentList(params) {
const { page, count, channelType, query, online } = params
return request({
method: 'get',
url: `/api/common/channel/parent/unusual/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online
}
})
}
export function clearUnusualParentList(params) {
const { all, channelIds } = params
return request({
method: 'post',
url: `/api/common/channel/parent/unusual/clear`,
data: {
all: all,
channelIds: channelIds
}
})
}
export function getUnusualCivilCodeList(params) {
const { page, count, channelType, query, online } = params
return request({
method: 'get',
url: `/api/common/channel/civilCode/unusual/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online
}
})
}
export function clearUnusualCivilCodeList(params) {
const { all, channelIds } = params
return request({
method: 'post',
url: `/api/common/channel/civilCode/unusual/clear`,
data: {
all: all,
channelIds: channelIds
}
})
}
export function getIndustryList() {
return request({
method: 'get',
@ -233,6 +33,224 @@ export function getNetworkIdentificationList() {
})
}
export function update(data) {
return request({
method: 'post',
url: '/api/common/channel/update',
data: data
})
}
export function reset(id) {
return request({
method: 'post',
url: '/api/common/channel/reset',
params: {
id: id
}
})
}
export function add(data) {
return request({
method: 'post',
url: '/api/common/channel/add',
data: data
})
}
export function getList(params) {
const { page, count, query, online, hasRecordPlan, channelType } = params
return request({
method: 'get',
url: `/api/common/channel/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online,
hasRecordPlan: hasRecordPlan
}
})
}
export function getCivilCodeList(params) {
const { page, count, channelType, query, online, civilCode } = params
return request({
method: 'get',
url: `/api/common/channel/civilcode/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online,
civilCode: civilCode
}
})
}
export function getUnusualCivilCodeList(params) {
const { page, count, channelType, query, online } = params
return request({
method: 'get',
url: `/api/common/channel/civilCode/unusual/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online
}
})
}
export function getUnusualParentList(params) {
const { page, count, channelType, query, online } = params
return request({
method: 'get',
url: `/api/common/channel/parent/unusual/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online
}
})
}
export function clearUnusualCivilCodeList(params) {
const { all, channelIds } = params
return request({
method: 'post',
url: `/api/common/channel/civilCode/unusual/clear`,
data: {
all: all,
channelIds: channelIds
}
})
}
export function clearUnusualParentList(params) {
const { all, channelIds } = params
return request({
method: 'post',
url: `/api/common/channel/parent/unusual/clear`,
data: {
all: all,
channelIds: channelIds
}
})
}
export function getParentList(params) {
const { page, count, channelType, query, online, groupDeviceId } = params
return request({
method: 'get',
url: `/api/common/channel/parent/list`,
params: {
page: page,
count: count,
channelType: channelType,
query: query,
online: online,
groupDeviceId: groupDeviceId
}
})
}
export function addToRegion(params) {
const { civilCode, channelIds } = params
return request({
method: 'post',
url: `/api/common/channel/region/add`,
data: {
civilCode: civilCode,
channelIds: channelIds
}
})
}
export function deleteFromRegion(channels) {
return request({
method: 'post',
url: `/api/common/channel/region/delete`,
data: {
channelIds: channels
}
})
}
export function addDeviceToRegion(params) {
const { civilCode, deviceIds } = params
return request({
method: 'post',
url: `/api/common/channel/region/device/add`,
data: {
civilCode: civilCode,
deviceIds: deviceIds
}
})
}
export function deleteDeviceFromRegion(deviceIds) {
return request({
method: 'post',
url: `/api/common/channel/region/device/delete`,
data: {
deviceIds: deviceIds
}
})
}
export function addToGroup(params) {
const { parentId, businessGroup, channelIds } = params
return request({
method: 'post',
url: `/api/common/channel/group/add`,
data: {
parentId: parentId,
businessGroup: businessGroup,
channelIds: channelIds
}
})
}
export function deleteFromGroup(channels) {
return request({
method: 'post',
url: `/api/common/channel/group/delete`,
data: {
channelIds: channels
}
})
}
export function addDeviceToGroup(params) {
const { parentId, businessGroup, deviceIds } = params
return request({
method: 'post',
url: `/api/common/channel/group/device/add`,
data: {
parentId: parentId,
businessGroup: businessGroup,
deviceIds: deviceIds
}
})
}
export function deleteDeviceFromGroup(deviceIds) {
return request({
method: 'post',
url: `/api/common/channel/group/device/delete`,
data: {
deviceIds: deviceIds
}
})
}
export function playChannel(channelId) {
return request({
method: 'get',

View File

@ -116,8 +116,8 @@ export const constantRoutes = [
path: '/commonChannel',
component: Layout,
redirect: '/commonChannel/region',
name: '通道管理',
meta: { title: '通道管理', icon: 'channelManger' },
name: '组织结构',
meta: { title: '组织结构', icon: 'tree' },
children: [
{
path: 'region',