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集合