|  | @@ -4,12 +4,14 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dto.BasicUserDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentSubjectDto;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.CourseScheduleEvaluate;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.ImGroupNoticeQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.ClassGroupService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.CourseScheduleEvaluateService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.ImGroupNoticeService;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.service.SubjectService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
	
		
			
				|  | @@ -17,10 +19,14 @@ import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.http.HttpStatus;
 | 
	
		
			
				|  |  | +import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  | +import java.util.Map;
 | 
	
		
			
				|  |  |  import java.util.Objects;
 | 
	
		
			
				|  |  | +import java.util.Set;
 | 
	
		
			
				|  |  | +import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * @Author Joburgess
 | 
	
	
		
			
				|  | @@ -42,6 +48,9 @@ public class ClassGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private SubjectService subjectService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @ApiOperation(value = "教师关联班级获取")
 | 
	
		
			
				|  |  |      @GetMapping("/findTeacherClassGroups")
 | 
	
		
			
				|  |  |      public Object findTeacherClassGroups(String type,String status, String groupName){
 | 
	
	
		
			
				|  | @@ -63,7 +72,24 @@ public class ClassGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取课程学员列表")
 | 
	
		
			
				|  |  |      @GetMapping("/getCourseStudents")
 | 
	
		
			
				|  |  |      public HttpResponseResult<List<BasicUserDto>> getCourseStudents(Long courseScheduleId){
 | 
	
		
			
				|  |  | -        return succeed(courseScheduleStudentPaymentDao.getCourseStudents(courseScheduleId));
 | 
	
		
			
				|  |  | +        List<BasicUserDto> courseStudents = courseScheduleStudentPaymentDao.getCourseStudents(courseScheduleId);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 乐团声部为空,取student的声部
 | 
	
		
			
				|  |  | +        if (!CollectionUtils.isEmpty(courseStudents)) {
 | 
	
		
			
				|  |  | +            Set<Long> collect = courseStudents.stream().map(o -> o.getUserId()).map(o -> o.longValue()).collect(Collectors.toSet());
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            Map<Integer, StudentSubjectDto> subjectDtoMap = subjectService.getSubjectByStudentId(collect);
 | 
	
		
			
				|  |  | +            courseStudents.forEach(studentAttendanceViewDto -> {
 | 
	
		
			
				|  |  | +                if (studentAttendanceViewDto.getSubjectId() == null) {
 | 
	
		
			
				|  |  | +                    StudentSubjectDto subjectDto = subjectDtoMap.getOrDefault(studentAttendanceViewDto.getUserId(), new StudentSubjectDto());
 | 
	
		
			
				|  |  | +                    if (subjectDto.getSubjectId() != null) {
 | 
	
		
			
				|  |  | +                        studentAttendanceViewDto.setSubjectName(subjectDto.getSubjectName());
 | 
	
		
			
				|  |  | +                        studentAttendanceViewDto.setSubjectId(subjectDto.getSubjectId());
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return succeed();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "提交陪练报告")
 |