| | |
| | | import com.dsh.course.entity.TCoursePackage; |
| | | import com.dsh.course.mapper.CoursePackageSchedulingMapper; |
| | | import com.dsh.course.model.QueryCoursePackageSchedulingList; |
| | | import com.dsh.course.model.vo.response.AppUserVideoResponse; |
| | | import com.dsh.course.service.CoursePackageStudentService; |
| | | import com.dsh.course.service.ICoursePackageSchedulingService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | for (Map<String, Object> map : list) { |
| | | Long id = Long.valueOf(map.get("id").toString()); |
| | | int count = coursePackageStudentService.count(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", id).eq("reservationStatus", 1)); |
| | | map.put("registered", count); |
| | | int count1 = coursePackageStudentService.count(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", id).eq("signInOrNot", 1)); |
| | | // map.put("registered", count); |
| | | int count1 = coursePackageStudentService.count(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", id).eq("reservationStatus", 1)); |
| | | int count2 = coursePackageStudentService.count(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", id).eq("reservationStatus", 0)); |
| | | map.put("registered", count2); |
| | | map.put("actualArrival", count1); |
| | | map.put("nonArrival", count - count1); |
| | | // Integer totalClassHours = (Integer) map.get("totalClassHours"); |
| | | // Integer laveClassHours = (Integer) map.get("laveClassHours"); |
| | | // map.put("already",totalClassHours-laveClassHours); |
| | | |
| | | |
| | | } |
| | | return list; |
| | | } |
| | |
| | | } |
| | | }).start(); |
| | | } |
| | | |
| | | @Override |
| | | public List<AppUserVideoResponse> queryAll(List<Long> longs) { |
| | | |
| | | if (longs.size()>0) { |
| | | List<AppUserVideoResponse> appUserVideoResponses = this.baseMapper.queryAll(longs); |
| | | |
| | | for (AppUserVideoResponse appUserVideoRespon : appUserVideoResponses) { |
| | | if (appUserVideoRespon.getVideoId() != null) { |
| | | if (this.baseMapper.isHave(appUserVideoRespon.getVideoId()) > 0) { |
| | | appUserVideoRespon.setStudyStatus(2); |
| | | } else { |
| | | appUserVideoRespon.setStudyStatus(1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return appUserVideoResponses; |
| | | |
| | | }else return null; |
| | | |
| | | } |
| | | } |