From 9506869bcfca0a367230b8a9173c29d77abd8b29 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Thu, 13 Jul 2023 19:39:45 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=97=A5=E5=B8=B8=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E8=8E=B7=E5=8F=96=E5=BD=93=E6=9C=88=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E5=A4=A9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java index b1a8a03..6c21a91 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java @@ -21,6 +21,8 @@ import org.springframework.stereotype.Service; import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.YearMonth; +import java.time.temporal.TemporalAdjusters; import java.util.*; import java.util.stream.Collectors; @@ -46,7 +48,7 @@ public class OperMaintenanceMonitorServiceImpl implements IOperMaintenanceMonito // Date startTime = DateUtil.parse(DateUtil.format(DateUtil.now(), "yyyy-MM") + "-01", DateUtil.PATTERN_DATE); eq(OperMaintenancePlanEntity::getIsDeleted, 0L); ge(OperMaintenancePlanEntity::getDisposeTime, startDate); - lt(OperMaintenancePlanEntity::getDisposeTime, startDate.withDayOfMonth(startDate.getMonth().maxLength())); + lt(OperMaintenancePlanEntity::getDisposeTime, startDate.with(TemporalAdjusters.lastDayOfMonth())); }}); //获取列表班次ID集合