1、单元
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7m16s

2、房间
This commit is contained in:
2025-06-26 18:04:51 +08:00
parent e06f8861cc
commit 6f2e0be983
15 changed files with 2079 additions and 4 deletions

View 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}`);
}

View 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;
}