From 0c4e969df0d572ab85aa84e4fe4d2dc766ef9bdc Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Thu, 13 Jul 2023 09:04:20 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=97=A5=E5=B8=B8=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E6=9C=88=E8=AE=A1=E5=88=92=E6=9F=A5=E8=AF=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/OperMaintenanceMonitorServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 870080f..b1a8a03 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 @@ -42,10 +42,11 @@ public class OperMaintenanceMonitorServiceImpl implements IOperMaintenanceMonito @Override public R>> reportMonth(OperMaintenanceMonitorReportMonthDTO req) { List planEntities = planMapper.selectList(new LambdaQueryWrapper() {{ - Date startTime = DateUtil.parse(DateUtil.format(DateUtil.now(), "yyyy-MM") + "-01", DateUtil.PATTERN_DATE); + LocalDate startDate = LocalDate.of(req.getYear(), req.getMonth(),1); + // Date startTime = DateUtil.parse(DateUtil.format(DateUtil.now(), "yyyy-MM") + "-01", DateUtil.PATTERN_DATE); eq(OperMaintenancePlanEntity::getIsDeleted, 0L); - ge(OperMaintenancePlanEntity::getDisposeTime, startTime); - lt(OperMaintenancePlanEntity::getDisposeTime, DateUtil.plusMonths(startTime, 1)); + ge(OperMaintenancePlanEntity::getDisposeTime, startDate); + lt(OperMaintenancePlanEntity::getDisposeTime, startDate.withDayOfMonth(startDate.getMonth().maxLength())); }}); //获取列表班次ID集合