commit
3d1120a6f6
28 changed files with 787 additions and 108 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-14 |
||||
*/ |
||||
@Getter |
||||
@AllArgsConstructor |
||||
public enum GenderEnum { |
||||
EMPTY(StringPool.EMPTY, ""), |
||||
|
||||
/** |
||||
* 状态枚举 |
||||
*/ |
||||
MAN("男", "1"), |
||||
WOMAN("女", "0"), |
||||
; |
||||
final String name; |
||||
final String code; |
||||
|
||||
/** |
||||
* 匹配枚举值 |
||||
* |
||||
* @param name 名称 |
||||
* @return |
||||
*/ |
||||
public static GenderEnum of(String name) { |
||||
return Arrays.stream(GenderEnum.values()) |
||||
.filter(enumItem -> enumItem.getName().equalsIgnoreCase(name != null ? name : "")) |
||||
.findFirst() |
||||
// 在没有找到匹配项时返回默认值
|
||||
.orElse(GenderEnum.EMPTY); |
||||
} |
||||
|
||||
/** |
||||
* 根据值获取名称 |
||||
* |
||||
* @param code |
||||
* @return |
||||
*/ |
||||
public static String getName(String code) { |
||||
GenderEnum item = Arrays.stream(GenderEnum.values()) |
||||
.filter(enumItem -> enumItem.getCode().equalsIgnoreCase(code)) |
||||
.findFirst() |
||||
.orElse(null); |
||||
return ObjectUtil.isEmpty(item) ? StringPool.EMPTY : item.getName(); |
||||
} |
||||
} |
||||
@ -0,0 +1,54 @@ |
||||
package org.springblade.desk.jobTransfer.pojo.excel; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.format.DateTimeFormat; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 证书维护导入 |
||||
* |
||||
* @author qyl |
||||
* @since 2026-01-14 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class CertificateMaintenanceImport extends BaseEntity { |
||||
|
||||
/** |
||||
* 用户code |
||||
*/ |
||||
@ExcelProperty(index = 0) |
||||
private String userCode; |
||||
/** |
||||
* 证书类型 |
||||
*/ |
||||
@ExcelProperty(index = 1) |
||||
private String certificateType; |
||||
/** |
||||
* 证书编号 |
||||
*/ |
||||
@ExcelProperty(index = 2) |
||||
private String certificateCode; |
||||
/** |
||||
* 证书日期 |
||||
*/ |
||||
@ExcelProperty(index = 3) |
||||
@DateTimeFormat("yyyy/MM/dd") |
||||
private Date certificateDate; |
||||
/** |
||||
* 适航日期 |
||||
*/ |
||||
@ExcelProperty(index = 4) |
||||
@DateTimeFormat("yyyy/MM/dd") |
||||
private Date airworthinessDate; |
||||
/** |
||||
* 宇航日期 |
||||
*/ |
||||
@ExcelProperty(index = 5) |
||||
@DateTimeFormat("yyyy/MM/dd") |
||||
private Date astronautDate; |
||||
} |
||||
Binary file not shown.
Loading…
Reference in new issue