| | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | |
| | | |
| | | //剩余课时 |
| | | Integer laveClassHours = coursePackageOrderStudent.getLaveClassHours(); |
| | | //扣除课时数 |
| | |
| | | continue; |
| | | } |
| | | |
| | | |
| | | //大于有效期不进行排课 |
| | | if (calendar.getTimeInMillis() >= validity.getTime()) { |
| | | break; |
| | | } |
| | | |
| | | //检查是否有体验购课 |
| | | int count = coursePackageSchedulingService.count(new QueryWrapper<CoursePackageScheduling>() |
| | | .eq("type", 3) |
| | | .eq("appUserId", userId) |
| | | .eq("studentId", sId) |
| | | .eq("coursePackageId", tCoursePackage.getId()) |
| | | .eq("status", 1) |
| | | .eq("DATE_FORMAT(classDate, '%Y-%m-%d')", format.format(time)) |
| | | ); |
| | | //有体验购课,不进行排课 |
| | | if(count != 0){ |
| | | calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) + 1); |
| | | continue; |
| | | } |
| | | |
| | | for (int j = 0; j < split.length; j++) { |
| | | //剩余数量不足以排课 |
| | | if (laveClassHours.compareTo(codeTime) < 0) { |