parent
24ed89e377
commit
92572cd398
8 changed files with 389 additions and 24 deletions
@ -0,0 +1,57 @@ |
||||
package org.springblade.desk.jobTransfer.pojo.enums; |
||||
|
||||
import lombok.AllArgsConstructor; |
||||
import lombok.Getter; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.core.tool.utils.StringPool; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* 婚姻枚举 |
||||
* |
||||
* @author qyl |
||||
* @date 2026-01-09 |
||||
*/ |
||||
@Getter |
||||
@AllArgsConstructor |
||||
public enum MarriageEnum { |
||||
EMPTY(StringPool.EMPTY, ""), |
||||
|
||||
/** |
||||
* 状态枚举 |
||||
*/ |
||||
MARRIED("已婚", "1"), |
||||
SPINSTERHOOD("未婚", "0"), |
||||
; |
||||
final String name; |
||||
final String code; |
||||
|
||||
/** |
||||
* 匹配枚举值 |
||||
* |
||||
* @param name 名称 |
||||
* @return |
||||
*/ |
||||
public static MarriageEnum of(String name) { |
||||
return Arrays.stream(MarriageEnum.values()) |
||||
.filter(enumItem -> enumItem.getName().equalsIgnoreCase(name != null ? name : "")) |
||||
.findFirst() |
||||
// 在没有找到匹配项时返回默认值
|
||||
.orElse(MarriageEnum.EMPTY); |
||||
} |
||||
|
||||
/** |
||||
* 根据值获取名称 |
||||
* |
||||
* @param code |
||||
* @return |
||||
*/ |
||||
public static String getName(String code) { |
||||
MarriageEnum item = Arrays.stream(MarriageEnum.values()) |
||||
.filter(enumItem -> enumItem.getCode().equalsIgnoreCase(code)) |
||||
.findFirst() |
||||
.orElse(null); |
||||
return ObjectUtil.isEmpty(item) ? StringPool.EMPTY : item.getName(); |
||||
} |
||||
} |
||||
@ -0,0 +1,58 @@ |
||||
package org.springblade.desk.jobTransfer.pojo.enums; |
||||
|
||||
import lombok.AllArgsConstructor; |
||||
import lombok.Getter; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.core.tool.utils.StringPool; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* 技能等级枚举 |
||||
* |
||||
* @author qyl |
||||
* @date 2026-01-09 |
||||
*/ |
||||
@Getter |
||||
@AllArgsConstructor |
||||
public enum SkillEnum { |
||||
EMPTY(StringPool.EMPTY, -1), |
||||
|
||||
/** |
||||
* 状态枚举 |
||||
*/ |
||||
MIDDLE_RANK("中级", 1), |
||||
SENIOR("高级", 2), |
||||
ARTIFICER("技师", 3), |
||||
; |
||||
final String name; |
||||
final Integer code; |
||||
|
||||
/** |
||||
* 匹配枚举值 |
||||
* |
||||
* @param name 名称 |
||||
* @return |
||||
*/ |
||||
public static SkillEnum of(String name) { |
||||
return Arrays.stream(SkillEnum.values()) |
||||
.filter(enumItem -> enumItem.getName().equalsIgnoreCase(name != null ? name : "")) |
||||
.findFirst() |
||||
// 在没有找到匹配项时返回默认值
|
||||
.orElse(SkillEnum.EMPTY); |
||||
} |
||||
|
||||
/** |
||||
* 根据值获取名称 |
||||
* |
||||
* @param code |
||||
* @return |
||||
*/ |
||||
public static String getName(int code) { |
||||
SkillEnum item = Arrays.stream(SkillEnum.values()) |
||||
.filter(enumItem -> enumItem.getCode() == code) |
||||
.findFirst() |
||||
.orElse(null); |
||||
return ObjectUtil.isEmpty(item) ? StringPool.EMPTY : item.getName(); |
||||
} |
||||
} |
||||
@ -0,0 +1,130 @@ |
||||
package org.springblade.desk.jobTransfer.pojo.excel; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.format.DateTimeFormat; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 岗位处理导入 |
||||
* |
||||
* @author qyl |
||||
* @since 2026-01-09 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class PostHandleImport extends BaseEntity { |
||||
|
||||
/** |
||||
* 用户code |
||||
*/ |
||||
@ExcelProperty(index = 0) |
||||
private String code; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@ExcelProperty(index = 1) |
||||
private String name; |
||||
/** |
||||
* 民族 |
||||
*/ |
||||
@ExcelProperty(index = 2) |
||||
private String nation; |
||||
/** |
||||
* 年龄 |
||||
*/ |
||||
@ExcelProperty(index = 3) |
||||
private Short age; |
||||
/** |
||||
* 身份证号码 |
||||
*/ |
||||
@ExcelProperty(index = 4) |
||||
private String idCard; |
||||
/** |
||||
* 籍贯 |
||||
*/ |
||||
@ExcelProperty(index = 5) |
||||
private String nativePlace; |
||||
|
||||
/** |
||||
* 所属岗位 |
||||
*/ |
||||
@ExcelProperty(index = 6) |
||||
private String station; |
||||
/** |
||||
* 出生日期 |
||||
*/ |
||||
@ExcelProperty(index = 7) |
||||
@DateTimeFormat("yyyy/MM/dd") |
||||
private Date dataBirth; |
||||
/** |
||||
* 政治面貌 |
||||
*/ |
||||
@ExcelProperty(index = 8) |
||||
private String face; |
||||
/** |
||||
* 婚姻状态(0未婚,1已婚) |
||||
*/ |
||||
@ExcelProperty(index = 9) |
||||
private String marriageName; |
||||
/** |
||||
* 毕业院校 |
||||
*/ |
||||
@ExcelProperty(index = 10) |
||||
private String school; |
||||
/** |
||||
* 所学专业 |
||||
*/ |
||||
@ExcelProperty(index = 11) |
||||
private String major; |
||||
/** |
||||
* 最高学历 |
||||
*/ |
||||
@ExcelProperty(index = 12) |
||||
private String education; |
||||
/** |
||||
* 毕业时间 |
||||
*/ |
||||
@ExcelProperty(index = 13) |
||||
@DateTimeFormat("yyyy/MM/dd") |
||||
private Date endDate; |
||||
/** |
||||
* 用工类型 |
||||
*/ |
||||
@ExcelProperty(index = 14) |
||||
private String staffTypeName; |
||||
/** |
||||
* 参加工作时间 |
||||
*/ |
||||
@ExcelProperty(index = 15) |
||||
@DateTimeFormat("yyyy/MM/dd") |
||||
private Date joinJobDate; |
||||
/** |
||||
* 技能等级 |
||||
*/ |
||||
@ExcelProperty(index = 16) |
||||
private String skillName; |
||||
/** |
||||
* 任现职时间 |
||||
*/ |
||||
@ExcelProperty(index = 17) |
||||
@DateTimeFormat("yyyy/MM/dd") |
||||
private Date inJobDate; |
||||
/** |
||||
* 合同到期 |
||||
*/ |
||||
@ExcelProperty(index = 18) |
||||
@DateTimeFormat("yyyy/MM/dd") |
||||
private Date conExpDate; |
||||
/** |
||||
* 家庭住址 |
||||
*/ |
||||
@ExcelProperty(index = 19) |
||||
private String address; |
||||
} |
||||
Binary file not shown.
Loading…
Reference in new issue