From 453f4f9d2c961a34f0a4177b6d1bfcec62447704 Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Wed, 2 Aug 2023 09:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/njcn/process/pojo/param/SupvPlanParam.java | 4 ++-- .../src/main/java/com/njcn/process/pojo/po/SupvPlan.java | 8 ++++---- .../main/java/com/njcn/process/pojo/vo/SupvPlanVO.java | 6 ++++-- .../njcn/process/service/impl/SupvPlanServiceImpl.java | 8 ++++---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java index 3727af210..4589b3d2a 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java @@ -108,14 +108,14 @@ public class SupvPlanParam extends BaseParam { * 计划执行开始时间 */ @ApiModelProperty(value = "计划执行开始时间",required = true) - @DateTimeStrValid(message = "计划执行开始时间格式有误") + @DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss",message = "计划执行开始时间格式有误") private String effectStartTime; /** * 计划执行结束时间 */ @ApiModelProperty(value = "计划执行结束时间",required = true) - @DateTimeStrValid(message = "计划执行结束时间格式有误") + @DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss",message = "计划执行结束时间格式有误") private String effectEndTime; /** diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlan.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlan.java index b108cc4cf..d8009a8b0 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlan.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlan.java @@ -104,16 +104,16 @@ public class SupvPlan extends BaseEntity { /** * 计划执行开始时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField(updateStrategy = FieldStrategy.IGNORED) - private LocalDate effectStartTime; + private LocalDateTime effectStartTime; /** * 计划执行结束时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField(updateStrategy = FieldStrategy.IGNORED) - private LocalDate effectEndTime; + private LocalDateTime effectEndTime; /** diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvPlanVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvPlanVO.java index 404dd9a35..b56997e13 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvPlanVO.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvPlanVO.java @@ -112,13 +112,15 @@ public class SupvPlanVO { * 计划执行开始时间 */ @ApiModelProperty(value = "计划执行开始时间",required = true) - private String effectStartTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime effectStartTime; /** * 计划执行结束时间 */ @ApiModelProperty(value = "计划执行结束时间",required = true) - private String effectEndTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime effectEndTime; /** * 报告出具时间 diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java index 1de11c8c0..0f7581316 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java @@ -82,10 +82,10 @@ public class SupvPlanServiceImpl extends ServiceImpl i supvPlan.setPlanSupvDate(PubUtils.localDateFormat(supvPlanParam.getPlanSupvDate())); if(StrUtil.isNotBlank(supvPlanParam.getEffectEndTime())) { - supvPlan.setEffectEndTime(PubUtils.localDateFormat(supvPlanParam.getEffectEndTime())); + supvPlan.setEffectEndTime(PubUtils.localDateTimeFormat(supvPlanParam.getEffectEndTime())); } if(StrUtil.isNotBlank(supvPlanParam.getEffectStartTime())) { - supvPlan.setEffectStartTime(PubUtils.localDateFormat(supvPlanParam.getEffectStartTime())); + supvPlan.setEffectStartTime(PubUtils.localDateTimeFormat(supvPlanParam.getEffectStartTime())); } if(StrUtil.isNotBlank(supvPlanParam.getProblemOcTime())) { supvPlan.setProblemOcTime(PubUtils.localDateTimeFormat(supvPlanParam.getProblemOcTime())); @@ -113,10 +113,10 @@ public class SupvPlanServiceImpl extends ServiceImpl i BeanUtil.copyProperties(supvPlanParam, supvPlan); supvPlan.setPlanSupvDate(PubUtils.localDateFormat(supvPlanParam.getPlanSupvDate())); if(StrUtil.isNotBlank(supvPlanParam.getEffectEndTime())) { - supvPlan.setEffectEndTime(PubUtils.localDateFormat(supvPlanParam.getEffectEndTime())); + supvPlan.setEffectEndTime(PubUtils.localDateTimeFormat(supvPlanParam.getEffectEndTime())); } if(StrUtil.isNotBlank(supvPlanParam.getEffectStartTime())) { - supvPlan.setEffectStartTime(PubUtils.localDateFormat(supvPlanParam.getEffectStartTime())); + supvPlan.setEffectStartTime(PubUtils.localDateTimeFormat(supvPlanParam.getEffectStartTime())); } if(StrUtil.isNotBlank(supvPlanParam.getProblemOcTime())) { supvPlan.setProblemOcTime(PubUtils.localDateTimeFormat(supvPlanParam.getProblemOcTime()));