Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-07-16 21:59:03 +08:00
30 changed files with 3453 additions and 109 deletions

View File

@@ -26,6 +26,16 @@ export interface DeviceLocationVO {
*/
searchValue: string;
/**
* 位置类型
*/
locationObjName: string;
/**
* 搜索值
*/
remark: string;
}
export interface DeviceLocationForm extends BaseEntity {

View File

@@ -0,0 +1,61 @@
import type { MachineVO, MachineForm, MachineQuery } 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 machineList(params?: MachineQuery) {
return requestClient.get<PageResult<MachineVO>>('/property/machine/list', { params });
}
/**
* 导出设备列表列表
* @param params
* @returns 设备列表列表
*/
export function machineExport(params?: MachineQuery) {
return commonExport('/property/machine/export', params ?? {});
}
/**
* 查询设备列表详情
* @param id id
* @returns 设备列表详情
*/
export function machineInfo(id: ID) {
return requestClient.get<MachineVO>(`/property/machine/${id}`);
}
/**
* 新增设备列表
* @param data
* @returns void
*/
export function machineAdd(data: MachineForm) {
return requestClient.postWithMsg<void>('/property/machine', data);
}
/**
* 更新设备列表
* @param data
* @returns void
*/
export function machineUpdate(data: MachineForm) {
return requestClient.putWithMsg<void>('/property/machine', data);
}
/**
* 删除设备列表
* @param id id
* @returns void
*/
export function machineRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/machine/${id}`);
}

View File

@@ -0,0 +1,204 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface MachineVO {
/**
* 主键
*/
id: string | number;
/**
* 设备名称
*/
machineName: string;
/**
* 设备编码
*/
machineCode: string;
/**
* 设备品牌
*/
machineBrand: string;
/**
* 设备类型
*/
machineTypeId: string | number;
/**
* 位置详情
*/
locationId: string | number;
/**
* 采购价格
*/
purchasePrice: number;
/**
* 启用时间
*/
activationTime: string;
/**
* 保修截至时间
*/
deadline: string;
/**
* 使用年限(年)
*/
serviceLife: number;
/**
* 保修周期
*/
maintenanceCycle: string;
/**
* 使用状态
*/
state: string;
/**
* 责任人
*/
personId: string | number;
}
export interface MachineForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 设备名称
*/
machineName?: string;
/**
* 设备编码
*/
machineCode?: string;
/**
* 设备品牌
*/
machineBrand?: string;
/**
* 设备类型
*/
machineTypeId?: string | number;
/**
* 位置详情
*/
locationId?: string | number;
/**
* 采购价格
*/
purchasePrice?: number;
/**
* 启用时间
*/
activationTime?: string;
/**
* 保修截至时间
*/
deadline?: string;
/**
* 使用年限(年)
*/
serviceLife?: number;
/**
* 保修周期
*/
maintenanceCycle?: string;
/**
* 使用状态
*/
state?: string;
/**
* 责任人
*/
personId?: string | number;
}
export interface MachineQuery extends PageQuery {
/**
* 设备名称
*/
machineName?: string;
/**
* 设备编码
*/
machineCode?: string;
/**
* 设备品牌
*/
machineBrand?: string;
/**
* 设备类型
*/
machineTypeId?: string | number;
/**
* 位置详情
*/
locationId?: string | number;
/**
* 采购价格
*/
purchasePrice?: number;
/**
* 启用时间
*/
activationTime?: string;
/**
* 保修截至时间
*/
deadline?: string;
/**
* 使用年限(年)
*/
serviceLife?: number;
/**
* 保修周期
*/
maintenanceCycle?: string;
/**
* 使用状态
*/
state?: string;
/**
* 责任人
*/
personId?: string | number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -0,0 +1,61 @@
import type { MaintainPlanVO, MaintainPlanForm, MaintainPlanQuery } 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 maintainPlanList(params?: MaintainPlanQuery) {
return requestClient.get<PageResult<MaintainPlanVO>>('/property/maintainPlan/list', { params });
}
/**
* 导出保养计划列表
* @param params
* @returns 保养计划列表
*/
export function maintainPlanExport(params?: MaintainPlanQuery) {
return commonExport('/property/maintainPlan/export', params ?? {});
}
/**
* 查询保养计划详情
* @param id id
* @returns 保养计划详情
*/
export function maintainPlanInfo(id: ID) {
return requestClient.get<MaintainPlanVO>(`/property/maintainPlan/${id}`);
}
/**
* 新增保养计划
* @param data
* @returns void
*/
export function maintainPlanAdd(data: MaintainPlanForm) {
return requestClient.postWithMsg<void>('/property/maintainPlan', data);
}
/**
* 更新保养计划
* @param data
* @returns void
*/
export function maintainPlanUpdate(data: MaintainPlanForm) {
return requestClient.putWithMsg<void>('/property/maintainPlan', data);
}
/**
* 删除保养计划
* @param id id
* @returns void
*/
export function maintainPlanRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/maintainPlan/${id}`);
}

