| | |
| | | |
| | | // 当年第一周需满足四天。(例:2022年的第一周是从1月3号开始的,1号和2号并入到2021年度的最后一周里) |
| | | WeekFields wfs = WeekFields.of(DayOfWeek.MONDAY, 4); |
| | | // 取得前一周的周五 |
| | | LocalDate localDate = LocalDate.now().with(wfs.dayOfWeek(), 5L).minusDays(7); |
| | | // 取得当周的周一 |
| | | LocalDate localDate = LocalDate.now().with(wfs.dayOfWeek(), 1L); |
| | | |
| | | int year = localDate.get(wfs.weekBasedYear()); |
| | | int weeks = localDate.get(wfs.weekOfWeekBasedYear()); |
| | | int year = localDate.minusDays(7).get(wfs.weekBasedYear()); |
| | | int weeks = localDate.minusDays(7).get(wfs.weekOfWeekBasedYear()); |
| | | |
| | | projectProgressService.autoGenerateProjectProcess(localDate, year, weeks); |
| | | } |