Browse Source

feat(inspection): 为检验请求头实体添加日期格式化注解

- 在 requestDate 字段上添加 @DateTimeFormat@JsonFormat 注解
- 在 needInspectDate 字段上添加 @DateTimeFormat@JsonFormat 注解
- 在 createDate 字段上添加 @DateTimeFormat@JsonFormat 注解
- 在 inspectDate 字段上添加 @DateTimeFormat@JsonFormat 注解
- 在 planStartDate 字段上添加 @DateTimeFormat@JsonFormat 注解
- 在 planEndDate 字段上添加 @DateTimeFormat@JsonFormat 注解
- 在 scheduledDate 字段上添加 @DateTimeFormat@JsonFormat 注解
- 统一设置日期格式为 "yyyy-MM-dd",时间格式为 "yyyy-MM-dd HH:mm:ss"
- 设置时区为 GMT+8
master
qiankanghui 3 weeks ago
parent
commit
187dfbdb82
  1. 16
      src/main/java/com/xujie/modules/inspection/entity/InspectionRequestHeader.java

16
src/main/java/com/xujie/modules/inspection/entity/InspectionRequestHeader.java

@ -2,6 +2,8 @@ package com.xujie.modules.inspection.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.xujie.common.utils.QueryPage; import com.xujie.common.utils.QueryPage;
import lombok.Data; import lombok.Data;
@ -22,14 +24,20 @@ public class InspectionRequestHeader extends QueryPage {
*/ */
private String requestNo; private String requestNo;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date requestDate; private Date requestDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date needInspectDate; private Date needInspectDate;
private String supplierNo; private String supplierNo;
private String createBy; private String createBy;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createDate; private Date createDate;
private String inspectAddress; private String inspectAddress;
@ -44,12 +52,20 @@ public class InspectionRequestHeader extends QueryPage {
private String qcOperator; private String qcOperator;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectDate; private Date inspectDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planStartDate; private Date planStartDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planEndDate; private Date planEndDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date scheduledDate; private Date scheduledDate;
private String scheduledBy; private String scheduledBy;

Loading…
Cancel
Save