Commit c40c9727 authored by fangxinjiang's avatar fangxinjiang

不良记录导入

parent 4a52034d
......@@ -16,15 +16,15 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.Max;
import java.time.LocalDate;
import java.util.Date;
/**
* 员工学历信息表
......@@ -75,9 +75,9 @@ public class TEmpEducation extends BaseEntity {
/**
* 入学时间
*/
@DateTimeFormat("yyyy-MM-dd hh:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "入学时间")
private LocalDate entryDate;
private Date entryDate;
/**
* 学历名称
......@@ -89,9 +89,9 @@ public class TEmpEducation extends BaseEntity {
/**
* 结业日期
*/
@DateTimeFormat("yyyy-MM-dd hh:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "结业日期")
private LocalDate gradutionDate;
private Date gradutionDate;
/**
* 学校名称
......
......@@ -1370,8 +1370,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
education.setHighIdentification(CommonConstants.ZERO_STRING);
education.setSchool(employeeInfo.getSchool());
education.setMajor(employeeInfo.getMajor());
education.setEntryDate(employeeInfo.getAdmissionDate());
education.setGradutionDate(employeeInfo.getGradutionDate());
education.setEntryDate(LocalDateTimeUtils.convertLDToDate(employeeInfo.getAdmissionDate()));
education.setGradutionDate(LocalDateTimeUtils.convertLDToDate(employeeInfo.getGradutionDate()));
tEmpEducationService.insertEducationOfEmp(education);
}
......
......@@ -47,7 +47,16 @@ public class LocalDateTimeUtils {
}
return null;
}
public static LocalDateTime convertLocalDateToLDT(LocalDate date) {
return LocalDateTime.ofInstant(date.atStartOfDay(ZoneOffset.ofHours(8)).toInstant(), ZoneId.systemDefault());
}
public static Date convertLDToDate(LocalDate time) {
if (null != time){
return Date.from(time.atStartOfDay(ZoneOffset.ofHours(8)).toInstant());
}
return null;
}
//获取指定日期的毫秒
public static Long getMilliByTime(LocalDateTime time) {
......
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