添加状态
parent
e0ed80a261
commit
973b93d749
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.zcloud.basic.info.domain.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态,1-待审批, 2-通过,3-驳回
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum UserChangeRecordStatusEnum {
|
||||||
|
/**
|
||||||
|
* 枚举值
|
||||||
|
*/
|
||||||
|
PENDING(1, "待审批"),
|
||||||
|
APPROVED(2, "通过"),
|
||||||
|
REJECTED(3, "驳回"),
|
||||||
|
;
|
||||||
|
private final Integer code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
UserChangeRecordStatusEnum(Integer code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,17 +3,19 @@ package com.zcloud.basic.info.domain.enums;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入职状态,1-在职 0-离职, 2-信息变更中, 3-已退休
|
* 入职状态,1-在职 0-离职,, 2-信息变更中, 3-已退休, 11-入职待审核, 10-离职待审核
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public enum UserEmploymentFlagEnum {
|
public enum UserEmploymentFlagEnum {
|
||||||
/**
|
/**
|
||||||
* 枚举值
|
* 枚举值
|
||||||
*/
|
*/
|
||||||
ON(1, "在职"),
|
|
||||||
RESIGNATION(0, "离职"),
|
RESIGNATION(0, "离职"),
|
||||||
|
ON(1, "在职"),
|
||||||
INFO_CHANGE(2, "信息变更中"),
|
INFO_CHANGE(2, "信息变更中"),
|
||||||
RETIREMENT(3, "已退休"),
|
RETIREMENT(3, "已退休"),
|
||||||
|
ENTRY_AUDIT(11, "入职待审核"),
|
||||||
|
RESIGNATION_AUDIT(10, "离职待审核")
|
||||||
;
|
;
|
||||||
private final Integer code;
|
private final Integer code;
|
||||||
private final String desc;
|
private final String desc;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.zcloud.basic.info.domain.model;
|
package com.zcloud.basic.info.domain.model;
|
||||||
|
|
||||||
import com.jjb.saas.framework.domain.model.BaseE;
|
import com.jjb.saas.framework.domain.model.BaseE;
|
||||||
|
import com.zcloud.basic.info.domain.enums.UserChangeRecordStatusEnum;
|
||||||
|
import com.zcloud.basic.info.domain.enums.UserEmploymentFlagEnum;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -64,7 +66,8 @@ public class UserChangeRecordE extends BaseE {
|
||||||
this.setDepartmentNameAfter(departmentName);
|
this.setDepartmentNameAfter(departmentName);
|
||||||
this.setPostIdAfter(userE.getPostId());
|
this.setPostIdAfter(userE.getPostId());
|
||||||
this.setPostNameAfter(userE.getPostName());
|
this.setPostNameAfter(userE.getPostName());
|
||||||
this.status = 1;
|
this.setUserStatusAfter(UserEmploymentFlagEnum.ON.getCode());
|
||||||
|
this.setStatus(UserChangeRecordStatusEnum.APPROVED.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initUserUpdate(UserE userE, UserE oldUserE, String corpName, String name) {
|
public void initUserUpdate(UserE userE, UserE oldUserE, String corpName, String name) {
|
||||||
|
|
@ -76,13 +79,15 @@ public class UserChangeRecordE extends BaseE {
|
||||||
this.setDepartmentNameBefore(oldUserE.getDepartmentName());
|
this.setDepartmentNameBefore(oldUserE.getDepartmentName());
|
||||||
this.setPostIdBefore(oldUserE.getPostId());
|
this.setPostIdBefore(oldUserE.getPostId());
|
||||||
this.setPostNameBefore(oldUserE.getPostName());
|
this.setPostNameBefore(oldUserE.getPostName());
|
||||||
|
this.setUserStatusBefore(oldUserE.getEmploymentFlag());
|
||||||
this.setCorpinfoIdAfter(userE.getCorpinfoId());
|
this.setCorpinfoIdAfter(userE.getCorpinfoId());
|
||||||
this.setCorpinfoNameAfter(corpName);
|
this.setCorpinfoNameAfter(corpName);
|
||||||
this.setDepartmentIdAfter(userE.getDepartmentId());
|
this.setDepartmentIdAfter(userE.getDepartmentId());
|
||||||
this.setDepartmentNameAfter(name);
|
this.setDepartmentNameAfter(name);
|
||||||
this.setPostIdAfter(userE.getPostId());
|
this.setPostIdAfter(userE.getPostId());
|
||||||
this.setPostNameAfter(userE.getPostName());
|
this.setPostNameAfter(userE.getPostName());
|
||||||
this.status = oldUserE.getEmploymentFlag();
|
this.setUserStatusAfter(userE.getEmploymentFlag());
|
||||||
|
this.setStatus(UserChangeRecordStatusEnum.APPROVED.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void executeResignation(UserE userE, Integer code) {
|
public void executeResignation(UserE userE, Integer code) {
|
||||||
|
|
@ -100,7 +105,7 @@ public class UserChangeRecordE extends BaseE {
|
||||||
this.setDepartmentNameAfter(null);
|
this.setDepartmentNameAfter(null);
|
||||||
this.setPostIdAfter(null);
|
this.setPostIdAfter(null);
|
||||||
this.setPostNameAfter(null);
|
this.setPostNameAfter(null);
|
||||||
this.status = code;
|
this.setStatus(UserChangeRecordStatusEnum.PENDING.getCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue