|  | @@ -1,6 +1,8 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.web.controller;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.EmployeeDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dto.*;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.Employee;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiImplicitParam;
 | 
	
	
		
			
				|  | @@ -8,6 +10,7 @@ import io.swagger.annotations.ApiImplicitParams;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import java.util.Arrays;
 | 
	
		
			
				|  |  |  import java.util.Date;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -50,6 +53,8 @@ public class ClassGroupController extends BaseController {
 | 
	
		
			
				|  |  |      private ClassGroupTeacherMapperService classGroupTeacherMapperService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private SysUserFeignService sysUserFeignService;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private EmployeeDao employeeDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "分页查询班级列表")
 | 
	
		
			
				|  |  |      @GetMapping("/queryPage")
 | 
	
	
		
			
				|  | @@ -284,6 +289,23 @@ public class ClassGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @GetMapping("/queryClassGroupPage")
 | 
	
		
			
				|  |  |      @PreAuthorize("@pcs.hasPermissions('classGroup/queryClassGroupPage')")
 | 
	
		
			
				|  |  |      public HttpResponseResult queryClassGroupPage(ClassGroupQueryInfo queryInfo) throws Exception {
 | 
	
		
			
				|  |  | +        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +        if (sysUser == null) {
 | 
	
		
			
				|  |  | +            return failed("用户信息获取失败");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(!sysUser.getIsSuperAdmin()){
 | 
	
		
			
				|  |  | +            Employee employee = employeeDao.get(sysUser.getId());
 | 
	
		
			
				|  |  | +            if (org.apache.commons.lang3.StringUtils.isEmpty(queryInfo.getOrganIdList())) {
 | 
	
		
			
				|  |  | +                queryInfo.setOrganIdList(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.getOrganIdList().split(",")))){
 | 
	
		
			
				|  |  | +                    return failed("非法请求");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          return succeed(classGroupService.queryClassGroupPage(queryInfo));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |