feat: 设备故障码、设备校验记录、测控一体机开关、设备充值记录、充值订单,代码提交。
This commit is contained in:
63
src/api/fishery/deviceCorrectRecord/index.ts
Normal file
63
src/api/fishery/deviceCorrectRecord/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeviceCorrectRecordVO, DeviceCorrectRecordForm, DeviceCorrectRecordQuery } from '@/api/fishery/deviceCorrectRecord/types';
|
||||
|
||||
/**
|
||||
* 查询设备校准记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDeviceCorrectRecord = (query?: DeviceCorrectRecordQuery): AxiosPromise<DeviceCorrectRecordVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设备校准记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDeviceCorrectRecord = (id: string | number): AxiosPromise<DeviceCorrectRecordVO> => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设备校准记录
|
||||
* @param data
|
||||
*/
|
||||
export const addDeviceCorrectRecord = (data: DeviceCorrectRecordForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设备校准记录
|
||||
* @param data
|
||||
*/
|
||||
export const updateDeviceCorrectRecord = (data: DeviceCorrectRecordForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设备校准记录
|
||||
* @param id
|
||||
*/
|
||||
export const delDeviceCorrectRecord = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
143
src/api/fishery/deviceCorrectRecord/types.ts
Normal file
143
src/api/fishery/deviceCorrectRecord/types.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
export interface DeviceCorrectRecordVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
serialNum: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType: number;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
valueDissolvedOxygen: number;
|
||||
|
||||
/**
|
||||
* 水温
|
||||
*/
|
||||
valueTemperature: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
valueSaturability: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceCorrectRecordForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
valueDissolvedOxygen?: number;
|
||||
|
||||
/**
|
||||
* 水温
|
||||
*/
|
||||
valueTemperature?: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
valueSaturability?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceCorrectRecordQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户信息(用户名或手机号)
|
||||
*/
|
||||
userInfo?: string;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
valueDissolvedOxygen?: number;
|
||||
|
||||
/**
|
||||
* 水温
|
||||
*/
|
||||
valueTemperature?: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
valueSaturability?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user