diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferencePlanEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferencePlanEntity.java index 914c031..9365a14 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferencePlanEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferencePlanEntity.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @@ -33,12 +34,14 @@ public class ConferencePlanEntity extends BaseEntity { private String theme; @NotNull - @JsonFormat(pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") @ApiModelProperty("会议计划开始时间") private Date scheduledStartTime; @NotNull - @JsonFormat(pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") @ApiModelProperty("会议计划结束时间") private Date scheduledEndTime; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalPlanEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalPlanEntity.java index 45acd49..850988d 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalPlanEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalPlanEntity.java @@ -7,7 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; -import org.springblade.core.tool.utils.DateUtil; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @@ -34,12 +34,14 @@ public class RehearsalPlanEntity extends BaseEntity { private String subject; @NotNull - @JsonFormat(pattern = DateUtil.PATTERN_DATE) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") @ApiModelProperty("演练计划开始时间") private Date scheduledStartTime; @NotNull - @JsonFormat(pattern = DateUtil.PATTERN_DATE) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") @ApiModelProperty("演练计划结束时间") private Date scheduledEndTime; diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java index 444952b..fb4fa22 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java @@ -116,6 +116,9 @@ public class ConferenceRecordServiceImpl extends ServiceImpl list = new ArrayList<>(); if (StringUtils.isNotEmpty(conferenceRecordDetailVO.getImgPath())) { diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java index a269bf6..a4366b5 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java @@ -141,14 +141,14 @@ public class RehearsalRecordServiceImpl extends ServiceImpl list = new ArrayList<>(); if (StringUtils.isNotEmpty(rehearsalRecordDetailVO.getImgPath())) { String[] imgArr = rehearsalRecordDetailVO.getImgPath().split(","); @@ -162,6 +162,12 @@ public class RehearsalRecordServiceImpl extends ServiceImpl diff --git a/hzims-service/safeproduct/src/main/resources/db/2.0.1.sql b/hzims-service/safeproduct/src/main/resources/db/2.0.1.sql new file mode 100644 index 0000000..d66265a --- /dev/null +++ b/hzims-service/safeproduct/src/main/resources/db/2.0.1.sql @@ -0,0 +1,9 @@ +-- 会议计划表:修改会议计划开始时间、会议计划结束时间字段 +ALTER TABLE hzims_conference_plan + MODIFY COLUMN scheduled_start_time datetime NOT NULL COMMENT '会议计划开始时间', + MODIFY COLUMN scheduled_end_time datetime NOT NULL COMMENT '会议计划结束时间'; + +-- 演练计划表:修改演练计划开始时间、演练计划结束时间字段 +ALTER TABLE hzims_rehearsal_plan + MODIFY COLUMN scheduled_start_time datetime NOT NULL COMMENT '演练计划开始时间', + MODIFY COLUMN scheduled_end_time datetime NOT NULL COMMENT '演练计划结束时间';