| | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | |
| | | |
| | | //剩余课时 |
| | | Integer laveClassHours = coursePackageOrderStudent.getLaveClassHours(); |
| | | //扣除课时数 |
| | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | //假期开始使用当前时间为起始时间进行排课 |
| | | calendar.setTime(startTime.getTime() > System.currentTimeMillis() ? startTime : new Date()); |
| | | int day_week = calendar.get(Calendar.DAY_OF_WEEK); |
| | | day_week = day_week - 1 == 0 ? 7 : day_week - 1; |
| | | int num = 8 - day_week + 7; |
| | | for (int i = 0; i < num; i++) { |
| | | calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) + 1); |
| | | while (true) { |
| | | Date time = calendar.getTime(); |
| | | |
| | | //判断当天是否在排课星期内 |
| | |
| | | } |
| | | |
| | | //大于有效期不进行排课 |
| | | if (calendar.getTimeInMillis() >= endTime.getTime()) { |
| | | if (calendar.getTimeInMillis() > endTime.getTime()) { |
| | | break; |
| | | } |
| | | for (int j = 0; j < split.length; j++) { |