feat(property): 添加灯控开关信息管理功能
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 9m42s

This commit is contained in:
2025-08-19 18:04:22 +08:00
parent 36f93721ad
commit c090779319
6 changed files with 600 additions and 1 deletions

View File

@@ -0,0 +1,61 @@
import type { LightInfoVO, LightInfoForm, LightInfoQuery } 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 lightInfoList(params?: LightInfoQuery) {
return requestClient.get<PageResult<LightInfoVO>>('/property/lightInfo/list', { params });
}
/**
* 导出灯控开关信息列表
* @param params
* @returns 灯控开关信息列表
*/
export function lightInfoExport(params?: LightInfoQuery) {
return commonExport('/property/lightInfo/export', params ?? {});
}
/**
* 查询灯控开关信息详情
* @param id id
* @returns 灯控开关信息详情
*/
export function lightInfoInfo(id: ID) {
return requestClient.get<LightInfoVO>(`/property/lightInfo/${id}`);
}
/**
* 新增灯控开关信息
* @param data
* @returns void
*/
export function lightInfoAdd(data: LightInfoForm) {
return requestClient.postWithMsg<void>('/property/lightInfo', data);
}
/**
* 更新灯控开关信息
* @param data
* @returns void
*/
export function lightInfoUpdate(data: LightInfoForm) {
return requestClient.putWithMsg<void>('/property/lightInfo', data);
}
/**
* 删除灯控开关信息
* @param id id
* @returns void
*/
export function lightInfoRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/lightInfo/${id}`);
}

View File

@@ -0,0 +1,134 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface LightInfoVO {
/**
* 主键id
*/
id: string | number;
/**
* 位置描述
*/
locationRemark: string;
/**
* 开关状态01
*/
isOn: number;
/**
* 灯控模块编码
*/
code: number;
/**
* 园区编码
*/
communityId: string | number;
/**
* 建筑名称
*/
buildingId: string | number;
/**
* 单元编码
*/
unitId: string | number;
/**
* 所属楼层ID
*/
floorId: string | number;
/**
* 楼层
*/
floorName: string;
}
export interface LightInfoForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 位置描述
*/
locationRemark?: string;
/**
* 开关状态01
*/
isOn?: number;
/**
* 灯控模块编码
*/
code?: number;
/**
* 园区编码
*/
communityId?: string | number;
/**
* 建筑名称
*/
buildingId?: string | number;
/**
* 单元编码
*/
unitId?: string | number;
/**
* 所属楼层ID
*/
floorId?: string | number;
}
export interface LightInfoQuery extends PageQuery {
/**
* 位置描述
*/
locationRemark?: string;
/**
* 开关状态01
*/
isOn?: number;
/**
* 灯控模块编码
*/
code?: number;
/**
* 园区编码
*/
communityId?: string | number;
/**
* 建筑名称
*/
buildingId?: string | number;
/**
* 单元编码
*/
unitId?: string | number;
/**
* 所属楼层ID
*/
floorId?: string | number;
/**
* 日期范围参数
*/
params?: any;
}