feat(property): 水电气管理页面

feat(sis): 楼层授权界面业务调整
This commit is contained in:
2025-07-17 16:20:01 +08:00
parent 2e491a3832
commit ae9bbbb17c
8 changed files with 975 additions and 99 deletions

View File

@@ -0,0 +1,61 @@
import type { MeterVO, MeterForm, MeterQuery } 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 meterList(params?: MeterQuery) {
return requestClient.get<PageResult<MeterVO>>('/property/meter/list', { params });
}
/**
* 导出水电气列表
* @param params
* @returns 水电气列表
*/
export function meterExport(params?: MeterQuery) {
return commonExport('/property/meter/export', params ?? {});
}
/**
* 查询水电气详情
* @param id id
* @returns 水电气详情
*/
export function meterInfo(id: ID) {
return requestClient.get<MeterVO>(`/property/meter/${id}`);
}
/**
* 新增水电气
* @param data
* @returns void
*/
export function meterAdd(data: MeterForm) {
return requestClient.postWithMsg<void>('/property/meter', data);
}
/**
* 更新水电气
* @param data
* @returns void
*/
export function meterUpdate(data: MeterForm) {
return requestClient.putWithMsg<void>('/property/meter', data);
}
/**
* 删除水电气
* @param id id
* @returns void
*/
export function meterRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/meter/${id}`);
}

View File

@@ -0,0 +1,229 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface MeterVO {
/**
* 主键id
*/
id: string | number;
/**
* 水表名称
*/
meterName: string;
/**
* 设备编码
*/
meterCode: string;
/**
* 设备厂商
*/
factoryNo: string;
/**
* 设备类型(1-电表2-水表3-气表)
*/
meterType: number;
/**
* 表用途(1-分表2-总表3-公摊表)
*/
meterPurpose: number;
/**
* 分摊类型1-不公摊2-按分表用量3-按租客面积4-按房源数量5-按固定比例)
*/
shareType: number;
/**
* 付费类型(1-先付费2-后付费)
*/
payType: number;
/**
* 当前表显示读数
*/
display: number;
/**
* 最大表显读数(超过归0)
*/
maxDisplay: number;
/**
* 计费倍率
*/
billingRate: number;
/**
* 剩余量
*/
surplus: number;
/**
* 通信状态
*/
communicationState: number;
/**
* 运行状态
*/
runningState: number;
/**
* 备注
*/
remark: string;
}
export interface MeterForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 水表名称
*/
meterName?: string;
/**
* 设备编码
*/
meterCode?: string;
/**
* 设备厂商
*/
factoryNo?: string;
/**
* 设备类型(1-电表2-水表3-气表)
*/
meterType?: number;
/**
* 表用途(1-分表2-总表3-公摊表)
*/
meterPurpose?: number;
/**
* 分摊类型1-不公摊2-按分表用量3-按租客面积4-按房源数量5-按固定比例)
*/
shareType?: number;
/**
* 付费类型(1-先付费2-后付费)
*/
payType?: number;
/**
* 当前表显示读数
*/
display?: number;
/**
* 最大表显读数(超过归0)
*/
maxDisplay?: number;
/**
* 计费倍率
*/
billingRate?: number;
/**
* 剩余量
*/
surplus?: number;
/**
* 通信状态
*/
communicationState?: number;
/**
* 运行状态
*/
runningState?: number;
/**
* 备注
*/
remark?: string;
}
export interface MeterQuery extends PageQuery {
/**
* 水表名称
*/
meterName?: string;
/**
* 设备编码
*/
meterCode?: string;
/**
* 设备厂商
*/
factoryNo?: string;
/**
* 设备类型(1-电表2-水表3-气表)
*/
meterType?: number;
/**
* 表用途(1-分表2-总表3-公摊表)
*/
meterPurpose?: number;
/**
* 分摊类型1-不公摊2-按分表用量3-按租客面积4-按房源数量5-按固定比例)
*/
shareType?: number;
/**
* 付费类型(1-先付费2-后付费)
*/
payType?: number;
/**
* 当前表显示读数
*/
display?: number;
/**
* 最大表显读数(超过归0)
*/
maxDisplay?: number;
/**
* 计费倍率
*/
billingRate?: number;
/**
* 剩余量
*/
surplus?: number;
/**
* 通信状态
*/
communicationState?: number;
/**
* 运行状态
*/
runningState?: number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -1,4 +1,4 @@
import type { ElevatorInfoVO, ElevatorInfoForm, ElevatorInfoQuery } from './model';
import type { ElevatorInfoVO, ElevatorInfoForm, ElevatorInfoQuery, ElevatorFloorRefForm, ElevatorFloorRefVo } from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
@@ -59,3 +59,22 @@ export function elevatorInfoUpdate(data: ElevatorInfoForm) {
export function elevatorInfoRemove(elevatorId: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/elevatorInfo/${elevatorId}`);
}
/**
* 新增电梯⇄楼层关联
* @param params
* @returns void
*/
export function refAdd(data: ElevatorFloorRefForm) {
return requestClient.postWithMsg<void>('/sis/elevatorInfo/ref/add', data);
}
/**
* 查询电梯⇄楼层关联
* @param id
* @returns void
*/
export function refQuery(id: ID) {
return requestClient.get<ElevatorFloorRefVo[]>(`/sis/elevatorInfo/ref/${id}`);
}

View File

