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 tenureDistribution; @Schema(description = "年龄分布(固定区间,含 0 人的区间)") private List ageDistribution; @Schema(description = "学历分布") private List educationDistribution; @Schema(description = "性别分布") private List genderDistribution; @Schema(description = "人员状态构成(在职 / 试用 / 离职)") private List statusDistribution; @Schema(description = "部门人数分布,按人数倒序") private List deptDistribution; @Schema(description = "岗位分布,按人数倒序") private List postDistribution; @Schema(description = "婚姻状况分布") private List marriageDistribution; @Schema(description = "政治面貌分布") private List politicalDistribution; @Schema(description = "近 12 个月入职 / 离职趋势,按月份升序") private List hireResignTrend; @Schema(description = "合同到期预警(已到期 / 30天内 / 31-90天 / 90天以上 / 无固定期限)") private List contractWarning; @Schema(description = "在岗未签有效合同人数", example = "3") private Integer noContractCount; @Schema(description = "各部门工龄统计,按平均工龄倒序") private List deptTenureList; @Schema(description = "在职员工工龄排行(工龄最长的前 10 名)") private List 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; } }