fix: 新增功能修改及完善。
This commit is contained in:
63
src/api/fishery/device/index.ts
Normal file
63
src/api/fishery/device/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeviceVO, DeviceForm, DeviceQuery } from '@/api/fishery/device/types';
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDevice = (query?: DeviceQuery): AxiosPromise<DeviceVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/device/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设备管理详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDevice = (id: string | number): AxiosPromise<DeviceVO> => {
|
||||
return request({
|
||||
url: '/fishery/device/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
* @param data
|
||||
*/
|
||||
export const addDevice = (data: DeviceForm) => {
|
||||
return request({
|
||||
url: '/fishery/device',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
* @param data
|
||||
*/
|
||||
export const updateDevice = (data: DeviceForm) => {
|
||||
return request({
|
||||
url: '/fishery/device',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
* @param id
|
||||
*/
|
||||
export const delDevice = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/device/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
483
src/api/fishery/device/types.ts
Normal file
483
src/api/fishery/device/types.ts
Normal file
@@ -0,0 +1,483 @@
|
||||
export interface DeviceVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 物联网IotId
|
||||
*/
|
||||
iotId: string | number;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType: number;
|
||||
|
||||
/**
|
||||
* 绑定时间
|
||||
*/
|
||||
bindTime: string;
|
||||
|
||||
/**
|
||||
* 服务到期
|
||||
*/
|
||||
deadTime: string;
|
||||
|
||||
/**
|
||||
* 塘口id
|
||||
*/
|
||||
pondId: string | number;
|
||||
|
||||
/**
|
||||
* 溶解氧参数配置开关
|
||||
*/
|
||||
isOxygenUsed: number;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
valueDissolvedOxygen: number;
|
||||
|
||||
/**
|
||||
* 是否已触发溶解氧报警
|
||||
*/
|
||||
isOxygenWarnExist: number;
|
||||
|
||||
/**
|
||||
* 水温
|
||||
*/
|
||||
valueTemperature: number;
|
||||
|
||||
/**
|
||||
* 是否已触发温度报警
|
||||
*/
|
||||
isTempWarnExist: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
valueSaturability: number;
|
||||
|
||||
/**
|
||||
* PH
|
||||
*/
|
||||
valuePh: number;
|
||||
|
||||
/**
|
||||
* 盐度
|
||||
*/
|
||||
valueSalinity: number;
|
||||
|
||||
/**
|
||||
* 溶解氧电话告警开关
|
||||
*/
|
||||
oxyWarnCallOpen: number;
|
||||
|
||||
/**
|
||||
* 低溶氧告警免打扰
|
||||
*/
|
||||
oxyWarnCallNoDis: number;
|
||||
|
||||
/**
|
||||
* 上次溶解氧电话告警时间
|
||||
*/
|
||||
oxyWarnCallLastTime: string;
|
||||
|
||||
/**
|
||||
* 溶解氧电话告警下限
|
||||
*/
|
||||
oxyWarnLower: number;
|
||||
|
||||
/**
|
||||
* 温度电话告警开关
|
||||
*/
|
||||
tempWarnCallOpen: number;
|
||||
|
||||
/**
|
||||
* 温度告警免打扰
|
||||
*/
|
||||
tempWarnCallNoDis: number;
|
||||
|
||||
/**
|
||||
* 上次温度电话告警时间
|
||||
*/
|
||||
tempWarnCallLastTime: string;
|
||||
|
||||
/**
|
||||
* 温度电话告警上限
|
||||
*/
|
||||
tempWarnUpper: number;
|
||||
|
||||
/**
|
||||
* 温度电话告警下限
|
||||
*/
|
||||
tempWarnLower: number;
|
||||
|
||||
/**
|
||||
* 设置的盐度补偿
|
||||
*/
|
||||
salinityCompensation: number;
|
||||
|
||||
/**
|
||||
* 输入额定电压
|
||||
*/
|
||||
inputVoltage: number;
|
||||
|
||||
/**
|
||||
* 设备告警状态码
|
||||
*/
|
||||
warnCode: number;
|
||||
|
||||
/**
|
||||
* 物联网卡号
|
||||
*/
|
||||
iccId: string | number;
|
||||
|
||||
/**
|
||||
* 相位差
|
||||
*/
|
||||
phaseDifference: number;
|
||||
|
||||
/**
|
||||
* 荧光值
|
||||
*/
|
||||
tfluorescence: number;
|
||||
|
||||
/**
|
||||
* 参比值
|
||||
*/
|
||||
treference: number;
|
||||
|
||||
/**
|
||||
* 线性系数补偿
|
||||
*/
|
||||
phaseCompensation: number;
|
||||
|
||||
/**
|
||||
* 相位差补偿
|
||||
*/
|
||||
phasedifCompensation: number;
|
||||
|
||||
/**
|
||||
* 温度补偿
|
||||
*/
|
||||
temperatureCompensation: number;
|
||||
|
||||
/**
|
||||
* 电压告警开关
|
||||
*/
|
||||
voltageWarnOpen: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 设备分类
|
||||
*/
|
||||
category: string;
|
||||
|
||||
/**
|
||||
* 电量电话告警开关
|
||||
*/
|
||||
batteryWarnCallOpen: number;
|
||||
|
||||
/**
|
||||
* 电量告警免打扰
|
||||
*/
|
||||
batteryWarnCallNoDis: number;
|
||||
|
||||
/**
|
||||
* 上次电量电话告警时间
|
||||
*/
|
||||
batteryWarnCallLastTime: string;
|
||||
|
||||
/**
|
||||
* 电量电话告警下限
|
||||
*/
|
||||
batteryWarnLower: number;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 物联网IotId
|
||||
*/
|
||||
iotId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 绑定时间
|
||||
*/
|
||||
bindTime?: string;
|
||||
|
||||
/**
|
||||
* 服务到期
|
||||
*/
|
||||
deadTime?: string;
|
||||
|
||||
/**
|
||||
* 塘口id
|
||||
*/
|
||||
pondId?: string | number;
|
||||
|
||||
/**
|
||||
* 溶解氧参数配置开关
|
||||
*/
|
||||
isOxygenUsed?: number;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
valueDissolvedOxygen?: number;
|
||||
|
||||
/**
|
||||
* 是否已触发溶解氧报警
|
||||
*/
|
||||
isOxygenWarnExist?: number;
|
||||
|
||||
/**
|
||||
* 水温
|
||||
*/
|
||||
valueTemperature?: number;
|
||||
|
||||
/**
|
||||
* 是否已触发温度报警
|
||||
*/
|
||||
isTempWarnExist?: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
valueSaturability?: number;
|
||||
|
||||
/**
|
||||
* PH
|
||||
*/
|
||||
valuePh?: number;
|
||||
|
||||
/**
|
||||
* 盐度
|
||||
*/
|
||||
valueSalinity?: number;
|
||||
|
||||
/**
|
||||
* 溶解氧电话告警开关
|
||||
*/
|
||||
oxyWarnCallOpen?: number;
|
||||
|
||||
/**
|
||||
* 低溶氧告警免打扰
|
||||
*/
|
||||
oxyWarnCallNoDis?: number;
|
||||
|
||||
/**
|
||||
* 上次溶解氧电话告警时间
|
||||
*/
|
||||
oxyWarnCallLastTime?: string;
|
||||
|
||||
/**
|
||||
* 溶解氧电话告警下限
|
||||
*/
|
||||
oxyWarnLower?: number;
|
||||
|
||||
/**
|
||||
* 温度电话告警开关
|
||||
*/
|
||||
tempWarnCallOpen?: number;
|
||||
|
||||
/**
|
||||
* 温度告警免打扰
|
||||
*/
|
||||
tempWarnCallNoDis?: number;
|
||||
|
||||
/**
|
||||
* 上次温度电话告警时间
|
||||
*/
|
||||
tempWarnCallLastTime?: string;
|
||||
|
||||
/**
|
||||
* 温度电话告警上限
|
||||
*/
|
||||
tempWarnUpper?: number;
|
||||
|
||||
/**
|
||||
* 温度电话告警下限
|
||||
*/
|
||||
tempWarnLower?: number;
|
||||
|
||||
/**
|
||||
* 设置的盐度补偿
|
||||
*/
|
||||
salinityCompensation?: number;
|
||||
|
||||
/**
|
||||
* 输入额定电压
|
||||
*/
|
||||
inputVoltage?: number;
|
||||
|
||||
/**
|
||||
* 设备告警状态码
|
||||
*/
|
||||
warnCode?: number;
|
||||
|
||||
/**
|
||||
* 物联网卡号
|
||||
*/
|
||||
iccId?: string | number;
|
||||
|
||||
/**
|
||||
* 相位差
|
||||
*/
|
||||
phaseDifference?: number;
|
||||
|
||||
/**
|
||||
* 荧光值
|
||||
*/
|
||||
tfluorescence?: number;
|
||||
|
||||
/**
|
||||
* 参比值
|
||||
*/
|
||||
treference?: number;
|
||||
|
||||
/**
|
||||
* 线性系数补偿
|
||||
*/
|
||||
phaseCompensation?: number;
|
||||
|
||||
/**
|
||||
* 相位差补偿
|
||||
*/
|
||||
phasedifCompensation?: number;
|
||||
|
||||
/**
|
||||
* 温度补偿
|
||||
*/
|
||||
temperatureCompensation?: number;
|
||||
|
||||
/**
|
||||
* 电压告警开关
|
||||
*/
|
||||
voltageWarnOpen?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 设备分类
|
||||
*/
|
||||
category?: string;
|
||||
|
||||
/**
|
||||
* 电量电话告警开关
|
||||
*/
|
||||
batteryWarnCallOpen?: number;
|
||||
|
||||
/**
|
||||
* 电量告警免打扰
|
||||
*/
|
||||
batteryWarnCallNoDis?: number;
|
||||
|
||||
/**
|
||||
* 上次电量电话告警时间
|
||||
*/
|
||||
batteryWarnCallLastTime?: string;
|
||||
|
||||
/**
|
||||
* 电量电话告警下限
|
||||
*/
|
||||
batteryWarnLower?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 绑定时间
|
||||
*/
|
||||
bindTime?: string;
|
||||
|
||||
/**
|
||||
* 塘口id
|
||||
*/
|
||||
pondId?: string | number;
|
||||
|
||||
/**
|
||||
* 物联网卡号
|
||||
*/
|
||||
iccId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备分类
|
||||
*/
|
||||
category?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
63
src/api/fishery/deviceBindRecord/index.ts
Normal file
63
src/api/fishery/deviceBindRecord/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeviceBindRecordVO, DeviceBindRecordForm, DeviceBindRecordQuery } from '@/api/fishery/deviceBindRecord/types';
|
||||
|
||||
/**
|
||||
* 查询设备绑定记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDeviceBindRecord = (query?: DeviceBindRecordQuery): AxiosPromise<DeviceBindRecordVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/deviceBindRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设备绑定记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDeviceBindRecord = (id: string | number): AxiosPromise<DeviceBindRecordVO> => {
|
||||
return request({
|
||||
url: '/fishery/deviceBindRecord/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设备绑定记录
|
||||
* @param data
|
||||
*/
|
||||
export const addDeviceBindRecord = (data: DeviceBindRecordForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceBindRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设备绑定记录
|
||||
* @param data
|
||||
*/
|
||||
export const updateDeviceBindRecord = (data: DeviceBindRecordForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceBindRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设备绑定记录
|
||||
* @param id
|
||||
*/
|
||||
export const delDeviceBindRecord = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/deviceBindRecord/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
98
src/api/fishery/deviceBindRecord/types.ts
Normal file
98
src/api/fishery/deviceBindRecord/types.ts
Normal file
@@ -0,0 +1,98 @@
|
||||
export interface DeviceBindRecordVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 物联网IotId
|
||||
*/
|
||||
iotId: string | number;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType: number;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum: string;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 绑定/解绑
|
||||
*/
|
||||
isBind: number;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceBindRecordForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 物联网IotId
|
||||
*/
|
||||
iotId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 绑定/解绑
|
||||
*/
|
||||
isBind?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceBindRecordQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 物联网IotId
|
||||
*/
|
||||
iotId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 绑定/解绑
|
||||
*/
|
||||
isBind?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user