feat: 新功能开发,设备告警信息、设备实时数据查看等。
This commit is contained in:
63
src/api/fishery/callNotice/index.ts
Normal file
63
src/api/fishery/callNotice/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CallNoticeVO, CallNoticeForm, CallNoticeQuery } from '@/api/fishery/callNotice/types';
|
||||
|
||||
/**
|
||||
* 查询告警电话通知记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listCallNotice = (query?: CallNoticeQuery): AxiosPromise<CallNoticeVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/callNotice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询告警电话通知记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getCallNotice = (id: string | number): AxiosPromise<CallNoticeVO> => {
|
||||
return request({
|
||||
url: '/fishery/callNotice/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增告警电话通知记录
|
||||
* @param data
|
||||
*/
|
||||
export const addCallNotice = (data: CallNoticeForm) => {
|
||||
return request({
|
||||
url: '/fishery/callNotice',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改告警电话通知记录
|
||||
* @param data
|
||||
*/
|
||||
export const updateCallNotice = (data: CallNoticeForm) => {
|
||||
return request({
|
||||
url: '/fishery/callNotice',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除告警电话通知记录
|
||||
* @param id
|
||||
*/
|
||||
export const delCallNotice = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/callNotice/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
235
src/api/fishery/callNotice/types.ts
Normal file
235
src/api/fishery/callNotice/types.ts
Normal file
@@ -0,0 +1,235 @@
|
||||
export interface CallNoticeVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 通知手机号
|
||||
*/
|
||||
mobilePhone: string;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId: string | number;
|
||||
|
||||
/**
|
||||
* 呼叫状态
|
||||
*/
|
||||
callStatus: number;
|
||||
|
||||
/**
|
||||
* 主叫号码
|
||||
*/
|
||||
caller: string;
|
||||
|
||||
/**
|
||||
* 通话时长
|
||||
*/
|
||||
duration: string;
|
||||
|
||||
/**
|
||||
* 通话结束时间
|
||||
*/
|
||||
endTime: string;
|
||||
|
||||
/**
|
||||
* 挂断方向
|
||||
*/
|
||||
hangupDirection: string;
|
||||
|
||||
/**
|
||||
* 呼叫发起时间
|
||||
*/
|
||||
originateTime: string;
|
||||
|
||||
/**
|
||||
* 扩展字段回传
|
||||
*/
|
||||
outId: string | number;
|
||||
|
||||
/**
|
||||
* 被叫响铃时间
|
||||
*/
|
||||
ringTime: string;
|
||||
|
||||
/**
|
||||
* 通话接通时间
|
||||
*/
|
||||
startTime: string;
|
||||
|
||||
/**
|
||||
* 呼叫结果状态码
|
||||
*/
|
||||
statusCode: string;
|
||||
|
||||
/**
|
||||
* 结果描述
|
||||
*/
|
||||
statusMsg: string;
|
||||
|
||||
/**
|
||||
* 通话类型
|
||||
*/
|
||||
tollType: string;
|
||||
|
||||
/**
|
||||
* 话单类型
|
||||
*/
|
||||
voiceType: string;
|
||||
|
||||
}
|
||||
|
||||
export interface CallNoticeForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 通知手机号
|
||||
*/
|
||||
mobilePhone?: string;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 设定的呼叫时间
|
||||
*/
|
||||
callTime?: string;
|
||||
|
||||
/**
|
||||
* 呼叫的CallId
|
||||
*/
|
||||
callId?: string | number;
|
||||
|
||||
/**
|
||||
* 呼叫状态
|
||||
*/
|
||||
callStatus?: number;
|
||||
|
||||
/**
|
||||
* 主叫号码
|
||||
*/
|
||||
caller?: string;
|
||||
|
||||
/**
|
||||
* 通话时长
|
||||
*/
|
||||
duration?: string;
|
||||
|
||||
/**
|
||||
* 通话结束时间
|
||||
*/
|
||||
endTime?: string;
|
||||
|
||||
/**
|
||||
* 挂断方向
|
||||
*/
|
||||
hangupDirection?: string;
|
||||
|
||||
/**
|
||||
* 呼叫发起时间
|
||||
*/
|
||||
originateTime?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段回传
|
||||
*/
|
||||
outId?: string | number;
|
||||
|
||||
/**
|
||||
* 被叫响铃时间
|
||||
*/
|
||||
ringTime?: string;
|
||||
|
||||
/**
|
||||
* 通话接通时间
|
||||
*/
|
||||
startTime?: string;
|
||||
|
||||
/**
|
||||
* 呼叫结果状态码
|
||||
*/
|
||||
statusCode?: string;
|
||||
|
||||
/**
|
||||
* 结果描述
|
||||
*/
|
||||
statusMsg?: string;
|
||||
|
||||
/**
|
||||
* 通话类型
|
||||
*/
|
||||
tollType?: string;
|
||||
|
||||
/**
|
||||
* 话单类型
|
||||
*/
|
||||
voiceType?: string;
|
||||
|
||||
/**
|
||||
* 塘口名称
|
||||
*/
|
||||
pondName?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface CallNoticeQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
callStatus?: string | number;
|
||||
|
||||
/**
|
||||
* 通知手机号
|
||||
*/
|
||||
mobilePhone?: string;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 通话时长
|
||||
*/
|
||||
duration?: string;
|
||||
|
||||
/**
|
||||
* 通话结束时间
|
||||
*/
|
||||
endTime?: string;
|
||||
|
||||
/**
|
||||
* 挂断方向
|
||||
*/
|
||||
hangupDirection?: string;
|
||||
|
||||
/**
|
||||
* 通话类型
|
||||
*/
|
||||
tollType?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
63
src/api/fishery/mapMessageWarnCallNotice/index.ts
Normal file
63
src/api/fishery/mapMessageWarnCallNotice/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MapMessageWarnCallNoticeVO, MapMessageWarnCallNoticeForm, MapMessageWarnCallNoticeQuery } from '@/api/fishery/mapMessageWarnCallNotice/types';
|
||||
|
||||
/**
|
||||
* 查询告警消息和电话告警通知关系表列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMapMessageWarnCallNotice = (query?: MapMessageWarnCallNoticeQuery): AxiosPromise<MapMessageWarnCallNoticeVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/mapMessageWarnCallNotice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询告警消息和电话告警通知关系表详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMapMessageWarnCallNotice = (id: string | number): AxiosPromise<MapMessageWarnCallNoticeVO> => {
|
||||
return request({
|
||||
url: '/fishery/mapMessageWarnCallNotice/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增告警消息和电话告警通知关系表
|
||||
* @param data
|
||||
*/
|
||||
export const addMapMessageWarnCallNotice = (data: MapMessageWarnCallNoticeForm) => {
|
||||
return request({
|
||||
url: '/fishery/mapMessageWarnCallNotice',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改告警消息和电话告警通知关系表
|
||||
* @param data
|
||||
*/
|
||||
export const updateMapMessageWarnCallNotice = (data: MapMessageWarnCallNoticeForm) => {
|
||||
return request({
|
||||
url: '/fishery/mapMessageWarnCallNotice',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除告警消息和电话告警通知关系表
|
||||
* @param id
|
||||
*/
|
||||
export const delMapMessageWarnCallNotice = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/mapMessageWarnCallNotice/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
63
src/api/fishery/mapMessageWarnCallNotice/types.ts
Normal file
63
src/api/fishery/mapMessageWarnCallNotice/types.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
export interface MapMessageWarnCallNoticeVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 告警消息Id
|
||||
*/
|
||||
messageWarnId: string | number;
|
||||
|
||||
/**
|
||||
* 电话通知id
|
||||
*/
|
||||
callNoticeId: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MapMessageWarnCallNoticeForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 告警消息Id
|
||||
*/
|
||||
messageWarnId?: string | number;
|
||||
|
||||
/**
|
||||
* 电话通知id
|
||||
*/
|
||||
callNoticeId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MapMessageWarnCallNoticeQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 告警消息Id
|
||||
*/
|
||||
messageWarnId?: string | number;
|
||||
|
||||
/**
|
||||
* 电话通知id
|
||||
*/
|
||||
callNoticeId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
63
src/api/fishery/messageWarn/index.ts
Normal file
63
src/api/fishery/messageWarn/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MessageWarnVO, MessageWarnForm, MessageWarnQuery } from '@/api/fishery/messageWarn/types';
|
||||
|
||||
/**
|
||||
* 查询设备告警记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMessageWarn = (query?: MessageWarnQuery): AxiosPromise<MessageWarnVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/messageWarn/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设备告警记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMessageWarn = (id: string | number): AxiosPromise<MessageWarnVO> => {
|
||||
return request({
|
||||
url: '/fishery/messageWarn/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设备告警记录
|
||||
* @param data
|
||||
*/
|
||||
export const addMessageWarn = (data: MessageWarnForm) => {
|
||||
return request({
|
||||
url: '/fishery/messageWarn',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设备告警记录
|
||||
* @param data
|
||||
*/
|
||||
export const updateMessageWarn = (data: MessageWarnForm) => {
|
||||
return request({
|
||||
url: '/fishery/messageWarn',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设备告警记录
|
||||
* @param id
|
||||
*/
|
||||
export const delMessageWarn = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/messageWarn/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
183
src/api/fishery/messageWarn/types.ts
Normal file
183
src/api/fishery/messageWarn/types.ts
Normal file
@@ -0,0 +1,183 @@
|
||||
export interface MessageWarnVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId: string | number;
|
||||
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
message: string;
|
||||
|
||||
/**
|
||||
* 是否已读
|
||||
*/
|
||||
isRead: number;
|
||||
|
||||
/**
|
||||
* 告警类型
|
||||
*/
|
||||
warnType: number;
|
||||
|
||||
/**
|
||||
* 塘口名称
|
||||
*/
|
||||
pondName: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
mobilePhone?: string;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName?: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MessageWarnForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
message?: string;
|
||||
|
||||
/**
|
||||
* 是否已读
|
||||
*/
|
||||
isRead?: number;
|
||||
|
||||
/**
|
||||
* 告警类型
|
||||
*/
|
||||
warnType?: number;
|
||||
|
||||
/**
|
||||
* 塘口名称
|
||||
*/
|
||||
pondName?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
mobilePhone?: string;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MessageWarnQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
message?: string;
|
||||
|
||||
/**
|
||||
* 是否已读
|
||||
*/
|
||||
isRead?: number;
|
||||
|
||||
/**
|
||||
* 告警类型
|
||||
*/
|
||||
warnType?: number;
|
||||
|
||||
/**
|
||||
* 塘口名称
|
||||
*/
|
||||
pondName?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user