2025-06-18 11:03:42 +08:00
|
|
|
import type { BuildingVO, BuildingForm, BuildingQuery } from './model';
|
2025-06-28 02:41:09 +08:00
|
|
|
|
2025-06-18 11:03:42 +08:00
|
|
|
import type { ID, IDS } from '#/api/common';
|
|
|
|
import type { PageResult } from '#/api/common';
|
2025-06-28 02:41:09 +08:00
|
|
|
|
2025-06-18 11:03:42 +08:00
|
|
|
import { commonExport } from '#/api/helper';
|
|
|
|
import { requestClient } from '#/api/request';
|
|
|
|
|
|
|
|
/**
|
2025-06-28 02:41:09 +08:00
|
|
|
* 查询建筑列表
|
2025-06-18 11:03:42 +08:00
|
|
|
* @param params
|
2025-06-28 02:41:09 +08:00
|
|
|
* @returns 建筑列表
|
2025-06-18 11:03:42 +08:00
|
|
|
*/
|
|
|
|
export function buildingList(params?: BuildingQuery) {
|
|
|
|
return requestClient.get<PageResult<BuildingVO>>('/property/building/list', { params });
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2025-06-28 02:41:09 +08:00
|
|
|
* 导出建筑列表
|
2025-06-18 11:03:42 +08:00
|
|
|
* @param params
|
2025-06-28 02:41:09 +08:00
|
|
|
* @returns 建筑列表
|
2025-06-18 11:03:42 +08:00
|
|
|
*/
|
|
|
|
export function buildingExport(params?: BuildingQuery) {
|
|
|
|
return commonExport('/property/building/export', params ?? {});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2025-06-28 02:41:09 +08:00
|
|
|
* 查询建筑详情
|
2025-06-18 11:03:42 +08:00
|
|
|
* @param id id
|
2025-06-28 02:41:09 +08:00
|
|
|
* @returns 建筑详情
|
2025-06-18 11:03:42 +08:00
|
|
|
*/
|
|
|
|
export function buildingInfo(id: ID) {
|
|
|
|
return requestClient.get<BuildingVO>(`/property/building/${id}`);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2025-06-28 02:41:09 +08:00
|
|
|
* 新增建筑
|
2025-06-18 11:03:42 +08:00
|
|
|
* @param data
|
|
|
|
* @returns void
|
|
|
|
*/
|
|
|
|
export function buildingAdd(data: BuildingForm) {
|
|
|
|
return requestClient.postWithMsg<void>('/property/building', data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2025-06-28 02:41:09 +08:00
|
|
|
* 更新建筑
|
2025-06-18 11:03:42 +08:00
|
|
|
* @param data
|
|
|
|
* @returns void
|
|
|
|
*/
|
|
|
|
export function buildingUpdate(data: BuildingForm) {
|
|
|
|
return requestClient.putWithMsg<void>('/property/building', data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2025-06-28 02:41:09 +08:00
|
|
|
* 删除建筑
|
2025-06-18 11:03:42 +08:00
|
|
|
* @param id id
|
|
|
|
* @returns void
|
|
|
|
*/
|
|
|
|
export function buildingRemove(id: ID | IDS) {
|
|
|
|
return requestClient.deleteWithMsg<void>(`/property/building/${id}`);
|
|
|
|
}
|