Files
senmesh-zc/src/main/java/com/newyetai/recruit/position/dto/UserPositionRegistrationResDTO.java

123 lines
3.4 KiB
Java
Raw Normal View History

2025-06-11 09:42:13 +08:00
package com.newyetai.recruit.position.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.newyetai.component.dict.util.DictUtils;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description: 用户端我的报名
* @author: guixinman
* @create: 2024-04-19 09:26
**/
@Data
public class UserPositionRegistrationResDTO implements Serializable {
private Long id;
private Long positionId;
@ApiModelProperty("岗位名称")
private String positionName;
@ApiModelProperty("招聘标题")
private String recruitTitle;
@ApiModelProperty("岗位标签")
private String positionTag;
@ApiModelProperty("工作地址")
private String positionAddress;
@ApiModelProperty("招聘专员")
private String recruitUserName;
private String companyName;
private String companyLogo;
private String positionFileCode;
private String status;
@ApiModelProperty("报名时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("面试时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date interviewTime;
@ApiModelProperty("面试地点")
private String interviewLocation;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("入职时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date inductionTime;
@ApiModelProperty("入职薪资")
private BigDecimal salary;
/**
* 招聘岗位类型
*/
private String recruitPositionType;
private String recruitPositionTypeName;
/**
* 薪资上限
*/
private BigDecimal salaryUp;
/**
* 薪资下限
*/
private BigDecimal salaryLow;
/**
* 薪资类型
*/
private String salaryType;
private String salaryStr;
2025-08-06 11:15:25 +08:00
private Boolean canShow;
2025-06-11 09:42:13 +08:00
/**
* 详细地址
*/
private String detailAddress;
public String getSalaryStr() {
String salary = "";
if (Objects.nonNull(this.getSalaryUp()) && Objects.nonNull(this.getSalaryLow())) {
salary = String.format("%s~%s元/%s", this.getSalaryLow(), this.getSalaryUp(), DictUtils.getCodeNameMap("salary_type").get(String.valueOf(this.getSalaryType())));
if (this.getSalaryLow().compareTo(this.getSalaryUp()) == 0) {
salary = String.format("%s元/%s", this.getSalaryUp(), DictUtils.getCodeNameMap("salary_type").get(String.valueOf(this.getSalaryType())));
}
} else if (Objects.nonNull(this.getSalaryLow()) && Objects.isNull(this.getSalaryUp())) {
salary = String.format("%s元/%s", this.getSalaryLow(), DictUtils.getCodeNameMap("salary_type").get(String.valueOf(this.getSalaryType())));
} else if (Objects.isNull(this.getSalaryLow()) && Objects.nonNull(this.getSalaryUp())) {
salary = String.format("%s元/%s", this.getSalaryUp(), DictUtils.getCodeNameMap("salary_type").get(String.valueOf(this.getSalaryType())));
} else if (Objects.isNull(this.getSalaryLow()) && Objects.isNull(this.getSalaryUp())) {
2025-09-15 11:12:46 +08:00
salary = "面议";
2025-06-11 09:42:13 +08:00
}
return salary;
}
}