update 1.0

This commit is contained in:
mash 2023-06-16 15:09:56 +08:00
parent 72ff161ca6
commit e956b22dcb
6 changed files with 104 additions and 11 deletions

View File

@ -124,4 +124,5 @@ public class PersonnelController extends BaseController {
} }
} }

View File

@ -17,7 +17,6 @@ public class GiveAuditRequest {
@ApiModelProperty(value = "人员类型personnel 变更change") @ApiModelProperty(value = "人员类型personnel 变更change")
private String type; private String type;
@ApiModelProperty(value = "修改数据") @ApiModelProperty(value = "修改数据")
private PersonnelUpdateRequest request; private PersonnelUpdateRequest request;
} }

View File

@ -71,11 +71,9 @@ public class PersonnelRequest {
private String hireType; private String hireType;
@ApiModelProperty(value = "执业资格") @ApiModelProperty(value = "执业资格")
@NotBlank(message = "执业资格不能为空")
private String qualification; private String qualification;
@ApiModelProperty(value = "专业技术职称") @ApiModelProperty(value = "专业技术职称")
@NotBlank(message = "专业技术职称不能为空")
private String jobTitle; private String jobTitle;
@ApiModelProperty(value = "所在部门") @ApiModelProperty(value = "所在部门")
@ -140,4 +138,7 @@ public class PersonnelRequest {
@ApiModelProperty(value = "审批资料附件") @ApiModelProperty(value = "审批资料附件")
private List<AttachmentRequest> auditFile; private List<AttachmentRequest> auditFile;
@ApiModelProperty(value = "类型save 保存 audit 保存并送审")
private String type;
} }

View File

