|  | @@ -297,10 +297,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |  		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 | 
	
		
			
				|  |  |  		//如果当前用户只有教务老师角色,那么只能看到他所管理的课程组的信息
 | 
	
		
			
				|  |  | -		List<Integer> classGroupIds = null;
 | 
	
		
			
				|  |  | +		List<Long> classGroupIds = null;
 | 
	
		
			
				|  |  | +		Integer educationUserId = null;
 | 
	
		
			
				|  |  |  		if (userRole.size() == 1 && userRole.contains(SysUserRole.EDUCATIONAL_TEACHER)) {
 | 
	
		
			
				|  |  |  			//获取教务老师关联的班级列表
 | 
	
		
			
				|  |  |  			classGroupIds = classGroupDao.queryGroupClassGroupIds(sysUser.getId());
 | 
	
		
			
				|  |  | +			educationUserId = sysUser.getId();
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		if(IndexErrorType.MUSIC_PATROL.equals(errorType)){
 | 
	
	
		
			
				|  | @@ -309,11 +311,11 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			one.setDesc(IndexErrorType.MUSIC_PATROL.getMsg());
 | 
	
		
			
				|  |  |  			List<IndexErrInfoDto> oneChild = new ArrayList<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -			oneChild.add(new IndexErrInfoDto(IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE, IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE.getMsg(), indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds), null));
 | 
	
		
			
				|  |  | +			oneChild.add(new IndexErrInfoDto(IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE, IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE.getMsg(), indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds,educationUserId), null));
 | 
	
		
			
				|  |  |  			int errInspection = indexBaseMonthDataDao.queryErrInspection(organIds,startTime);
 | 
	
		
			
				|  |  |  			oneChild.add(new IndexErrInfoDto(IndexErrorType.MUSIC_PATROL_ITEM, IndexErrorType.MUSIC_PATROL_ITEM.getMsg(),errInspection, null));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -			IndexErrInfoDto noClassMusicGroupStudentInfo = indexBaseMonthDataDao.getNoClassMusicGroupStudentInfo(organIds);
 | 
	
		
			
				|  |  | +			IndexErrInfoDto noClassMusicGroupStudentInfo = indexBaseMonthDataDao.getNoClassMusicGroupStudentInfo(organIds,educationUserId);
 | 
	
		
			
				|  |  |  			noClassMusicGroupStudentInfo.setDesc(IndexErrorType.NO_CLASS_MUSIC_GROUP_STUDENT_INFO.getMsg());
 | 
	
		
			
				|  |  |  			oneChild.add(noClassMusicGroupStudentInfo);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -329,8 +331,8 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			two.setDesc(IndexErrorType.STUDENT_INFO.getMsg());
 | 
	
		
			
				|  |  |  			List<IndexErrInfoDto> twoChild = new ArrayList<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds), indexBaseMonthDataDao.getNoPaymentMusicGroup(organIds)));
 | 
	
		
			
				|  |  | -			List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds);
 | 
	
		
			
				|  |  | +			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds,educationUserId), Arrays.asList(educationUserId)));
 | 
	
		
			
				|  |  | +			List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds,educationUserId);
 | 
	
		
			
				|  |  |  			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP, IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP.getMsg(), quitGroupNum.size(),  quitGroupNum));
 | 
	
		
			
				|  |  |  //			int attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),startTime);
 | 
	
		
			
				|  |  |  //			twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TRUANT_STUDENT_NUM, IndexErrorType.COURSE_TRUANT_STUDENT_NUM.getMsg(), attendanceInfo, null));
 | 
	
	
		
			
				|  | @@ -360,7 +362,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  				userId = sysUser.getId();
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -			int courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds);
 | 
	
		
			
				|  |  | +			int courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
 | 
	
		
			
				|  |  |  			threeChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TIME_ERROR, IndexErrorType.COURSE_TIME_ERROR.getMsg(), courseTimeError, null));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			int inspectionItem = indexBaseMonthDataDao.queryInspectionItem(organIdsStr,startTime,userId);
 | 
	
	
		
			
				|  | @@ -386,7 +388,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime,classGroupIds);
 | 
	
		
			
				|  |  |  			fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError, null));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -			int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime);
 | 
	
		
			
				|  |  | +			int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds);
 | 
	
		
			
				|  |  |  			fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, IndexErrorType.TEACHER_NOT_A_CLASS.getMsg(), noAttendance, null));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			Map<String, Object> params = new HashMap<>();
 | 
	
	
		
			
				|  | @@ -449,9 +451,19 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		if(StringUtils.isNotBlank(organIdsStr)){
 | 
	
		
			
				|  |  |  			organIds = Arrays.stream(organIdsStr.split(",")).map(Integer::new).collect(Collectors.toSet());
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 | 
	
		
			
				|  |  | +		//如果当前用户只有教务老师角色,那么只能看到他所管理的课程组的信息
 | 
	
		
			
				|  |  | +		List<Long> classGroupIds = null;
 | 
	
		
			
				|  |  | +		Integer educationUserId = null;
 | 
	
		
			
				|  |  | +		if (userRole.size() == 1 && userRole.contains(SysUserRole.EDUCATIONAL_TEACHER)) {
 | 
	
		
			
				|  |  | +			//获取教务老师关联的班级列表
 | 
	
		
			
				|  |  | +			classGroupIds = classGroupDao.queryGroupClassGroupIds(sysUser.getId());
 | 
	
		
			
				|  |  | +			educationUserId = sysUser.getId();
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		Date date = new Date();
 | 
	
		
			
				|  |  |  		boolean flag1 = false;
 | 
	
		
			
				|  |  | -		int countLessThenThreeClassGroupNum = indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds);
 | 
	
		
			
				|  |  | +		int countLessThenThreeClassGroupNum = indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds,educationUserId);
 | 
	
		
			
				|  |  |  		if(countLessThenThreeClassGroupNum > 0){
 | 
	
		
			
				|  |  |  			flag1 = true;
 | 
	
		
			
				|  |  |  		}
 | 
	
	
		
			
				|  | @@ -462,7 +474,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag1){
 | 
	
		
			
				|  |  | -			IndexErrInfoDto noClassMusicGroupStudentInfo = indexBaseMonthDataDao.getNoClassMusicGroupStudentInfo(organIds);
 | 
	
		
			
				|  |  | +			IndexErrInfoDto noClassMusicGroupStudentInfo = indexBaseMonthDataDao.getNoClassMusicGroupStudentInfo(organIds,educationUserId);
 | 
	
		
			
				|  |  |  			if(Objects.nonNull(noClassMusicGroupStudentInfo) && noClassMusicGroupStudentInfo.getNum() > 0){
 | 
	
		
			
				|  |  |  				flag1 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
	
		
			
				|  | @@ -470,13 +482,13 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		resultMap.put("musicPatrol",flag1);
 | 
	
		
			
				|  |  |  		boolean flag2 = false;
 | 
	
		
			
				|  |  |  		if(!flag2){
 | 
	
		
			
				|  |  | -			int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds);
 | 
	
		
			
				|  |  | +			int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds,educationUserId);
 | 
	
		
			
				|  |  |  			if(countNoPaymentStudentNum > 0){
 | 
	
		
			
				|  |  |  				flag2 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag2){
 | 
	
		
			
				|  |  | -			List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds);
 | 
	
		
			
				|  |  | +			List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds,educationUserId);
 | 
	
		
			
				|  |  |  			if(quitGroupNum.size() > 0){
 | 
	
		
			
				|  |  |  				flag2 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
	
		
			
				|  | @@ -496,14 +508,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  				flag3 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 | 
	
		
			
				|  |  |  		Integer userId = null;
 | 
	
		
			
				|  |  |  		if (!userRole.contains(SysUserRole.SECTION_MANAGER) && !sysUser.getIsSuperAdmin()) {
 | 
	
		
			
				|  |  |  			userId = sysUser.getId();
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag3){
 | 
	
		
			
				|  |  | -			int courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds);
 | 
	
		
			
				|  |  | +			int courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
 | 
	
		
			
				|  |  |  			if(courseTimeError > 0){
 | 
	
		
			
				|  |  |  				flag3 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
	
		
			
				|  | @@ -530,13 +540,13 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		boolean flag4 = false;
 | 
	
		
			
				|  |  |  		if(!flag4){
 | 
	
		
			
				|  |  | -			int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime);
 | 
	
		
			
				|  |  | +			int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime,classGroupIds);
 | 
	
		
			
				|  |  |  			if(attendanceError > 0){
 | 
	
		
			
				|  |  |  				flag4 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag4){
 | 
	
		
			
				|  |  | -			int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime);
 | 
	
		
			
				|  |  | +			int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds);
 | 
	
		
			
				|  |  |  			if(noAttendance > 0){
 | 
	
		
			
				|  |  |  				flag4 = true;
 | 
	
		
			
				|  |  |  			}
 |