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