|  | @@ -9,9 +9,11 @@ import com.keao.edu.user.api.entity.ExamRoom;
 | 
	
		
			
				|  |  |  import com.keao.edu.user.dto.ExamRoomDto;
 | 
	
		
			
				|  |  |  import com.keao.edu.user.dto.ExamRoomStatisticsDto;
 | 
	
		
			
				|  |  |  import com.keao.edu.user.entity.Employee;
 | 
	
		
			
				|  |  | +import com.keao.edu.user.entity.Teacher;
 | 
	
		
			
				|  |  |  import com.keao.edu.user.page.ExamRoomQueryInfo;
 | 
	
		
			
				|  |  |  import com.keao.edu.user.service.EmployeeService;
 | 
	
		
			
				|  |  |  import com.keao.edu.user.service.ExamRoomService;
 | 
	
		
			
				|  |  | +import com.keao.edu.user.service.TeacherService;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
	
		
			
				|  | @@ -31,17 +33,19 @@ public class ExamRoomController extends BaseController {
 | 
	
		
			
				|  |  |      private SysUserFeignService sysUserFeignService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private EmployeeService employeeService;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private TeacherService teacherService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation("分页查询监考列表")
 | 
	
		
			
				|  |  |      @GetMapping(value = "/list")
 | 
	
		
			
				|  |  |      public HttpResponseResult<PageInfo<ExamRoomDto>> getList(ExamRoomQueryInfo queryInfo) {
 | 
	
		
			
				|  |  |          SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(!sysUser.getIsSuperAdmin()&&Objects.isNull(queryInfo.getOrganId())){
 | 
	
		
			
				|  |  | -            Employee employee = employeeService.get(sysUser.getId());
 | 
	
		
			
				|  |  | -            if(Objects.isNull(employee)){
 | 
	
		
			
				|  |  | +        if(!sysUser.getIsSuperAdmin() && Objects.isNull(queryInfo.getOrganId())){
 | 
	
		
			
				|  |  | +            Teacher teacher = teacherService.get(sysUser.getId());
 | 
	
		
			
				|  |  | +            if(Objects.isNull(teacher)){
 | 
	
		
			
				|  |  |                  return failed("用户信息异常");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            queryInfo.setOrganId(employee.getOrganId());
 | 
	
		
			
				|  |  | +            queryInfo.setOrganId(teacher.getOrganId());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return succeed(examRoomService.queryExamRoomPage(queryInfo));
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -110,6 +114,16 @@ public class ExamRoomController extends BaseController {
 | 
	
		
			
				|  |  |          return succeed(examRoomService.updateExamRoom(examRoom));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @ApiOperation("教室状态变更")
 | 
	
		
			
				|  |  | +    @PostMapping(value = "/openExamRoom")
 | 
	
		
			
				|  |  | +    public HttpResponseResult<ExamRoom> openExamRoom(Long examRoomId,Integer openFlag){
 | 
	
		
			
				|  |  | +        ExamRoom examRoom = new ExamRoom();
 | 
	
		
			
				|  |  | +        examRoom.setId(examRoomId);
 | 
	
		
			
				|  |  | +        examRoom.setOpenFlag(openFlag);
 | 
	
		
			
				|  |  | +        examRoomService.update(examRoom);
 | 
	
		
			
				|  |  | +        return succeed();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @ApiOperation("删除教室")
 | 
	
		
			
				|  |  |      @PostMapping(value = "/deleteExamRooms")
 | 
	
		
			
				|  |  |      public HttpResponseResult deleteExamRooms(String examRoomIds){
 |