diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/DownloadController.java b/bonus-business/src/main/java/com/bonus/digital/controller/DownloadController.java index 713177d..93f5050 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/DownloadController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/DownloadController.java @@ -43,17 +43,13 @@ public class DownloadController { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); LocalDate start = LocalDate.parse(startDate, formatter); LocalDate end = LocalDate.parse(endDate, formatter); - boolean isSameYear = start.getYear() == end.getYear(); - if (isSameYear) { - // 计算天数差(绝对值防止传反) - long daysDiff = Math.abs(ChronoUnit.DAYS.between(start, end)); - if (daysDiff <= 31) { - downloadService.downloadExcelDayPlanStatistics(request, response, dto); - } else { - throw new ServiceException("当前仅支持导出间隔31天内的统计数据,请修改日期范围。"); - } +// boolean isSameYear = start.getYear() == end.getYear(); + // 计算天数差(绝对值防止传反) + long daysDiff = Math.abs(ChronoUnit.DAYS.between(start, end)); + if (daysDiff <= 31) { + downloadService.downloadExcelDayPlanStatistics(request, response, dto); } else { - throw new ServiceException("当前仅支持导出同一年内的统计数据,请修改日期范围。"); + throw new ServiceException("当前仅支持导出间隔31天内的统计数据,请修改日期范围。"); } }