3 天以前 b852254d90e7d1955db31db154193ec8ee84d8b3
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
package cn.iocoder.yudao.module.hrm.controller.admin.employee.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
 
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
 
@Schema(description = "管理后台 - 员工新增/修改 Request VO")
@Data
public class HrmEmployeeSaveReqVO {
 
    @Schema(description = "员工ID", example = "1")
    private Long id;
 
    @Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "部门不能为空")
    private Long deptId;
 
    @Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "岗位不能为空")
    private Long postId;
 
    @Schema(description = "用工性质", example = "1")
    private Integer employmentType;
 
    @Schema(description = "所属班组ID", example = "1")
    private Long teamId;
 
    @Schema(description = "员工姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotEmpty(message = "员工姓名不能为空")
    private String name;
 
    @Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "性别不能为空")
    private Integer gender;
 
    @Schema(description = "出生日期", example = "1990-01-15")
    private LocalDate birthday;
 
    @Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED, example = "13800138000")
    @NotEmpty(message = "手机号码不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    private String phone;
 
    @Schema(description = "邮箱", example = "zhangsan@example.com")
    @Email(message = "邮箱格式不正确")
    private String email;
 
    @Schema(description = "身份证号", example = "320102199001150011")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$",
            message = "身份证号格式不正确")
    private String idCard;
 
    @Schema(description = "民族", example = "汉族")
    private String nation;
 
    @Schema(description = "婚姻状态", example = "已婚")
    private String marriageStatus;
 
    @Schema(description = "年龄", example = "30")
    private Integer age;
 
    @Schema(description = "学历", example = "本科")
    private String education;
 
    @Schema(description = "政治面貌", example = "中共党员")
    private String politicalStatus;
 
    @Schema(description = "入职日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2020-03-01")
    @NotNull(message = "入职日期不能为空")
    private LocalDate hireDate;
 
    @Schema(description = "转正日期", example = "2020-06-01")
    private LocalDate regularDate;
 
    @Schema(description = "员工状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "员工状态不能为空")
    private Integer employeeStatus;
 
    @Schema(description = "年假余额(天)", example = "5")
    private BigDecimal annualLeaveBalance;
 
    @Schema(description = "病假余额(天)", example = "10")
    private BigDecimal sickLeaveBalance;
 
    @Schema(description = "薪酬结构ID", example = "1")
    private Long salaryStructureId;
 
    @Schema(description = "基本工资", example = "10000.00")
    private BigDecimal baseSalary;
 
    @Schema(description = "角色ID列表", example = "[1, 2]")
    private List<Long> roleIds;
 
    @Schema(description = "开户银行", example = "中国工商银行")
    private String bankName;
 
    @Schema(description = "银行账号", example = "6222021234567890123")
    private String bankAccount;
 
    @Schema(description = "居住地址", example = "江苏省南京市")
    private String address;
 
    @Schema(description = "备注", example = "备注信息")
    private String remark;
 
    // ========== 子表数据 ==========
 
    @Schema(description = "教育经历列表")
    @Valid
    private List<HrmEmployeeEducationSaveReqVO> educations;
 
    @Schema(description = "工作经历列表")
    @Valid
    private List<HrmEmployeeWorkHistorySaveReqVO> workHistories;
 
    @Schema(description = "紧急联系人列表")
    @Valid
    private List<HrmEmployeeEmergencyContactSaveReqVO> emergencyContacts;
 
}