gaoluyang
3 天以前 d39e4f7d839167c16425086dfa2f8747bccfdff9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
package cn.iocoder.yudao.module.hrm.controller.admin.employee.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
 
import java.time.LocalDate;
import java.util.List;
 
@Schema(description = "管理后台 - 员工人力统计 Response VO")
@Data
public class HrmEmployeeStatisticsRespVO {
 
    @Schema(description = "在岗人数(在职 + 试用)", example = "128")
    private Integer totalCount;
 
    @Schema(description = "在职人数", example = "120")
    private Integer activeCount;
 
    @Schema(description = "试用人数", example = "8")
    private Integer probationCount;
 
    @Schema(description = "离职人数", example = "15")
    private Integer resignedCount;
 
    @Schema(description = "在岗员工平均工龄(年,保留 1 位小数)", example = "3.5")
    private Double averageTenureYears;
 
    @Schema(description = "在岗员工平均年龄(岁,保留 1 位小数)", example = "31.2")
    private Double averageAge;
 
    @Schema(description = "本年入职人数", example = "12")
    private Integer thisYearHireCount;
 
    @Schema(description = "本年离职人数", example = "4")
    private Integer thisYearResignCount;
 
    @Schema(description = "工龄分布(固定区间,含 0 人的区间)")
    private List<ItemVO> tenureDistribution;
 
    @Schema(description = "年龄分布(固定区间,含 0 人的区间)")
    private List<ItemVO> ageDistribution;
 
    @Schema(description = "学历分布")
    private List<ItemVO> educationDistribution;
 
    @Schema(description = "性别分布")
    private List<ItemVO> genderDistribution;
 
    @Schema(description = "人员状态构成(在职 / 试用 / 离职)")
    private List<ItemVO> statusDistribution;
 
    @Schema(description = "部门人数分布,按人数倒序")
    private List<ItemVO> deptDistribution;
 
    @Schema(description = "岗位分布,按人数倒序")
    private List<ItemVO> postDistribution;
 
    @Schema(description = "婚姻状况分布")
    private List<ItemVO> marriageDistribution;
 
    @Schema(description = "政治面貌分布")
    private List<ItemVO> politicalDistribution;
 
    @Schema(description = "近 12 个月入职 / 离职趋势,按月份升序")
    private List<TrendVO> hireResignTrend;
 
    @Schema(description = "合同到期预警(已到期 / 30天内 / 31-90天 / 90天以上 / 无固定期限)")
    private List<ItemVO> contractWarning;
 
    @Schema(description = "在岗未签有效合同人数", example = "3")
    private Integer noContractCount;
 
    @Schema(description = "各部门工龄统计,按平均工龄倒序")
    private List<DeptTenureVO> deptTenureList;
 
    @Schema(description = "在职员工工龄排行(工龄最长的前 10 名)")
    private List<TenureEmployeeVO> topTenureEmployees;
 
    @Schema(description = "分布项")
    @Data
    public static class ItemVO {
 
        @Schema(description = "名称", example = "3-5年")
        private String name;
 
        @Schema(description = "人数", example = "30")
        private Integer value;
 
        public ItemVO() {
        }
 
        public ItemVO(String name, Integer value) {
            this.name = name;
            this.value = value;
        }
 
    }
 
    @Schema(description = "部门工龄统计")
    @Data
    public static class DeptTenureVO {
 
        @Schema(description = "部门编号")
        private Long deptId;
 
        @Schema(description = "部门名称", example = "研发部")
        private String deptName;
 
        @Schema(description = "部门在岗人数", example = "20")
        private Integer count;
 
        @Schema(description = "部门平均工龄(年,保留 1 位小数)", example = "4.2")
        private Double averageTenureYears;
 
    }
 
    @Schema(description = "入职 / 离职趋势项")
    @Data
    public static class TrendVO {
 
        @Schema(description = "月份,格式 yyyy-MM", example = "2026-11")
        private String month;
 
        @Schema(description = "入职人数", example = "3")
        private Integer hireCount;
 
        @Schema(description = "离职人数", example = "1")
        private Integer resignCount;
 
    }
 
    @Schema(description = "员工工龄明细")
    @Data
    public static class TenureEmployeeVO {
        @Schema(description = "员工编号")
        private Long id;
 
        @Schema(description = "员工姓名", example = "张敏")
        private String name;
 
        @Schema(description = "部门名称", example = "研发部")
        private String deptName;
 
        @Schema(description = "入职日期")
        private LocalDate hireDate;
 
        @Schema(description = "工龄(年,保留 1 位小数)", example = "6.5")
        private Double tenureYears;
 
    }
 
}