|  | @@ -22,6 +22,7 @@ import com.ym.mec.common.tenant.TenantContextHolder;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.collection.MapUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import io.swagger.models.auth.In;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.http.HttpStatus;
 | 
	
	
		
			
				|  | @@ -46,7 +47,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private IndexBaseMonthDataDao indexBaseMonthDataDao;
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  | -	private OrganizationDao organizationDao;
 | 
	
		
			
				|  |  | +	private OrganizationService organizationService;
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private EmployeeDao employeeDao;
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
	
		
			
				|  | @@ -89,7 +90,6 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		List<IndexBaseDto> result = new ArrayList<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		LocalDate nowDate = LocalDate.now();
 | 
	
		
			
				|  |  | -//		Date currentMonth = Date.from(nowDate.atStartOfDay(DateUtil.zoneId).toInstant());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		LocalDate startDate = nowDate.plusDays(-30);
 | 
	
		
			
				|  |  |  		if(Objects.nonNull(queryInfo.getStartDate())){
 | 
	
	
		
			
				|  | @@ -329,7 +329,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  	public void indexBaseDataTask(Integer tenantId, String dayStr, Set<IndexDataType> dataTypes) {
 | 
	
		
			
				|  |  |  		LocalDate nowDate = LocalDate.now();
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  | -		List<Organization> allOrgans = organizationDao.findAllOrgans(tenantId);
 | 
	
		
			
				|  |  | +		List<Organization> allOrgans = organizationService.findAllOrgans(tenantId);
 | 
	
		
			
				|  |  |  		if(CollectionUtils.isEmpty(this.organIds.get())){
 | 
	
		
			
				|  |  |  			this.organIds.get().clear();
 | 
	
		
			
				|  |  |  			this.organIds.get().addAll(allOrgans.stream().map(Organization::getId).collect(Collectors.toSet()));
 | 
	
	
		
			
				|  | @@ -608,22 +608,20 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  | -	public Map<String, Object> getIndexErrData(String organIdsStr, IndexErrorType errorType) {
 | 
	
		
			
				|  |  | +	public Map<String, Object> getIndexErrData(Integer organId, IndexErrorType errorType) {
 | 
	
		
			
				|  |  |  		Integer tenantId = TenantContextHolder.getTenantId();
 | 
	
		
			
				|  |  |  		//只筛选指定时间之后的数据
 | 
	
		
			
				|  |  |  		String startTime = DateUtil.format(DateUtil.getFirstDayOfMonth(DateUtil.addMonths(new Date(), -2)),DateUtil.ISO_EXPANDED_DATE_FORMAT);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		Set<Integer> organIds = null;
 | 
	
		
			
				|  |  | -		if(StringUtils.isNotBlank(organIdsStr)){
 | 
	
		
			
				|  |  | -			organIds = Arrays.stream(organIdsStr.split(",")).map(Integer::new).collect(Collectors.toSet());
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | +		Set<Integer> organIds = new HashSet<>();
 | 
	
		
			
				|  |  | +		organIds.add(organId);
 | 
	
		
			
				|  |  |  		List<IndexErrInfoDto> all = new ArrayList<>();
 | 
	
		
			
				|  |  |  		SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 | 
	
		
			
				|  |  |  		//如果当前用户只有教务老师角色,那么只能看到他所管理的课程组的信息
 | 
	
		
			
				|  |  |  		List<Long> classGroupIds = null;
 | 
	
		
			
				|  |  |  		Integer educationUserId = null;
 | 
	
		
			
				|  |  | -		if (!sysUser.getIsSuperAdmin() && userRole.size() == 1 && userRole.contains(SysUserRole.EDUCATIONAL_TEACHER)) {
 | 
	
		
			
				|  |  | +		SysUserRoleEnum userRoleEnum = organizationService.getOrganRole(organId, sysUser.getId());
 | 
	
		
			
				|  |  | +		if (!sysUser.getIsSuperAdmin() && userRoleEnum == SysUserRoleEnum.EDUCATIONAL_TEACHER) {
 | 
	
		
			
				|  |  |  			//获取教务老师关联的班级列表
 | 
	
		
			
				|  |  |  			classGroupIds = classGroupDao.queryGroupClassGroupIds(sysUser.getId());
 | 
	
		
			
				|  |  |  			educationUserId = sysUser.getId();
 | 
	
	
		
			
				|  | @@ -676,7 +674,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP, IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP.getMsg(), quitGroupNum.size(),  quitGroupNum));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//乐团学员会员到期首页提醒
 | 
	
		
			
				|  |  | -			List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryMemberEndAutoQuitMusic(null,educationUserId,organIdsStr);
 | 
	
		
			
				|  |  | +			List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryMemberEndAutoQuitMusic(null,educationUserId,organId.toString());
 | 
	
		
			
				|  |  |  			IndexErrInfoDto noClassMusicGroupStudentInfo = new IndexErrInfoDto();
 | 
	
		
			
				|  |  |  			Set<String> musicGroupIds = studentRegistrations.stream().map(e -> e.getMusicGroupId()).collect(Collectors.toSet());
 | 
	
		
			
				|  |  |  			Set<Integer> userIds = studentRegistrations.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
 | 
	
	
		
			
				|  | @@ -703,20 +701,20 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//课程时间安排异常
 | 
	
		
			
				|  |  |  			Integer userId = null;
 | 
	
		
			
				|  |  | -			if (!userRole.contains(SysUserRole.SECTION_MANAGER) && !sysUser.getIsSuperAdmin()) {
 | 
	
		
			
				|  |  | +			if (userRoleEnum != SysUserRoleEnum.SECTION_MANAGER && !sysUser.getIsSuperAdmin()) {
 | 
	
		
			
				|  |  |  				userId = sysUser.getId();
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//乐团巡查任务未计划
 | 
	
		
			
				|  |  | -			int inspectionItem = indexBaseMonthDataDao.queryInspectionItem(organIdsStr,startTime,userId,tenantId);
 | 
	
		
			
				|  |  | +			int inspectionItem = indexBaseMonthDataDao.queryInspectionItem(organId.toString(),startTime,userId,tenantId);
 | 
	
		
			
				|  |  |  			threeChild.add(new IndexErrInfoDto(IndexErrorType.INSPECTION_ITEM, IndexErrorType.INSPECTION_ITEM.getMsg(),inspectionItem, null));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//乐团巡查任务未提交
 | 
	
		
			
				|  |  | -			int inspectionItemPlan = indexBaseMonthDataDao.queryInspectionItemPlan(organIdsStr,startTime,tenantId);
 | 
	
		
			
				|  |  | +			int inspectionItemPlan = indexBaseMonthDataDao.queryInspectionItemPlan(organId.toString(),startTime,tenantId);
 | 
	
		
			
				|  |  |  			threeChild.add(new IndexErrInfoDto(IndexErrorType.INSPECTION_ITEM_PLAN, IndexErrorType.INSPECTION_ITEM_PLAN.getMsg(),inspectionItemPlan, null));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//回访任务未完成
 | 
	
		
			
				|  |  | -			int studentVisit = indexBaseMonthDataDao.queryStudentVisit(organIdsStr,startTime,userId,tenantId);
 | 
	
		
			
				|  |  | +			int studentVisit = indexBaseMonthDataDao.queryStudentVisit(organId.toString(),startTime,userId,tenantId);
 | 
	
		
			
				|  |  |  			threeChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_VISIT, IndexErrorType.STUDENT_VISIT.getMsg(),studentVisit, null));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			three.setNum(threeChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
 | 
	
	
		
			
				|  | @@ -789,7 +787,6 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		Date date = new Date();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		List<IndexErrInfoDto> all = new ArrayList<>();
 | 
	
		
			
				|  |  |  		SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |  		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 | 
	
		
			
				|  |  |  		//如果当前用户只有教务老师角色,那么只能看到他所管理的课程组的信息
 | 
	
	
		
			
				|  | @@ -875,17 +872,13 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			teacherExpectSalaryBeLowMap = MapUtil.mapListToMap(teacherExpectSalaryBeLowMapList, Integer.class, Integer.class);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//课程时间安排异常
 | 
	
		
			
				|  |  | -			Integer userId = null;
 | 
	
		
			
				|  |  | -			if (!userRole.contains(SysUserRole.SECTION_MANAGER) && !sysUser.getIsSuperAdmin()) {
 | 
	
		
			
				|  |  | -				userId = sysUser.getId();
 | 
	
		
			
				|  |  | -			}
 | 
	
		
			
				|  |  |  			if(classGroupIds == null || classGroupIds.size() > 0){
 | 
	
		
			
				|  |  |  				List<Map<Integer, Integer>> courseTimeErrorMapList = indexBaseMonthDataDao.getOrganCourseTimeError(organIds, classGroupIds);
 | 
	
		
			
				|  |  |  				courseTimeErrorMap = MapUtil.mapListToMap(courseTimeErrorMapList, Integer.class, Integer.class);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//乐团巡查任务未计划
 | 
	
		
			
				|  |  | -			List<Map<Integer, Integer>> inspectionItemMapList = indexBaseMonthDataDao.queryOrganInspectionItem(organIdsStr, startTime, userId, tenantId);
 | 
	
		
			
				|  |  | +			List<Map<Integer, Integer>> inspectionItemMapList = indexBaseMonthDataDao.queryOrganInspectionItem(organIdsStr, startTime, null, tenantId);
 | 
	
		
			
				|  |  |  			inspectionItemMap = MapUtil.mapListToMap(inspectionItemMapList, Integer.class, Integer.class);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//乐团巡查任务未提交
 | 
	
	
		
			
				|  | @@ -893,7 +886,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			inspectionItemPlanMap = MapUtil.mapListToMap(inspectionItemPlanMapList, Integer.class, Integer.class);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			//回访任务未完成
 | 
	
		
			
				|  |  | -			List<Map<Integer, Integer>> studentVisitMapList = indexBaseMonthDataDao.queryOrganStudentVisit(organIdsStr, startTime, userId, tenantId);
 | 
	
		
			
				|  |  | +			List<Map<Integer, Integer>> studentVisitMapList = indexBaseMonthDataDao.queryOrganStudentVisit(organIdsStr, startTime, null, tenantId);
 | 
	
		
			
				|  |  |  			studentVisitMap = MapUtil.mapListToMap(studentVisitMapList, Integer.class, Integer.class);
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -924,7 +917,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			teacherServeErrorMap = MapUtil.mapListToMap(teacherServeErrorMapList, Integer.class, Integer.class);
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		List<Organization> organs = organizationDao.findOrgans(new ArrayList<>(organIds));
 | 
	
		
			
				|  |  | +		List<Organization> organs = organizationService.findOrgans(new ArrayList<>(organIds),tenantId);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		IndexErrorDataExportDto totalData = new IndexErrorDataExportDto();
 | 
	
		
			
				|  |  |  		totalData.setOrganName("总计");
 | 
	
	
		
			
				|  | @@ -1034,21 +1027,19 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  | -	public List<IndexErrInfoDto> getRemindMatterData(String organIds,Integer tenantId) {
 | 
	
		
			
				|  |  | +	public List<IndexErrInfoDto> getRemindMatterData(Integer organId) {
 | 
	
		
			
				|  |  |  		SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |  		if (sysUser == null) {
 | 
	
		
			
				|  |  |  			throw new BizException("用户信息获取失败");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		Integer tenantId = TenantContextHolder.getTenantId();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		Set<Integer> organIdSet = null;
 | 
	
		
			
				|  |  | -		if(StringUtils.isNotBlank(organIds)){
 | 
	
		
			
				|  |  | -			organIdSet = Arrays.stream(organIds.split(",")).map(Integer::new).collect(Collectors.toSet());
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +		Set<Integer> organIdSet = new HashSet<>();
 | 
	
		
			
				|  |  | +		organIdSet.add(organId);
 | 
	
		
			
				|  |  |  		//当前用户是否是分部经理
 | 
	
		
			
				|  |  | -		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 | 
	
		
			
				|  |  | +		SysUserRoleEnum organRole = organizationService.getOrganRole(organId, sysUser.getId());
 | 
	
		
			
				|  |  |  		Integer educationUserId = null;
 | 
	
		
			
				|  |  | -		if (!sysUser.getIsSuperAdmin() && userRole.size() == 1 && userRole.contains(SysUserRole.EDUCATIONAL_TEACHER)) {
 | 
	
		
			
				|  |  | +		if (!sysUser.getIsSuperAdmin() && organRole != SysUserRoleEnum.SECTION_MANAGER) {
 | 
	
		
			
				|  |  |  			//获取教务老师关联的班级列表
 | 
	
		
			
				|  |  |  			educationUserId = sysUser.getId();
 | 
	
		
			
				|  |  |  		}
 | 
	
	
		
			
				|  | @@ -1056,40 +1047,21 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		List<IndexErrInfoDto> result = new ArrayList<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		IndexErrInfoDto indexErrInfoDto = new IndexErrInfoDto();
 | 
	
		
			
				|  |  | -		indexErrInfoDto.setErrorType(WAIT_CREATE_PAYMENT_CALENDER);
 | 
	
		
			
				|  |  | -		indexErrInfoDto.setDesc(WAIT_CREATE_PAYMENT_CALENDER.getMsg());
 | 
	
		
			
				|  |  | -		String configValue1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.PUSH_CREATE_PAYMENT_CALENDER, tenantId);
 | 
	
		
			
				|  |  | -		if(StringUtils.isNotEmpty(configValue1)){
 | 
	
		
			
				|  |  | -			//获取关联的乐团列表
 | 
	
		
			
				|  |  | -			List<String> musicGroupIds = musicGroupDao.queryIdsByEduIdAndOrganIds(educationUserId,organIds,tenantId);
 | 
	
		
			
				|  |  | -			String format = DateUtil.format(date, DateUtil.DEFAULT_PATTERN);
 | 
	
		
			
				|  |  | -			if(musicGroupIds.size() > 0){
 | 
	
		
			
				|  |  | -				List<Long> calenderIds = musicGroupPaymentCalenderDao.queryEndIds(configValue1, format,musicGroupIds);
 | 
	
		
			
				|  |  | -				if(calenderIds.size() > 0){
 | 
	
		
			
				|  |  | -					List<String> musicGroupIdList = musicGroupPaymentCalenderDao.queryMusicGroupIds(calenderIds);
 | 
	
		
			
				|  |  | -					indexErrInfoDto.setResult(musicGroupIdList);
 | 
	
		
			
				|  |  | -					indexErrInfoDto.setNum(musicGroupIdList.size());
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | -			}
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -		result.add(indexErrInfoDto);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  		//未缴费学员数
 | 
	
		
			
				|  |  |  		result.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIdSet,educationUserId, 1, tenantId), Arrays.asList(educationUserId)));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
 | 
	
		
			
				|  |  |  		//全职未离职老师
 | 
	
		
			
				|  |  |  		//预计课酬较低
 | 
	
		
			
				|  |  | -		int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIds,monthStr, tenantId);
 | 
	
		
			
				|  |  | +		int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organId.toString(),monthStr, tenantId);
 | 
	
		
			
				|  |  |  		result.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW, IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW.getMsg(),lowTeacherSalary, null));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		//乐团学员会员即将到期首页提醒
 | 
	
		
			
				|  |  | -		String configValue = sysConfigDao.findConfigValue(SysConfigService.PUSH_MEMBER_RENEW_QUIT);
 | 
	
		
			
				|  |  | -		if(StringUtils.isEmpty(configValue)){
 | 
	
		
			
				|  |  | +		String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.PUSH_MEMBER_RENEW_QUIT,tenantId);
 | 
	
		
			
				|  |  | +		if (StringUtils.isEmpty(configValue)) {
 | 
	
		
			
				|  |  |  			configValue = "15";
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryMemberEndAutoQuitMusic(configValue,educationUserId,organIds);
 | 
	
		
			
				|  |  | +		List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryMemberEndAutoQuitMusic(configValue,educationUserId,organId.toString());
 | 
	
		
			
				|  |  |  		Set<String> musicGroupIdList = studentRegistrations.stream().map(e -> e.getMusicGroupId()).collect(Collectors.toSet());
 | 
	
		
			
				|  |  |  		Set<Integer> userIds = studentRegistrations.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
 | 
	
		
			
				|  |  |  		IndexErrInfoDto infoDto = new IndexErrInfoDto();
 | 
	
	
		
			
				|  | @@ -1100,7 +1072,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		result.add(infoDto);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		//乐团展演计划提醒
 | 
	
		
			
				|  |  | -		List<MusicGroupPerformance> musicGroupPerformances = musicGroupPerformanceDao.findNoStart(educationUserId,organIds);
 | 
	
		
			
				|  |  | +		List<MusicGroupPerformance> musicGroupPerformances = musicGroupPerformanceDao.findNoStart(educationUserId,organId.toString());
 | 
	
		
			
				|  |  |  		IndexErrInfoDto infoDto1 = new IndexErrInfoDto();
 | 
	
		
			
				|  |  |  		infoDto1.setErrorType(IndexErrorType.MUSIC_GROUP_PERFORMANCE);
 | 
	
		
			
				|  |  |  		infoDto1.setNum(musicGroupPerformances.stream().map(e -> e.getMusicGroupId()).collect(Collectors.toSet()).size());
 | 
	
	
		
			
				|  | @@ -1111,21 +1083,19 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  | -	public Map<String,Boolean> hasIndexErrData(String organIdsStr) {
 | 
	
		
			
				|  |  | +	public Map<String,Boolean> hasIndexErrData(Integer organId) {
 | 
	
		
			
				|  |  |  		Integer tenantId = TenantContextHolder.getTenantId();
 | 
	
		
			
				|  |  |  		String startTime = DateUtil.format(DateUtil.getFirstDayOfMonth(DateUtil.addMonths(new Date(), -2)),DateUtil.ISO_EXPANDED_DATE_FORMAT);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		Map<String,Boolean> resultMap = new HashMap<>();
 | 
	
		
			
				|  |  | -		Set<Integer> organIds = null;
 | 
	
		
			
				|  |  | -		if(StringUtils.isNotBlank(organIdsStr)){
 | 
	
		
			
				|  |  | -			organIds = Arrays.stream(organIdsStr.split(",")).map(Integer::new).collect(Collectors.toSet());
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | +		Set<Integer> organIds = new HashSet<>();
 | 
	
		
			
				|  |  | +		organIds.add(organId);
 | 
	
		
			
				|  |  |  		SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 | 
	
		
			
				|  |  | +		SysUserRoleEnum organRole = organizationService.getOrganRole(organId, sysUser.getId());
 | 
	
		
			
				|  |  |  		//如果当前用户只有教务老师角色,那么只能看到他所管理的课程组的信息
 | 
	
		
			
				|  |  |  		List<Long> classGroupIds = null;
 | 
	
		
			
				|  |  |  		Integer educationUserId = null;
 | 
	
		
			
				|  |  | -		if (!sysUser.getIsSuperAdmin() && userRole.size() == 1 && userRole.contains(SysUserRole.EDUCATIONAL_TEACHER)) {
 | 
	
		
			
				|  |  | +		if (!sysUser.getIsSuperAdmin() && organRole == SysUserRoleEnum.EDUCATIONAL_TEACHER) {
 | 
	
		
			
				|  |  |  			//获取教务老师关联的班级列表
 | 
	
		
			
				|  |  |  			classGroupIds = classGroupDao.queryGroupClassGroupIds(sysUser.getId());
 | 
	
		
			
				|  |  |  			educationUserId = sysUser.getId();
 | 
	
	
		
			
				|  | @@ -1176,11 +1146,11 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag2){
 | 
	
		
			
				|  |  | -			String configValue = sysConfigDao.findConfigValue(SysConfigService.PUSH_MEMBER_RENEW_QUIT);
 | 
	
		
			
				|  |  | -			if(StringUtils.isEmpty(configValue)){
 | 
	
		
			
				|  |  | +			String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.PUSH_MEMBER_RENEW_QUIT,tenantId);
 | 
	
		
			
				|  |  | +			if (StringUtils.isEmpty(configValue)) {
 | 
	
		
			
				|  |  |  				configValue = "15";
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | -			List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryMemberEndAutoQuitMusic(configValue,educationUserId,organIdsStr);
 | 
	
		
			
				|  |  | +			List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryMemberEndAutoQuitMusic(configValue,educationUserId,organId.toString());
 | 
	
		
			
				|  |  |  			if(studentRegistrations.size() > 0){
 | 
	
		
			
				|  |  |  				flag2 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
	
		
			
				|  | @@ -1190,24 +1160,24 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		boolean flag3 = false;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		Integer userId = null;
 | 
	
		
			
				|  |  | -		if (!userRole.contains(SysUserRole.SECTION_MANAGER) && !sysUser.getIsSuperAdmin()) {
 | 
	
		
			
				|  |  | +		if (organRole != SysUserRoleEnum.SECTION_MANAGER && !sysUser.getIsSuperAdmin()) {
 | 
	
		
			
				|  |  |  			userId = sysUser.getId();
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		if(!flag3){
 | 
	
		
			
				|  |  | -			int inspectionItem = indexBaseMonthDataDao.queryInspectionItem(organIdsStr,startTime,userId, tenantId);
 | 
	
		
			
				|  |  | +			int inspectionItem = indexBaseMonthDataDao.queryInspectionItem(organId.toString(),startTime,userId, tenantId);
 | 
	
		
			
				|  |  |  			if(inspectionItem > 0){
 | 
	
		
			
				|  |  |  				flag3 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag3){
 | 
	
		
			
				|  |  | -			int inspectionItemPlan = indexBaseMonthDataDao.queryInspectionItemPlan(organIdsStr,startTime, tenantId);
 | 
	
		
			
				|  |  | +			int inspectionItemPlan = indexBaseMonthDataDao.queryInspectionItemPlan(organId.toString(),startTime, tenantId);
 | 
	
		
			
				|  |  |  			if(inspectionItemPlan > 0){
 | 
	
		
			
				|  |  |  				flag3 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag3){
 | 
	
		
			
				|  |  | -			int studentVisit = indexBaseMonthDataDao.queryStudentVisit(organIdsStr,startTime,userId, tenantId);
 | 
	
		
			
				|  |  | +			int studentVisit = indexBaseMonthDataDao.queryStudentVisit(organId.toString(),startTime,userId, tenantId);
 | 
	
		
			
				|  |  |  			if(studentVisit > 0){
 | 
	
		
			
				|  |  |  				flag3 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
	
		
			
				|  | @@ -1267,7 +1237,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		boolean flag5 = false;
 | 
	
		
			
				|  |  |  		if(!flag5){
 | 
	
		
			
				|  |  |  			String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
 | 
	
		
			
				|  |  | -			int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIdsStr,monthStr, tenantId);
 | 
	
		
			
				|  |  | +			int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organId.toString(),monthStr, tenantId);
 | 
	
		
			
				|  |  |  			if(lowTeacherSalary > 0){
 | 
	
		
			
				|  |  |  				flag5 = true;
 | 
	
		
			
				|  |  |  			}
 | 
	
	
		
			
				|  | @@ -1280,7 +1250,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag5){
 | 
	
		
			
				|  |  |  			//获取关联的乐团列表
 | 
	
		
			
				|  |  | -			List<String> musicGroupIds = musicGroupDao.queryIdsByEduIdAndOrganIds(educationUserId,organIdsStr,tenantId);
 | 
	
		
			
				|  |  | +			List<String> musicGroupIds = musicGroupDao.queryIdsByEduIdAndOrganIds(educationUserId,organId.toString(),tenantId);
 | 
	
		
			
				|  |  |  			if(musicGroupIds.size() > 0){
 | 
	
		
			
				|  |  |  				String configValue1 = sysConfigDao.findConfigValue("push_create_payment_calender");
 | 
	
		
			
				|  |  |  				date = new Date();
 | 
	
	
		
			
				|  | @@ -1293,7 +1263,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(!flag5){
 | 
	
		
			
				|  |  |  			if(!flag5){
 | 
	
		
			
				|  |  | -				List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryMemberEndAutoQuitMusic(null,educationUserId,organIdsStr);
 | 
	
		
			
				|  |  | +				List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryMemberEndAutoQuitMusic(null,educationUserId,organId.toString());
 | 
	
		
			
				|  |  |  				if(studentRegistrations.size() > 0){
 | 
	
		
			
				|  |  |  					flag5 = true;
 | 
	
		
			
				|  |  |  				}
 | 
	
	
		
			
				|  | @@ -1307,7 +1277,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	public PageInfo<EduOrganStudentDataDto> organStudentOverView(List<Integer> organIds, OrganCloudStudyStudentDataQueryInfo queryInfo) {
 | 
	
		
			
				|  |  |  		PageInfo<EduOrganStudentDataDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 | 
	
		
			
				|  |  | -		List<Organization> organs = organizationDao.getOrgans(organIds, queryInfo.getTenantId());
 | 
	
		
			
				|  |  | +		List<Organization> organs = organizationService.findOrgans(organIds, queryInfo.getTenantId());
 | 
	
		
			
				|  |  |  		pageInfo.setTotal(organs.size());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		if(CollectionUtils.isEmpty(organs)){
 |