@ -7,6 +7,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -21,44 +22,104 @@ public class PersonnelUpdateRequest {
@NotBlank(message = "id不能为空") @NotBlank(message = "id不能为空")
private String id; private String id;
@ApiModelProperty(value = "姓名")
private String userName;
@ApiModelProperty(value = "企业名称")
private String companyName;
@ApiModelProperty(value = "性别")
private String gender;
@ApiModelProperty(value = "出生日期")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate birthday;
@ApiModelProperty(value = "身份证号")
private String numberId;
@ApiModelProperty(value = "民族") @ApiModelProperty(value = "民族")
@NotBlank(message = "民族不能为空")
private String nation; private String nation;
@ApiModelProperty(value = "政治面貌") @ApiModelProperty(value = "政治面貌")
@NotBlank(message = "政治面貌不能为空")
private String politicsStatus; private String politicsStatus;
@ApiModelProperty(value = "学历") @ApiModelProperty(value = "学历")
@NotBlank(message = "学历不能为空")
private String education; private String education;
@ApiModelProperty(value = "是否应届毕业生") @ApiModelProperty(value = "是否应届毕业生")
@NotBlank(message = "是否应届毕业生不能为空")
private String freshGraduate; private String freshGraduate;
@ApiModelProperty(value = "毕业院校") @ApiModelProperty(value = "毕业院校")
@NotBlank(message = "毕业院校不能为空")
private String academy; private String academy;
@ApiModelProperty(value = "专业") @ApiModelProperty(value = "专业")
@NotBlank(message = "专业不能为空")
private String specialty; private String specialty;
@ApiModelProperty(value = "录用方式")
private String hireType;
@ApiModelProperty(value = "执业资格证书")
private String qualification;
@ApiModelProperty(value = "专业技术职称")
private String jobTitle;
@ApiModelProperty(value = "所在部门") @ApiModelProperty(value = "所在部门")
@NotBlank(message = "所在部门不能为空")
private String presentDept; private String presentDept;
@ApiModelProperty(value = "岗位职务")
private String position;
@ApiModelProperty(value = "合同形式") @ApiModelProperty(value = "合同形式")
@NotBlank(message = "合同形式不能为空")
private String contractModality; private String contractModality;
@ApiModelProperty(value = "人员类型")
private String personnelType;
@ApiModelProperty(value = "工作状态")
private String workState;
@ApiModelProperty(value = "人员性质")
private String personnelCharacter;
@ApiModelProperty(value = "年薪")
private Integer annualSalary;
@ApiModelProperty(value = "入职时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate hireDate;
@ApiModelProperty(value = "退休时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate retirementTime;
@ApiModelProperty(value = "离职时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate resignationTime;
@ApiModelProperty(value = "退休返聘开始时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate txfpStartTime;
@ApiModelProperty(value = "退休返聘结束时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate txfpEndTime;
@ApiModelProperty(value = "人员招聘单号")
private String recruitNumber;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
@ApiModelProperty(value = "身份证附件") @ApiModelProperty(value = "身份证附件")
private List<AttachmentRequest> cardFile; private List<AttachmentRequest> cardFile;
@ApiModelProperty(value = "聘任证书附件")
private List<AttachmentRequest> engageFile;
@ApiModelProperty(value = "职称证书附件")
private List<AttachmentRequest> jobTitleFile;
@ApiModelProperty(value = "学历证书附件") @ApiModelProperty(value = "学历证书附件")
private List<AttachmentRequest> educationFile; private List<AttachmentRequest> educationFile;

View File

@ -0,0 +1,13 @@
package com.ydool.staff.request;
import lombok.Data;
/**
* @author msh
* @version 1.0@Data
* public class SaveAuditRequest {
*
* }
* @date 2023/6/14 17:06
*/

View File

@ -224,6 +224,14 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
saveAttachment(personnelRequest.getEducationFile(), ArgsConst.EDUCATION_FILE, personnel.getId(), ArgsConst.SAVE); saveAttachment(personnelRequest.getEducationFile(), ArgsConst.EDUCATION_FILE, personnel.getId(), ArgsConst.SAVE);
saveAttachment(personnelRequest.getJobTitleFile(), ArgsConst.JOBTITLE_FILE, personnel.getId(), ArgsConst.SAVE); saveAttachment(personnelRequest.getJobTitleFile(), ArgsConst.JOBTITLE_FILE, personnel.getId(), ArgsConst.SAVE);
saveAttachment(personnelRequest.getAuditFile(), ArgsConst.AUDIT_FILE, personnel.getId(), ArgsConst.SAVE); saveAttachment(personnelRequest.getAuditFile(), ArgsConst.AUDIT_FILE, personnel.getId(), ArgsConst.SAVE);
if("audit".equals(personnelRequest.getType())){
GiveAuditRequest request = new GiveAuditRequest();
String[] ids = new String[]{personnel.getId()};
request.setIds(ids);
request.setType("personnel");
return giveAudit(request);
}
return save ? AjaxResult.ok().msg("保存成功!") : AjaxResult.fail().msg("保存失败!"); return save ? AjaxResult.ok().msg("保存成功!") : AjaxResult.fail().msg("保存失败!");
} }
@ -254,9 +262,13 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
List<AttachmentRequest> cardFile = updateRequest.getCardFile(); List<AttachmentRequest> cardFile = updateRequest.getCardFile();
List<AttachmentRequest> educationFile = updateRequest.getEducationFile(); List<AttachmentRequest> educationFile = updateRequest.getEducationFile();
List<AttachmentRequest> auditFile = updateRequest.getAuditFile(); List<AttachmentRequest> auditFile = updateRequest.getAuditFile();
List<AttachmentRequest> engageFile = updateRequest.getEngageFile();
List<AttachmentRequest> jobTitleFile = updateRequest.getJobTitleFile();
String card = StringUtils.join(saveFilePath(cardFile, ArgsConst.CARD_FILE, ArgsConst.UPDATE, updateRequest.getId()), ','); String card = StringUtils.join(saveFilePath(cardFile, ArgsConst.CARD_FILE, ArgsConst.UPDATE, updateRequest.getId()), ',');
String education = StringUtils.join(saveFilePath(educationFile, ArgsConst.EDUCATION_FILE, ArgsConst.UPDATE, updateRequest.getId()), ','); String education = StringUtils.join(saveFilePath(educationFile, ArgsConst.EDUCATION_FILE, ArgsConst.UPDATE, updateRequest.getId()), ',');
String audit = StringUtils.join(saveFilePath(auditFile, ArgsConst.AUDIT_FILE, ArgsConst.UPDATE, updateRequest.getId()), ','); String audit = StringUtils.join(saveFilePath(auditFile, ArgsConst.AUDIT_FILE, ArgsConst.UPDATE, updateRequest.getId()), ',');
String engage = StringUtils.join(saveFilePath(engageFile, ArgsConst.ENGAGE_FILE, ArgsConst.UPDATE, updateRequest.getId()), ',');
String job = StringUtils.join(saveFilePath(jobTitleFile, ArgsConst.JOBTITLE_FILE, ArgsConst.UPDATE, updateRequest.getId()), ',');
if ("1".equals(per.getAlterationSign())) { if ("1".equals(per.getAlterationSign())) {
return AjaxResult.fail().msg("该人员修改的资料未审批完成,请联系管理员!"); return AjaxResult.fail().msg("该人员修改的资料未审批完成,请联系管理员!");
} }
@ -284,6 +296,12 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
if (StrUtil.isNotBlank(audit)){ if (StrUtil.isNotBlank(audit)){
per.setAuditFile(saveAlteration("审批资料附件更改", per.getAuditFile(), audit, type, updateRequest.getId(), ColumnUtil.getFieldName(Personnel::getAuditFile)).toString()); per.setAuditFile(saveAlteration("审批资料附件更改", per.getAuditFile(), audit, type, updateRequest.getId(), ColumnUtil.getFieldName(Personnel::getAuditFile)).toString());
} }
if (StrUtil.isNotBlank(engage)){
per.setEngageFile(saveAlteration("审批资料附件更改", per.getAuditFile(), engage, type, updateRequest.getId(), ColumnUtil.getFieldName(Personnel::getEngageFile)).toString());
}
if (StrUtil.isNotBlank(job)){
per.setJobTitleFile(saveAlteration("审批资料附件更改", per.getAuditFile(), job, type, updateRequest.getId(), ColumnUtil.getFieldName(Personnel::getJobTitleFile)).toString());
}
per.setId(""); per.setId("");
per.setState("1"); per.setState("1");
per.setAlterationSign("1"); per.setAlterationSign("1");