From bf8fafcf455f201123905c804b41c3c231b4cbd8 Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期四, 17 十月 2024 10:04:27 +0800 Subject: [PATCH] statistic workload change --- pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportSv.java | 28 ---------------------------- 1 files changed, 0 insertions(+), 28 deletions(-) diff --git a/pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportSv.java b/pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportSv.java index 7fd3d85..663fe40 100644 --- a/pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportSv.java +++ b/pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportSv.java @@ -143,32 +143,4 @@ } return map.values().stream().collect(Collectors.toList()); } - - public void test() { - - //OthStatisticWorkloadMapper workloadMapper = SpringContextUtil.getBean(OthStatisticWorkloadMapper.class); - //鎵惧埌鏈�澶т竴鏉℃棩鏈熻褰� - Date maxDate = workloadDao.selectMaxDate(); - //寰�鍚庡惊鐜ぉ鏁版眹鎬� - if (maxDate != null) { - //寰幆缁熻 - LocalDate firstDay = maxDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - LocalDate today = LocalDate.now(); - LocalDate nextDate = firstDay.plusDays(1); - //today 瑕佺粺璁� firstday涓嶇粺璁� - long daysBetween = ChronoUnit.DAYS.between(firstDay, today); - if (daysBetween > 30) { - daysBetween = 30; - nextDate = firstDay.plusDays(daysBetween); - } - for (int i = 1; i <= daysBetween; i++) { - Date startDt = Date.from(LocalDateTime.of(nextDate, LocalTime.of(0, 0, 0)).atZone(ZoneId.systemDefault()).toInstant()); - Date endDt = Date.from(LocalDateTime.of(nextDate, LocalTime.of(23, 59, 59)).atZone(ZoneId.systemDefault()).toInstant()); - workloadDao.insertBatch(startDt, endDt); - nextDate = firstDay.plusDays(i); - } - } - } - - } -- Gitblit v1.8.0