View File

@@ -0,0 +1,174 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface MaintainPlanVO {
/**
* 主键
*/
id: string | number;
/**
* 计划名称
*/
planName: string;
/**
* 计划编号
*/
planNo: string;
/**
* 保养周期(1月/天2.固定天)
*/
planPeriod: string;
/**
* 保养设备类型id
*/
machineTypeId: string | number;
/**
* 保养天
*/
maintainDay: string;
/**
* 保养月
*/
maintainMonth: string;
/**
* 固定天
*/
maintainEveryday: string;
/**
* 开始时间
*/
startDate: string;
/**
* 结束时间
*/
endDate: string;
/**
* 状态(0启用,1停用)
*/
state: string;
}
export interface MaintainPlanForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 计划名称
*/
planName?: string;
/**
* 计划编号
*/
planNo?: string;
/**
* 保养周期(1月/天2.固定天)
*/
planPeriod?: string;
/**
* 保养设备类型id
*/
machineTypeId?: string | number;
/**
* 保养天
*/
maintainDay?: string;
/**
* 保养月
*/
maintainMonth?: string;
/**
* 固定天
*/
maintainEveryday?: string;
/**
* 开始时间
*/
startDate?: string;
/**
* 结束时间
*/
endDate?: string;
/**
* 状态(0启用,1停用)
*/
state?: string;
}
export interface MaintainPlanQuery extends PageQuery {
/**
* 计划名称
*/
planName?: string;
/**
* 计划编号
*/
planNo?: string;
/**
* 保养周期(1月/天2.固定天)
*/
planPeriod?: string;
/**
* 保养设备类型id
*/
machineTypeId?: string | number;
/**
* 保养天
*/
maintainDay?: string;
/**
* 保养月
*/
maintainMonth?: string;
/**
* 固定天
*/
maintainEveryday?: string;
/**
* 开始时间
*/
startDate?: string;
/**
* 结束时间
*/
endDate?: string;
/**
* 状态(0启用,1停用)
*/
state?: string;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -0,0 +1,68 @@
import type { MachineTypeVO, MachineTypeForm, MachineTypeQuery,MachineTypeTree } 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 machineTypeList(params?: MachineTypeQuery) {
return requestClient.get<PageResult<MachineTypeVO>>('/property/machineType/list', { params });
}
/**
* 查询设备类型树
* @param params
* @returns 设备类型树
*/
export function getMachineTypeTree() {
return requestClient.get<MachineTypeTree[]>('/property/machineType/typeTree');
}
/**
* 导出设备类型列表
* @param params
* @returns 设备类型列表
*/
export function machineTypeExport(params?: MachineTypeQuery) {
return commonExport('/property/machineType/export', params ?? {});
}
/**
* 查询设备类型详情
* @param id id
* @returns 设备类型详情
*/
export function machineTypeInfo(id: ID) {
return requestClient.get<MachineTypeVO>(`/property/machineType/${id}`);
}
/**
* 新增设备类型
* @param data
* @returns void
*/
export function machineTypeAdd(data: MachineTypeForm) {
return requestClient.postWithMsg<void>('/property/machineType', data);
}
/**
* 更新设备类型
* @param data
* @returns void
*/
export function machineTypeUpdate(data: MachineTypeForm) {
return requestClient.putWithMsg<void>('/property/machineType', data);
}
/**
* 删除设备类型
* @param id id
* @returns void
*/
export function machineTypeRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/machineType/${id}`);
}

View File

@@ -0,0 +1,130 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface MachineTypeVO {
/**
* 主键
*/
id: string | number;
/**
* 类型名称
*/
machineTypeName: string;
/**
* 类型编号
*/
machineTypeCode: string;
/**
* 上级类型
*/
parentTypeId: string | number;
/**
* 是否启用
*/
isEnable: string;
/**
* 备注
*/
remark: string;
/**
* 搜索值
*/
searchValue: string;
}
export interface MachineTypeForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 类型名称
*/
machineTypeName?: string;
/**
* 类型编号
*/
machineTypeCode?: string;
/**
* 上级类型
*/
parentTypeId?: string | number;
/**
* 是否启用
*/
isEnable?: string;
/**
* 备注
*/
remark?: string;
/**
* 搜索值
*/
searchValue?: string;
}
export interface MachineTypeQuery extends PageQuery {
/**
* 类型名称
*/
machineTypeName?: string;
/**
* 类型编号
*/
machineTypeCode?: string;
/**
* 上级类型
*/
parentTypeId?: string | number;
/**
* 是否启用
*/
isEnable?: string;
/**
* 搜索值
*/
searchValue?: string;
/**
* 日期范围参数
*/
params?: any;
}
/**
* @description: 设备类型树
*/
export interface MachineTypeTree {
id: number;
/**
* antd组件必须要这个属性 实际是没有这个属性的
*/
key: string;
parentId: number;
label: string;
weight: number;
children?: MachineTypeTree[];
}
export interface MachineTypeTreeData {
id: number;
label: string;
children?: MachineTypeTreeData[];
}

View File

@@ -0,0 +1,61 @@
import type { MaintainTaskDetailVO, MaintainTaskDetailForm, MaintainTaskDetailQuery } 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 maintainTaskDetailList(params?: MaintainTaskDetailQuery) {
return requestClient.get<PageResult<MaintainTaskDetailVO>>('/property/maintainTaskDetail/list', { params });
}
/**
* 导出保养明细列表
* @param params
* @returns 保养明细列表
*/
export function maintainTaskDetailExport(params?: MaintainTaskDetailQuery) {
return commonExport('/property/maintainTaskDetail/export', params ?? {});
}
/**
* 查询保养明细详情
* @param id id
* @returns 保养明细详情
*/
export function maintainTaskDetailInfo(id: ID) {
return requestClient.get<MaintainTaskDetailVO>(`/property/maintainTaskDetail/${id}`);
}
/**
* 新增保养明细
* @param data
* @returns void
*/
export function maintainTaskDetailAdd(data: MaintainTaskDetailForm) {
return requestClient.postWithMsg<void>('/property/maintainTaskDetail', data);
}
/**
* 更新保养明细
* @param data
* @returns void
*/
export function maintainTaskDetailUpdate(data: MaintainTaskDetailForm) {
return requestClient.putWithMsg<void>('/property/maintainTaskDetail', data);
}
/**
* 删除保养明细
* @param id id
* @returns void
*/
export function maintainTaskDetailRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/maintainTaskDetail/${id}`);
}