@@ -1,100 +1,100 @@
import type { PageQuery, BaseEntity } from '#/api/common';
import type { PageQuery, BaseEntity } from '#/api/common'
export interface ElevatorInfoVO {
/**
*
*/
elevatorId: string | number;
elevatorId: string | number
/**
* 电梯编号
*/
elevatorCode: string;
elevatorCode: string
/**
* 电梯名称
*/
elevatorName: string;
elevatorName: string
/**
* 安装位置
*/
location: string;
location: string
/**
* 品牌
*/
brand: string;
brand: string
/**
* 型号
*/
model: string;
model: string
/**
* 生产日期
*/
manufactureDate: string;
manufactureDate: string
/**
* 安装日期
*/
installationDate: string;
installationDate: string
/**
* 最大载重(kg)
*/
maxLoad: number;
maxLoad: number
/**
* 服务楼层数
*/
floorsServed: number;
floorsServed: number
/**
* 维保公司
*/
maintenanceCompany: string;
maintenanceCompany: string
/**
* 维保电话
*/
maintenancePhone: string;
maintenancePhone: string
/**
* 上次年检日期
*/
lastInspectionDate: string;
lastInspectionDate: string
/**
* 下次年检日期
*/
nextInspectionDate: string;
nextInspectionDate: string
/**
* 梯控厂商
*/
controlFactory: string;
controlFactory: string
/**
* 梯控设备ip
*/
controlIp: string;
controlIp: string
/**
* 梯控设备编码
*/
controlPort: number;
controlPort: number
/**
* 梯控设备登录账号
*/
controlAccount: string;
controlAccount: string
/**
* 梯控设备登录密码
*/
controlPwd: string;
controlPwd: string
}
@@ -102,102 +102,102 @@ export interface ElevatorInfoForm extends BaseEntity {
/**
*
*/
elevatorId?: string | number;
elevatorId?: string | number
/**
* 电梯编号
*/
elevatorCode?: string;
elevatorCode?: string
/**
* 电梯名称
*/
elevatorName?: string;
elevatorName?: string
/**
* 安装位置
*/
location?: string;
location?: string
/**
* 品牌
*/
brand?: string;
brand?: string
/**
* 型号
*/
model?: string;
model?: string
/**
* 生产日期
*/
manufactureDate?: string;
manufactureDate?: string
/**
* 安装日期
*/
installationDate?: string;
installationDate?: string
/**
* 最大载重(kg)
*/
maxLoad?: number;
maxLoad?: number
/**
* 服务楼层数
*/
floorsServed?: number;
floorsServed?: number
/**
* 维保公司
*/
maintenanceCompany?: string;
maintenanceCompany?: string
/**
* 维保电话
*/
maintenancePhone?: string;
maintenancePhone?: string
/**
* 上次年检日期
*/
lastInspectionDate?: string;
lastInspectionDate?: string
/**
* 下次年检日期
*/
nextInspectionDate?: string;
nextInspectionDate?: string
/**
* 梯控厂商
*/
controlFactory?: string;
controlFactory?: string
/**
* 梯控设备ip
*/
controlIp?: string;
controlIp?: string
/**
* 梯控设备编码
*/
controlPort?: number;
controlPort?: number
/**
* 梯控设备登录账号
*/
controlAccount?: string;
controlAccount?: string
/**
* 梯控设备登录密码
*/
controlPwd?: string;
controlPwd?: string
/**
* 单元ID
*/
unitId?: number;
unitId?: number
}
@@ -205,95 +205,121 @@ export interface ElevatorInfoQuery extends PageQuery {
/**
* 电梯编号
*/
elevatorCode?: string;
elevatorCode?: string
/**
* 电梯名称
*/
elevatorName?: string;
elevatorName?: string
/**
* 安装位置
*/
location?: string;
location?: string
/**
* 品牌
*/
brand?: string;
brand?: string
/**
* 型号
*/
model?: string;
model?: string
/**
* 生产日期
*/
manufactureDate?: string;
manufactureDate?: string
/**
* 安装日期
*/
installationDate?: string;
installationDate?: string
/**
* 最大载重(kg)
*/
maxLoad?: number;
maxLoad?: number
/**
* 服务楼层数
*/
floorsServed?: number;
floorsServed?: number
/**
* 维保公司
*/
maintenanceCompany?: string;
maintenanceCompany?: string
/**
* 维保电话
*/
maintenancePhone?: string;
maintenancePhone?: string
/**
* 上次年检日期
*/
lastInspectionDate?: string;
lastInspectionDate?: string
/**
* 下次年检日期
*/
nextInspectionDate?: string;
nextInspectionDate?: string
/**
* 梯控厂商
*/
controlFactory?: string;
controlFactory?: string
/**
* 梯控设备ip
*/
controlIp?: string;
controlIp?: string
/**
* 梯控设备编码
*/
controlPort?: number;
controlPort?: number
/**
* 梯控设备登录账号
*/
controlAccount?: string;
controlAccount?: string
/**
* 梯控设备登录密码
*/
controlPwd?: string;
controlPwd?: string
/**
* 日期范围参数
*/
params?: any;
params?: any
}
export interface ElevatorFloorRefVo {
/**
*
*/
elevatorId: string | number
/**
* 楼层层数
*/
floorNum: string | number
}
export interface ElevatorFloorRefForm extends BaseEntity {
/**
* 电梯id
*/
elevatorId?: string | number
/**
* 楼层层数
*/
floorNums?: [number]
}