|  | @@ -1,17 +1,22 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.web.controller.education;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.dto.MusicScoreQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.EmployeeDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.Employee;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.TenantConfig;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.enums.ClientTypeEnum;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.SysMusicScoreAccompanimentService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.SysMusicScoreCategoriesService;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.service.TenantConfigService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import org.apache.commons.lang.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.GetMapping;
 | 
	
	
		
			
				|  | @@ -33,6 +38,9 @@ public class EduMusicScoreController extends BaseController {
 | 
	
		
			
				|  |  |      private SysUserFeignService sysUserFeignService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private EmployeeDao employeeDao;
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private TenantConfigService tenantConfigService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "树状列表")
 | 
	
		
			
				|  |  |      @GetMapping("/queryTree")
 | 
	
	
		
			
				|  | @@ -41,19 +49,10 @@ public class EduMusicScoreController extends BaseController {
 | 
	
		
			
				|  |  |          if (sysUser == null) {
 | 
	
		
			
				|  |  |              return failed("用户信息获取失败");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        Employee employee = employeeDao.get(sysUser.getId());
 | 
	
		
			
				|  |  | -        if (org.apache.commons.lang3.StringUtils.isEmpty(queryInfo.getOrganId())) {
 | 
	
		
			
				|  |  | -            queryInfo.setOrganId(employee.getOrganIdList());
 | 
	
		
			
				|  |  | -        }else if(org.apache.commons.lang3.StringUtils.isEmpty(employee.getOrganIdList())){
 | 
	
		
			
				|  |  | -            return failed("用户所在分部异常");
 | 
	
		
			
				|  |  | -        }else {
 | 
	
		
			
				|  |  | -            List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
 | 
	
		
			
				|  |  | -            if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
 | 
	
		
			
				|  |  | -                return failed("非法请求");
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setEnable(true);
 | 
	
		
			
				|  |  | -        return succeed(sysMusicScoreCategoriesService.queryTree(queryInfo));
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  | +        TenantConfig tenantConfig = tenantConfigService.getOne(new QueryWrapper<TenantConfig>().eq("tenant_id_", sysUser.getTenantId()));
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  | +        return succeed(sysMusicScoreCategoriesService.queryCategoriesTreeList(tenantConfig.getTeachingMaterialId()));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "分页查询")
 |