|  | @@ -1,5 +1,8 @@
 | 
	
		
			
				|  |  |  package com.keao.edu.user.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | +import com.keao.edu.auth.api.client.SysMessageFeignService;
 | 
	
		
			
				|  |  | +import com.keao.edu.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.keao.edu.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.keao.edu.common.dal.BaseDAO;
 | 
	
		
			
				|  |  |  import com.keao.edu.common.enums.YesOrNoEnum;
 | 
	
	
		
			
				|  | @@ -57,6 +60,10 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 | 
	
		
			
				|  |  |  	private ExamTeacherSalaryService examTeacherSalaryService;
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private ImFeignService imFeignService;
 | 
	
		
			
				|  |  | +	@Autowired
 | 
	
		
			
				|  |  | +	private SysUserFeignService sysUserFeignService;
 | 
	
		
			
				|  |  | +	@Autowired
 | 
	
		
			
				|  |  | +	private SysMessageFeignService sysMessageFeignService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	public BaseDAO<Long, ExamRoomStudentRelation> getDAO() {
 | 
	
	
		
			
				|  | @@ -265,7 +272,8 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  | -	public void nextBit(Long nextExamRoomStudentRelationId, Long currentExamRoomStudentRelationId, Integer examStatus) {
 | 
	
		
			
				|  |  | +	public void nextBit(Long nextExamRoomStudentRelationId, Long currentExamRoomStudentRelationId, Integer examStatus,Long examRoomId) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  		if(currentExamRoomStudentRelationId != null){
 | 
	
		
			
				|  |  |  			ExamRoomStudentRelation examRoomStudentRelation = examRoomStudentRelationDao.get(currentExamRoomStudentRelationId);
 | 
	
		
			
				|  |  |  			Long roomId = examRoomStudentRelation.getExamRoomId();
 | 
	
	
		
			
				|  | @@ -291,7 +299,9 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		try {
 | 
	
		
			
				|  |  | -			WebSocketServer.sendInfo(null,null);
 | 
	
		
			
				|  |  | +			SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +			String message = JSONObject.toJSONString(this.queryNeedCheckingList(examRoomId));
 | 
	
		
			
				|  |  | +			WebSocketServer.sendInfo(message,sysUser.getId().toString());
 | 
	
		
			
				|  |  |  		} catch (IOException e) {
 | 
	
		
			
				|  |  |  			e.printStackTrace();
 | 
	
		
			
				|  |  |  		}
 | 
	
	
		
			
				|  | @@ -315,8 +325,11 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	@Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -	public void signIn(Long examRegistrationId) {
 | 
	
		
			
				|  |  | +	public synchronized void signIn(Long examRegistrationId) {
 | 
	
		
			
				|  |  |  		ExamRoomStudentRelation studentExamRoom = examRoomStudentRelationDao.getStudentExamRoom(examRegistrationId);
 | 
	
		
			
				|  |  | +		if(studentExamRoom.getSignInTime() != null){
 | 
	
		
			
				|  |  | +			throw new BizException("您已签到,请勿重复操作!");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		studentExamRoom.setSignInTime(new Date());
 | 
	
		
			
				|  |  |  		examRoomStudentRelationDao.update(studentExamRoom);
 | 
	
		
			
				|  |  |  	}
 |