From 5fdc7ac73e3fe40362cc335f965963cdd88832e8 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Thu, 9 Oct 2025 14:35:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(dms):=20=E6=96=B0=E5=A2=9E=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=95=88=E7=8E=87=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dms/dmsReportDeviceEfficiency/index.ts | 77 +++ .../dms/dmsReportDeviceEfficiency/types.ts | 356 ++++++++++++ .../dms/dmsReportDeviceEfficiency/index.vue | 520 ++++++++++++++++++ 3 files changed, 953 insertions(+) create mode 100644 src/api/dms/dmsReportDeviceEfficiency/index.ts create mode 100644 src/api/dms/dmsReportDeviceEfficiency/types.ts create mode 100644 src/views/dms/dmsReportDeviceEfficiency/index.vue diff --git a/src/api/dms/dmsReportDeviceEfficiency/index.ts b/src/api/dms/dmsReportDeviceEfficiency/index.ts new file mode 100644 index 0000000..16541ae --- /dev/null +++ b/src/api/dms/dmsReportDeviceEfficiency/index.ts @@ -0,0 +1,77 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { DmsReportDeviceEfficiencyVO, DmsReportDeviceEfficiencyForm, DmsReportDeviceEfficiencyQuery } from '@/api/dms/dmsReportDeviceEfficiency/types'; + +/** + * 查询设备效率报列表 + * @param query + * @returns {*} + */ + +export const listDmsReportDeviceEfficiency = (query?: DmsReportDeviceEfficiencyQuery): AxiosPromise => { + return request({ + url: '/dms/dmsReportDeviceEfficiency/list', + method: 'get', + params: query + }); +}; + +/** + * 查询设备效率报详细 + * @param reportId + */ +export const getDmsReportDeviceEfficiency = (reportId: string | number): AxiosPromise => { + return request({ + url: '/dms/dmsReportDeviceEfficiency/' + reportId, + method: 'get' + }); +}; + +/** + * 新增设备效率报 + * @param data + */ +export const addDmsReportDeviceEfficiency = (data: DmsReportDeviceEfficiencyForm) => { + return request({ + url: '/dms/dmsReportDeviceEfficiency', + method: 'post', + data: data + }); +}; + +/** + * 修改设备效率报 + * @param data + */ +export const updateDmsReportDeviceEfficiency = (data: DmsReportDeviceEfficiencyForm) => { + return request({ + url: '/dms/dmsReportDeviceEfficiency', + method: 'put', + data: data + }); +}; + +/** + * 删除设备效率报 + * @param reportId + */ +export const delDmsReportDeviceEfficiency = (reportId: string | number | Array) => { + return request({ + url: '/dms/dmsReportDeviceEfficiency/' + reportId, + method: 'delete' + }); +}; + + +/** + * 下拉框查询设备效率报列表 + * @param query + * @returns {*} + */ +export function getDmsReportDeviceEfficiencyList (query) { + return request({ + url: '/dms/dmsReportDeviceEfficiency/getDmsReportDeviceEfficiencyList', + method: 'get', + params: query + }); +}; diff --git a/src/api/dms/dmsReportDeviceEfficiency/types.ts b/src/api/dms/dmsReportDeviceEfficiency/types.ts new file mode 100644 index 0000000..bf27424 --- /dev/null +++ b/src/api/dms/dmsReportDeviceEfficiency/types.ts @@ -0,0 +1,356 @@ +export interface DmsReportDeviceEfficiencyVO { + /** + * 主键标识 + */ + reportId: string | number; + + /** + * 统计日期 + */ + statDate: string; + + /** + * 车间ID,关联prod_base_workshop_info.workshop_id + */ + workshopId: string | number; + + /** + * 班组ID,关联base_class_team_info.class_team_id + */ + classTeamId: string | number; + + /** + * 班次ID,关联base_shift_info.shift_id + */ + shiftId: string | number; + + /** + * 设备ID,关联prod_base_machine_info.machine_id + */ + machineId: string | number; + + /** + * 车间名称(存储过程写入,查询免关联) + */ + workshopName: string; + + /** + * 班组名称(存储过程写入,查询免关联) + */ + classTeamName: string; + + /** + * 班次名称(存储过程写入,查询免关联) + */ + shiftName: string; + + /** + * 设备名称(存储过程写入,查询免关联) + */ + machineName: string; + + /** + * 产量(件) + */ + outputQty: number; + + /** + * 工序标准机时(小时/件) + */ + processStdMachineHours: number; + + /** + * 调试时间(小时) + */ + debugHours: number; + + /** + * 运行时长(小时) + */ + runHours: number; + + /** + * 待机时长(小时) + */ + standbyHours: number; + + /** + * 故障时长(小时) + */ + faultHours: number; + + /** + * 关机时长(小时) + */ + shutdownHours: number; + + /** + * 产出机时(小时)= 产量 × 工序标准机时 + */ + outputMachineHours: number; + + /** + * 合计时长(小时)= 运行时长 + 待机时长 + 故障时长 + */ + totalHours: number; + + /** + * 开机率 = (运行时长 + 调试时间) / 合计时长 + */ + uptimeRate: number; + + /** + * 综合效率 = 产出机时 / (运行+待机+故障+关机+调试) + */ + overallEfficiency: number; + + /** + * 运行效率 = 产出机时 / 运行时长 + */ + runtimeEfficiency: number; + + /** + * 备注 + */ + remark: string; + +} + +export interface DmsReportDeviceEfficiencyForm extends BaseEntity { + /** + * 主键标识 + */ + reportId?: string | number; + + /** + * 统计日期 + */ + statDate?: string; + + /** + * 车间ID,关联prod_base_workshop_info.workshop_id + */ + workshopId?: string | number; + + /** + * 班组ID,关联base_class_team_info.class_team_id + */ + classTeamId?: string | number; + + /** + * 班次ID,关联base_shift_info.shift_id + */ + shiftId?: string | number; + + /** + * 设备ID,关联prod_base_machine_info.machine_id + */ + machineId?: string | number; + + /** + * 车间名称(存储过程写入,查询免关联) + */ + workshopName?: string; + + /** + * 班组名称(存储过程写入,查询免关联) + */ + classTeamName?: string; + + /** + * 班次名称(存储过程写入,查询免关联) + */ + shiftName?: string; + + /** + * 设备名称(存储过程写入,查询免关联) + */ + machineName?: string; + + /** + * 产量(件) + */ + outputQty?: number; + + /** + * 工序标准机时(小时/件) + */ + processStdMachineHours?: number; + + /** + * 调试时间(小时) + */ + debugHours?: number; + + /** + * 运行时长(小时) + */ + runHours?: number; + + /** + * 待机时长(小时) + */ + standbyHours?: number; + + /** + * 故障时长(小时) + */ + faultHours?: number; + + /** + * 关机时长(小时) + */ + shutdownHours?: number; + + /** + * 产出机时(小时)= 产量 × 工序标准机时 + */ + outputMachineHours?: number; + + /** + * 合计时长(小时)= 运行时长 + 待机时长 + 故障时长 + */ + totalHours?: number; + + /** + * 开机率 = (运行时长 + 调试时间) / 合计时长 + */ + uptimeRate?: number; + + /** + * 综合效率 = 产出机时 / (运行+待机+故障+关机+调试) + */ + overallEfficiency?: number; + + /** + * 运行效率 = 产出机时 / 运行时长 + */ + runtimeEfficiency?: number; + + /** + * 备注 + */ + remark?: string; + +} + +export interface DmsReportDeviceEfficiencyQuery extends PageQuery { + + /** + * 主键标识 + */ + reportId?: string | number; + + /** + * 统计日期 + */ + statDate?: string; + + /** + * 车间ID,关联prod_base_workshop_info.workshop_id + */ + workshopId?: string | number; + + /** + * 班组ID,关联base_class_team_info.class_team_id + */ + classTeamId?: string | number; + + /** + * 班次ID,关联base_shift_info.shift_id + */ + shiftId?: string | number; + + /** + * 设备ID,关联prod_base_machine_info.machine_id + */ + machineId?: string | number; + + /** + * 车间名称(存储过程写入,查询免关联) + */ + workshopName?: string; + + /** + * 班组名称(存储过程写入,查询免关联) + */ + classTeamName?: string; + + /** + * 班次名称(存储过程写入,查询免关联) + */ + shiftName?: string; + + /** + * 设备名称(存储过程写入,查询免关联) + */ + machineName?: string; + + /** + * 产量(件) + */ + outputQty?: number; + + /** + * 工序标准机时(小时/件) + */ + processStdMachineHours?: number; + + /** + * 调试时间(小时) + */ + debugHours?: number; + + /** + * 运行时长(小时) + */ + runHours?: number; + + /** + * 待机时长(小时) + */ + standbyHours?: number; + + /** + * 故障时长(小时) + */ + faultHours?: number; + + /** + * 关机时长(小时) + */ + shutdownHours?: number; + + /** + * 产出机时(小时)= 产量 × 工序标准机时 + */ + outputMachineHours?: number; + + /** + * 合计时长(小时)= 运行时长 + 待机时长 + 故障时长 + */ + totalHours?: number; + + /** + * 开机率 = (运行时长 + 调试时间) / 合计时长 + */ + uptimeRate?: number; + + /** + * 综合效率 = 产出机时 / (运行+待机+故障+关机+调试) + */ + overallEfficiency?: number; + + /** + * 运行效率 = 产出机时 / 运行时长 + */ + runtimeEfficiency?: number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/views/dms/dmsReportDeviceEfficiency/index.vue b/src/views/dms/dmsReportDeviceEfficiency/index.vue new file mode 100644 index 0000000..e508d00 --- /dev/null +++ b/src/views/dms/dmsReportDeviceEfficiency/index.vue @@ -0,0 +1,520 @@ + + + + +