dev:app端入职插入user_corp_record表

main
SondonYong 2025-12-05 10:19:37 +08:00
parent 1c73ffe3b8
commit dd325155cb
3 changed files with 19 additions and 2 deletions

View File

@ -193,6 +193,11 @@ public class UserAddExe {
} }
} }
// 插入user_corp_record表
UserCorpRecordE userCorpRecordE = new UserCorpRecordE();
userCorpRecordE.initAddFromApp(userE, cmd.getCorpinfoName(), cmd.getDepartmentName());
userCorpRecordGateway.add(userCorpRecordE);
// 插入user_change_record表 // 插入user_change_record表
UserChangeRecordE userChangeRecordE = new UserChangeRecordE(); UserChangeRecordE userChangeRecordE = new UserChangeRecordE();
userChangeRecordE.initUserAddFromApp(userE, cmd.getCorpinfoName(), cmd.getDepartmentName()); userChangeRecordE.initUserAddFromApp(userE, cmd.getCorpinfoName(), cmd.getDepartmentName());

View File

@ -42,8 +42,8 @@ public class AppUserOnboardingCmd extends Command {
@NotEmpty(message = "部门名称不能为空") @NotEmpty(message = "部门名称不能为空")
private String departmentName; private String departmentName;
@ApiModelProperty(value = "部门名称", name = "departmentName", required = true) @ApiModelProperty(value = "岗位名称", name = "postName", required = true)
@NotEmpty(message = "部门名称不能为空") @NotEmpty(message = "岗位名称不能为空")
private String postName; private String postName;
} }

View File

@ -79,6 +79,18 @@ public class UserCorpRecordE extends BaseE {
this.startTime = LocalDateTime.now(); this.startTime = LocalDateTime.now();
} }
public void initAddFromApp(UserE userE,String corpName,String departmentName) {
this.userId = userE.getId();
this.corpinfoId = userE.getCorpinfoId();
this.corpinfoName = corpName;
this.departmentId = userE.getDepartmentId();
this.departmentName = departmentName;
this.postId = userE.getPostId();
this.postName = userE.getPostName();
this.employmentFlag = UserEmploymentFlagEnum.ENTRY_AUDIT.getCode();
this.status = UserChangeRecordStatusEnum.PENDING.getCode();
}
public void executeResignation(UserCorpRecordE userCorpRecordE, UserE userE,Integer employmentFlag,Integer status) { public void executeResignation(UserCorpRecordE userCorpRecordE, UserE userE,Integer employmentFlag,Integer status) {
this.corpinfoName = userCorpRecordE.getCorpinfoName(); this.corpinfoName = userCorpRecordE.getCorpinfoName();
this.departmentId = userE.getDepartmentId(); this.departmentId = userE.getDepartmentId();