diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java index d09b657ee0..fc0d7555e3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java @@ -18,7 +18,9 @@ package com.epmet.dto; import com.epmet.commons.tools.validator.group.AddGroup; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotBlank; import java.io.Serializable; @@ -49,7 +51,6 @@ public class IcPartyActivityDTO implements Serializable { /** * 组织ID */ - @NotBlank(message = "agencyId不能为空",groups = AddGroup.class) private String agencyId; /** @@ -95,7 +96,8 @@ public class IcPartyActivityDTO implements Serializable { /** * 活动时间 */ - @NotBlank(message = "活动时间不能为空",groups = AddGroup.class) + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date activityTime; /** diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java index 2053b99d0f..40ac5563ac 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; @@ -18,7 +19,9 @@ public class PartyActivityFormDTO implements Serializable { private String agencyId; private String unitId; private String title; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date startTime; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date endTime; private String serviceMatter; private Integer pageNo;