| | |
| | | |
| | | |
| | | /** |
| | | * 定时任务,每个月1号的00:00:00 |
| | | * 定时任务,每个月1号的00:00:00给下一个月排班 |
| | | * 给每个人都进行排班(默认早班) |
| | | */ |
| | | //@Scheduled(cron = "0 0 0 1 *?") |
| | | @Scheduled(cron = "0 0 0 1 * ?") |
| | | //@Scheduled(cron = "0/20 * * * * ?") |
| | | private void timerCreateSchedule(){ |
| | | System.out.println("开始给每个人进行排班,默认早班======start"); |
| | |
| | | performanceShiftAddDto.setUserId(userIds); |
| | | //周次--当月所有 |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | LocalDate today = LocalDate.now().plusMonths(1); |
| | | // 获取本月的第一天和最后一天 |
| | | LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth()); |
| | | LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth()); |