1、单元
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7m16s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7m16s
2、房间
This commit is contained in:
61
apps/web-antd/src/api/property/unit/index.ts
Normal file
61
apps/web-antd/src/api/property/unit/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { UnitVO, UnitForm, UnitQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询单元列表
|
||||
* @param params
|
||||
* @returns 单元列表
|
||||
*/
|
||||
export function unitList(params?: UnitQuery) {
|
||||
return requestClient.get<PageResult<UnitVO>>('/property/unit/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出单元列表
|
||||
* @param params
|
||||
* @returns 单元列表
|
||||
*/
|
||||
export function unitExport(params?: UnitQuery) {
|
||||
return commonExport('/property/unit/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单元详情
|
||||
* @param id id
|
||||
* @returns 单元详情
|
||||
*/
|
||||
export function unitInfo(id: ID) {
|
||||
return requestClient.get<UnitVO>(`/property/unit/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单元
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function unitAdd(data: UnitForm) {
|
||||
return requestClient.postWithMsg<void>('/property/unit', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新单元
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function unitUpdate(data: UnitForm) {
|
||||
return requestClient.putWithMsg<void>('/property/unit', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单元
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function unitRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/unit/${id}`);
|
||||
}
|
114
apps/web-antd/src/api/property/unit/model.d.ts
vendored
Normal file
114
apps/web-antd/src/api/property/unit/model.d.ts
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface UnitVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
buildingCode: string;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
*/
|
||||
unitCode: string;
|
||||
|
||||
/**
|
||||
* 单元名称
|
||||
*/
|
||||
unitName: string;
|
||||
|
||||
/**
|
||||
* 单元层数
|
||||
*/
|
||||
floorCount: number;
|
||||
|
||||
/**
|
||||
* 单元户数
|
||||
*/
|
||||
householdCount: number;
|
||||
|
||||
/**
|
||||
* 楼梯数量
|
||||
*/
|
||||
stairCount: number;
|
||||
|
||||
}
|
||||
|
||||
export interface UnitForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
buildingCode?: string;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
*/
|
||||
unitCode?: string;
|
||||
|
||||
/**
|
||||
* 单元名称
|
||||
*/
|
||||
unitName?: string;
|
||||
|
||||
/**
|
||||
* 单元层数
|
||||
*/
|
||||
floorCount?: number;
|
||||
|
||||
/**
|
||||
* 单元户数
|
||||
*/
|
||||
householdCount?: number;
|
||||
|
||||
/**
|
||||
* 楼梯数量
|
||||
*/
|
||||
stairCount?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface UnitQuery extends PageQuery {
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
buildingCode?: string;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
*/
|
||||
unitCode?: string;
|
||||
|
||||
/**
|
||||
* 单元名称
|
||||
*/
|
||||
unitName?: string;
|
||||
|
||||
/**
|
||||
* 单元层数
|
||||
*/
|
||||
floorCount?: number;
|
||||
|
||||
/**
|
||||
* 单元户数
|
||||
*/
|
||||
householdCount?: number;
|
||||
|
||||
/**
|
||||
* 楼梯数量
|
||||
*/
|
||||
stairCount?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user