From 27c8277d717b34b55f3ea967027b53b067f77df3 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期四, 20 八月 2026 16:58:49 +0800
Subject: [PATCH] feat 功能变更
---
src/api/hrm/work-hour-statistics/index.ts | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/src/api/hrm/work-hour-statistics/index.ts b/src/api/hrm/work-hour-statistics/index.ts
new file mode 100644
index 0000000..dcd73c6
--- /dev/null
+++ b/src/api/hrm/work-hour-statistics/index.ts
@@ -0,0 +1,55 @@
+import { requestClient } from '#/api/request';
+
+export namespace HrmWorkHourStatisticsApi {
+ /** 鍛樺伐宸ユ椂锛堣�冨嫟鍙e緞锛� */
+ export interface EmployeeWorkHour {
+ userId?: number;
+ userName?: string;
+ deptId?: number;
+ deptName?: string;
+ workDays?: number; // 鍑哄嫟澶╂暟
+ workHours?: number; // 姝e父宸ユ椂锛堜汉鏃讹級
+ overtimeHours?: number; // 鍔犵彮宸ユ椂锛堜汉鏃讹級
+ }
+
+ /** 鐝粍宸ユ椂锛堟姤宸ュ彛寰勶級 */
+ export interface TeamWorkHour {
+ teamId?: number;
+ teamName?: string;
+ taskCount?: number; // 浠诲姟鏁�
+ totalDuration?: number; // 鎬荤敓浜ф椂闀匡紙浜烘棩锛�
+ workHours?: number; // 鎬诲伐鏃讹紙浜烘椂锛�
+ }
+
+ export interface EmployeeWorkHourReq {
+ userId?: number;
+ deptId?: number;
+ startDate?: string;
+ endDate?: string;
+ }
+
+ export interface TeamWorkHourReq {
+ startTime?: string;
+ endTime?: string;
+ }
+}
+
+/** 鍛樺伐宸ユ椂缁熻锛堣�冨嫟鍙e緞锛� */
+export function getEmployeeWorkHourSummary(
+ params: HrmWorkHourStatisticsApi.EmployeeWorkHourReq = {},
+) {
+ return requestClient.get<HrmWorkHourStatisticsApi.EmployeeWorkHour[]>(
+ '/hrm/work-hour-statistics/employee-summary',
+ { params },
+ );
+}
+
+/** 鐝粍宸ユ椂缁熻锛堟姤宸ュ彛寰勶紝璺ㄦā鍧楄仛鍚� MES锛� */
+export function getTeamWorkHourSummary(
+ params: HrmWorkHourStatisticsApi.TeamWorkHourReq = {},
+) {
+ return requestClient.get<HrmWorkHourStatisticsApi.TeamWorkHour[]>(
+ '/hrm/work-hour-statistics/team-summary',
+ { params },
+ );
+}
--
Gitblit v1.9.3