View File

@@ -0,0 +1,114 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface MaintainTaskDetailVO {
/**
* 主键
*/
id: string | number;
/**
* 任务id
*/
taskId: string | number;
/**
* 位置编号
*/
machineId: string | number;
/**
* 保养情况
*/
sendFlag: string;
/**
* 排序
*/
sortNumber: number;
/**
* 状态(0未开始,1已完成)
*/
state: string;
/**
* 搜索值
*/
searchValue: string;
}
export interface MaintainTaskDetailForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 任务id
*/
taskId?: string | number;
/**
* 位置编号
*/
machineId?: string | number;
/**
* 保养情况
*/
sendFlag?: string;
/**
* 排序
*/
sortNumber?: number;
/**
* 状态(0未开始,1已完成)
*/
state?: string;
/**
* 搜索值
*/
searchValue?: string;
}
export interface MaintainTaskDetailQuery extends PageQuery {
/**
* 任务id
*/
taskId?: string | number;
/**
* 位置编号
*/
machineId?: string | number;
/**
* 保养情况
*/
sendFlag?: string;
/**
* 排序
*/
sortNumber?: number;
/**
* 状态(0未开始,1已完成)
*/
state?: string;
/**
* 搜索值
*/
searchValue?: string;
/**
* 日期范围参数
*/
params?: any;
}