Commit d5b0fb68 authored by hongguangwu's avatar hongguangwu

人员档案导入-更新,换代码逻辑

parent 7948bc3a
......@@ -17,13 +17,15 @@
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
* 项目档案表excel对应的实体
......@@ -47,6 +49,7 @@ public class EmployeeVO extends RowIndex implements Serializable {
* 员工姓名
*/
@ExcelProperty(value = "员工姓名")
@ExcelAttribute(name = "员工姓名", isNotEmpty = true, maxLength = 20, needExport = true, errorInfo = "员工姓名必填且不可超过20位")
@Size(max = 20, message = "员工姓名不可超过20位")
private String empName;
......@@ -54,6 +57,7 @@ public class EmployeeVO extends RowIndex implements Serializable {
* 身份证号
*/
@ExcelProperty(value = "身份证号")
@ExcelAttribute(name = "身份证号", isNotEmpty = true, maxLength = 20, needExport = true, errorInfo = "身份证号必填且不可超过20位")
@Size(max = 20, message = "身份证号不可超过20位")
private String empIdcard;
......@@ -61,6 +65,7 @@ public class EmployeeVO extends RowIndex implements Serializable {
* 项目编码
*/
@ExcelProperty(value = "项目编码")
@ExcelAttribute(name = "项目编码", maxLength = 32, needExport = true, errorInfo = "身份证号必填且不可超过20位")
@Size(max = 32, message = "项目编码不可超过32位")
private String deptNo;
......@@ -74,14 +79,16 @@ public class EmployeeVO extends RowIndex implements Serializable {
/**
* 身份证有效期起
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelProperty(value = "身份证开始日期")
private LocalDate validityStart;
private Date validityStart;
/**
* 身份证有效期止
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelProperty(value = "身份证截止日期")
private LocalDate validityEnd;
private Date validityEnd;
/**
* 婚姻状况
......@@ -187,14 +194,16 @@ public class EmployeeVO extends RowIndex implements Serializable {
/**
* 入学时间
*/
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
@ExcelProperty(value = "入学时间")
private LocalDate admissionDate;
private Date admissionDate;
/**
* 毕业时间
*/
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
@ExcelProperty(value = "毕业时间")
private LocalDate gradutionDate;
private Date gradutionDate;
/**
* 备注
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment