From f3cac4aa2db56d6017c1d1dc035bcfeaec76c3e2 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 05 十一月 2026 18:31:13 +0800
Subject: [PATCH] feat(crm): 投标保证金迁移到销售管理并接入销售台账
---
src/api/hrm/statistics/index.ts | 66 +++++++++++++++++++++++++++++++++
1 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/src/api/hrm/statistics/index.ts b/src/api/hrm/statistics/index.ts
new file mode 100644
index 0000000..3e546c0
--- /dev/null
+++ b/src/api/hrm/statistics/index.ts
@@ -0,0 +1,66 @@
+import { requestClient } from '#/api/request';
+
+export namespace HrmStatisticsApi {
+ /** 鍒嗗竷椤� */
+ export interface Item {
+ name: string;
+ value: number;
+ }
+
+ /** 閮ㄩ棬宸ラ緞缁熻 */
+ export interface DeptTenure {
+ deptId?: number;
+ deptName: string;
+ count: number;
+ averageTenureYears: number;
+ }
+
+ /** 鍛樺伐宸ラ緞鏄庣粏 */
+ export interface TenureEmployee {
+ id: number;
+ name: string;
+ deptName: string;
+ hireDate: string;
+ tenureYears: number;
+ }
+
+ /** 鍏ヨ亴 / 绂昏亴瓒嬪娍椤� */
+ export interface Trend {
+ month: string; // yyyy-MM
+ hireCount: number; // 鍏ヨ亴浜烘暟
+ resignCount: number; // 绂昏亴浜烘暟
+ }
+
+ /** 鍛樺伐浜哄姏缁熻 */
+ export interface EmployeeStatistics {
+ totalCount: number; // 鍦ㄥ矖浜烘暟锛堝湪鑱� + 璇曠敤锛�
+ activeCount: number; // 鍦ㄨ亴浜烘暟
+ probationCount: number; // 璇曠敤浜烘暟
+ resignedCount: number; // 绂昏亴浜烘暟
+ averageTenureYears: number; // 骞冲潎宸ラ緞锛堝勾锛�
+ averageAge: number; // 骞冲潎骞撮緞锛堝瞾锛�
+ thisYearHireCount: number; // 鏈勾鍏ヨ亴浜烘暟
+ thisYearResignCount: number; // 鏈勾绂昏亴浜烘暟
+ tenureDistribution: Item[]; // 宸ラ緞鍒嗗竷
+ ageDistribution: Item[]; // 骞撮緞鍒嗗竷
+ educationDistribution: Item[]; // 瀛﹀巻鍒嗗竷
+ genderDistribution: Item[]; // 鎬у埆鍒嗗竷
+ statusDistribution: Item[]; // 浜哄憳鐘舵�佹瀯鎴愶紙鍦ㄨ亴 / 璇曠敤 / 绂昏亴锛�
+ deptDistribution: Item[]; // 閮ㄩ棬浜烘暟鍒嗗竷
+ postDistribution: Item[]; // 宀椾綅鍒嗗竷
+ marriageDistribution: Item[]; // 濠氬Щ鐘跺喌鍒嗗竷
+ politicalDistribution: Item[]; // 鏀挎不闈㈣矊鍒嗗竷
+ hireResignTrend: Trend[]; // 杩� 12 涓湀鍏ヨ亴 / 绂昏亴瓒嬪娍
+ contractWarning: Item[]; // 鍚堝悓鍒版湡棰勮
+ noContractCount: number; // 鍦ㄥ矖鏈鏈夋晥鍚堝悓浜烘暟
+ deptTenureList: DeptTenure[]; // 閮ㄩ棬宸ラ緞缁熻
+ topTenureEmployees: TenureEmployee[]; // 宸ラ緞鎺掕
+ }
+}
+
+/** 鑾峰緱鍛樺伐浜哄姏缁熻 */
+export function getTenureStatistics() {
+ return requestClient.get<HrmStatisticsApi.EmployeeStatistics>(
+ '/hrm/employee/tenure-statistics',
+ );
+}
--
Gitblit v1.9.3