|  | @@ -18,6 +18,7 @@ import com.ym.mec.biz.dal.page.TeacherServeHomeworkQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.ExtracurricularExercisesReplyService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.ExtracurricularExercisesService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.StudentExtracurricularExercisesSituationService;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.service.SysUserService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.page.PageInfo;
 | 
	
	
		
			
				|  | @@ -48,25 +49,18 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private StudentExtracurricularExercisesSituationService studentExtracurricularExercisesSituationService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    private SysUserFeignService sysUserFeignService;
 | 
	
		
			
				|  |  | +    private SysUserService sysUserService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private StudentRegistrationDao studentRegistrationDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private ClassGroupStudentMapperDao classGroupStudentMapperDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    private StudentDao studentDao;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  |      private SubjectDao subjectDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取教师有服务指标的课程列表")
 | 
	
		
			
				|  |  |      @GetMapping("/queryTeacherServeHomeworkDetail")
 | 
	
		
			
				|  |  |      public HttpResponseResult queryTeacherServeHomeworkDetail(TeacherServeHomeworkQueryInfo queryInfo) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setTeacherId(sysUser.getId());
 | 
	
		
			
				|  |  | +        queryInfo.setTeacherId(sysUserService.getUserId());
 | 
	
		
			
				|  |  |          return succeed(studentExtracurricularExercisesSituationService.queryTeacherServeHomeworkDetail1(queryInfo));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -74,22 +68,14 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取教师有服务指标的课程列表")
 | 
	
		
			
				|  |  |      @GetMapping("/queryTeacherServeHomeworkDetail/v2")
 | 
	
		
			
				|  |  |      public HttpResponseResult<PageInfo<CourseHomeworkWrapper.CourseHomeworkList>> queryTeacherServeHomeworkDetailV2(CourseHomeworkWrapper.CourseHomeworkQuery queryInfo) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setTeacherId(sysUser.getId());
 | 
	
		
			
				|  |  | +        queryInfo.setTeacherId(sysUserService.getUserId());
 | 
	
		
			
				|  |  |          return succeed(studentExtracurricularExercisesSituationService.queryTeacherServeHomeworkDetailV2(queryInfo));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取教师课外作业列表")
 | 
	
		
			
				|  |  |      @GetMapping("/queryTeacherExtraHomeworkDetail/v2")
 | 
	
		
			
				|  |  |      public HttpResponseResult<PageInfo<CourseHomeworkWrapper.CourseHomeworkList>> queryTeacherExtraHomeworkDetailV2(CourseHomeworkWrapper.CourseHomeworkQuery queryInfo) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setTeacherId(sysUser.getId());
 | 
	
		
			
				|  |  | +        queryInfo.setTeacherId(sysUserService.getUserId());
 | 
	
		
			
				|  |  |          return succeed(studentExtracurricularExercisesSituationService.queryTeacherExtraHomeworkDetailV2(queryInfo));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -97,11 +83,7 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取老师训练统计")
 | 
	
		
			
				|  |  |      @GetMapping("/getStatistics")
 | 
	
		
			
				|  |  |      public HttpResponseResult getStatistics(ExtraExercilseQueryInfo queryInfo) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null) {
 | 
	
		
			
				|  |  | -            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setTeacherId(sysUser.getId());
 | 
	
		
			
				|  |  | +        queryInfo.setTeacherId(sysUserService.getUserId());
 | 
	
		
			
				|  |  |          return succeed(studentExtracurricularExercisesSituationService.getStatistics(queryInfo));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -115,11 +97,7 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |      @PostMapping("/createExtraExercises")
 | 
	
		
			
				|  |  |      @AuditLogAnnotation(operateName = "创建课外训练")
 | 
	
		
			
				|  |  |      private HttpResponseResult createExtraExercises(ExtracurricularExercises exercises){
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(Objects.isNull(sysUser)){
 | 
	
		
			
				|  |  | -            return failed(HttpStatus.FORBIDDEN,"请登录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        exercises.setTeacherId(sysUser.getId());
 | 
	
		
			
				|  |  | +        exercises.setTeacherId(sysUserService.getUserId());
 | 
	
		
			
				|  |  |          exercises.setGroupType(ELessonTrainingType.EXTRACURRICULAR.getCode());
 | 
	
		
			
				|  |  |          extracurricularExercisesService.createExtraExercises(exercises);
 | 
	
		
			
				|  |  |          return succeed();
 | 
	
	
		
			
				|  | @@ -129,17 +107,13 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |      @PostMapping("/createExtraExercisesForJson")
 | 
	
		
			
				|  |  |      @AuditLogAnnotation(operateName = "创建课外训练")
 | 
	
		
			
				|  |  |      private HttpResponseResult createExtraExercisesForJson(@RequestBody ExtracurricularExercises exercises){
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(Objects.isNull(sysUser)){
 | 
	
		
			
				|  |  | -            return failed(HttpStatus.FORBIDDEN,"请登录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          if(null == exercises.getExpireDate()){
 | 
	
		
			
				|  |  |              Calendar instance = Calendar.getInstance();
 | 
	
		
			
				|  |  |              instance.add(Calendar.WEEK_OF_MONTH,1);
 | 
	
		
			
				|  |  |              exercises.setExpireDate(instance.getTime());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        exercises.setTeacherId(sysUser.getId());
 | 
	
		
			
				|  |  | +        exercises.setTeacherId(sysUserService.getUserId());
 | 
	
		
			
				|  |  |          extracurricularExercisesService.createExtraExercises(exercises);
 | 
	
		
			
				|  |  |          return succeed();
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -147,22 +121,14 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取课外训练列表")
 | 
	
		
			
				|  |  |      @GetMapping("/findExtraExercilses")
 | 
	
		
			
				|  |  |      private HttpResponseResult findExtraExercilses(ExtraExercilseQueryInfo queryInfo){
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(Objects.isNull(sysUser)){
 | 
	
		
			
				|  |  | -            return failed(HttpStatus.FORBIDDEN,"请登录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setTeacherId(sysUser.getId());
 | 
	
		
			
				|  |  | +        queryInfo.setTeacherId(sysUserService.getUserId());
 | 
	
		
			
				|  |  |          return succeed(extracurricularExercisesService.findExtraExercilses(queryInfo));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取已布置训练列表(包含课后,课外)")
 | 
	
		
			
				|  |  |      @GetMapping("/findExtraExercilsesHomeworks")
 | 
	
		
			
				|  |  |      private HttpResponseResult findExtraExercilsesHomeworks(ExtraExercilseQueryInfo queryInfo){
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(Objects.isNull(sysUser)){
 | 
	
		
			
				|  |  | -            return failed(HttpStatus.FORBIDDEN,"请登录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setTeacherId(sysUser.getId());
 | 
	
		
			
				|  |  | +        queryInfo.setTeacherId(sysUserService.getUserId());
 | 
	
		
			
				|  |  |          return succeed(extracurricularExercisesService.findExtraExercilsesHomeworks(queryInfo));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -178,21 +144,13 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取待布置学员列表")
 | 
	
		
			
				|  |  |      @GetMapping("/getDontServeStudents")
 | 
	
		
			
				|  |  |      public HttpResponseResult getDontServeStudents(String search, String musicGroupId, Long classGroupId, Integer subjectId,Integer hasMember,String studentIds){
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(Objects.isNull(sysUser)){
 | 
	
		
			
				|  |  | -            return failed(HttpStatus.FORBIDDEN,"请登录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        return succeed(extracurricularExercisesService.getDontServeStudents(sysUser.getId(), search, musicGroupId, classGroupId, subjectId,hasMember,studentIds));
 | 
	
		
			
				|  |  | +        return succeed(extracurricularExercisesService.getDontServeStudents(sysUserService.getUserId(), search, musicGroupId, classGroupId, subjectId,hasMember,studentIds));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取待布置学员乐团列表")
 | 
	
		
			
				|  |  |      @GetMapping("/getDontServeStudentMusicGroups")
 | 
	
		
			
				|  |  |      public HttpResponseResult getDontServeStudentMusicGroups(String search){
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(Objects.isNull(sysUser)){
 | 
	
		
			
				|  |  | -            return failed(HttpStatus.FORBIDDEN,"请登录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        List<BasicUserDto> dontServeStudents = extracurricularExercisesService.getDontServeStudents(sysUser.getId(), search, null, null,null,null,null);
 | 
	
		
			
				|  |  | +        List<BasicUserDto> dontServeStudents = extracurricularExercisesService.getDontServeStudents(sysUserService.getUserId(), search, null, null,null,null,null);
 | 
	
		
			
				|  |  |          if(CollectionUtils.isEmpty(dontServeStudents)){
 | 
	
		
			
				|  |  |              return succeed(Collections.emptyList());
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -204,12 +162,9 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "获取服务学员查询条件")
 | 
	
		
			
				|  |  |      @GetMapping("/getDontServeStudentQueryCondition")
 | 
	
		
			
				|  |  |      public HttpResponseResult getDontServeStudentQueryCondition(String musicGroupId){
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(Objects.isNull(sysUser)){
 | 
	
		
			
				|  |  | -            return failed(HttpStatus.FORBIDDEN,"请登录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          Map<String, Object> result = new HashMap<>();
 | 
	
		
			
				|  |  | -        List<BasicUserDto> dontServeStudents = extracurricularExercisesService.getDontServeStudents(sysUser.getId(), null, musicGroupId, null, null,null,null);
 | 
	
		
			
				|  |  | +        Integer userId = sysUserService.getUserId();
 | 
	
		
			
				|  |  | +        List<BasicUserDto> dontServeStudents = extracurricularExercisesService.getDontServeStudents(userId, null, musicGroupId, null, null,null,null);
 | 
	
		
			
				|  |  |          if(CollectionUtils.isEmpty(dontServeStudents)){
 | 
	
		
			
				|  |  |              result.put("musicGroups", Collections.emptyList());
 | 
	
		
			
				|  |  |              result.put("classGroups", Collections.emptyList());
 | 
	
	
		
			
				|  | @@ -220,7 +175,7 @@ public class ExtracurricularExercisesController extends BaseController {
 | 
	
		
			
				|  |  |          List<MusicGroup> studentNormalMusicGroups = studentRegistrationDao.getStudentNormalMusicGroups(studentIds);
 | 
	
		
			
				|  |  |          result.put("musicGroups", studentNormalMusicGroups);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        List<ClassGroup> classGroups = classGroupStudentMapperDao.getStudentClassGroupWithTeacher(studentIds, sysUser.getId(), musicGroupId);
 | 
	
		
			
				|  |  | +        List<ClassGroup> classGroups = classGroupStudentMapperDao.getStudentClassGroupWithTeacher(studentIds, userId, musicGroupId);
 | 
	
		
			
				|  |  |          result.put("classGroups", classGroups);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  //        List<Subject> studentSubjects = studentDao.getStudentSubjects(studentIds);
 |