From 187dfbdb82050cfc8d39fad0a5fbe47b6461c913 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Wed, 27 May 2026 11:18:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(inspection):=20=E4=B8=BA=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=A4=B4=E5=AE=9E=E4=BD=93=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 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 --- .../entity/InspectionRequestHeader.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/xujie/modules/inspection/entity/InspectionRequestHeader.java b/src/main/java/com/xujie/modules/inspection/entity/InspectionRequestHeader.java index 131865c..0956415 100644 --- a/src/main/java/com/xujie/modules/inspection/entity/InspectionRequestHeader.java +++ b/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.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; import com.xujie.common.utils.QueryPage; import lombok.Data; @@ -22,14 +24,20 @@ public class InspectionRequestHeader extends QueryPage { */ private String requestNo; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date requestDate; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date needInspectDate; private String supplierNo; 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 String inspectAddress; @@ -44,12 +52,20 @@ public class InspectionRequestHeader extends QueryPage { private String qcOperator; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date inspectDate; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date planStartDate; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date planEndDate; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date scheduledDate; private String scheduledBy;