feat(aps): 添加日期时间格式化注解支持
- 在 ApsPlanDetail 实体类中为 startTime 和 endTime 字段添加 JsonFormat 和 DateTimeFormat 注解 - 在 ApsPlanDetailBo 业务对象中为 startTime 和 endTime 字段添加 JsonFormat 和 DateTimeFormat 注解 - 在 ApsPlanDetailVo 视图对象中为 startTime 和 endTime 字段添加 JsonFormat 和 DateTimeFormat 注解 - 在 ApsPlanSheet 实体类中为 planDate 字段添加 JsonFormat 和 DateTimeFormat 注解 - 在 ApsPlanSheetBo 业务对象中为 planDate 字段添加 JsonFormat 和 DateTimeFormat 注解 - 在 ApsPlanSheetVo 视图对象中为 planDate 字段添加 JsonFormat 和 DateTimeFormat 注解 - 统一日期时间字段的序列化和反序列化格式配置
This commit is contained in:
@@ -8,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
|
||||
/**
|
||||
@@ -242,12 +243,16 @@ public class ApsPlanDetailVo {
|
||||
* 生产开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "生产开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 生产结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "生产结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
|
||||
/**
|
||||
@@ -31,6 +32,8 @@ public class ApsPlanSheetVo {
|
||||
* 排产日期
|
||||
*/
|
||||
@ExcelProperty(value = "排产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planDate;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user