|  | @@ -3,7 +3,9 @@ package com.keao.edu.user.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import com.keao.edu.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.keao.edu.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  | +import com.keao.edu.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.keao.edu.common.dal.BaseDAO;
 | 
	
		
			
				|  |  | +import com.keao.edu.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  |  import com.keao.edu.common.entity.SysConfig;
 | 
	
		
			
				|  |  |  import com.keao.edu.common.enums.MessageTypeEnum;
 | 
	
		
			
				|  |  |  import com.keao.edu.common.exception.BizException;
 | 
	
	
		
			
				|  | @@ -304,7 +306,7 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
 | 
	
		
			
				|  |  |              throw new BizException("学员报名信息不存在");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (!StudentRegistrationStatusEnum.AUDIT_WAIT.equals(er.getStatus())) {
 | 
	
		
			
				|  |  | -            throw new BizException("审核状态错误");
 | 
	
		
			
				|  |  | +            throw new BizException("此学员已审核");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (!StudentRegistrationStatusEnum.AUDIT_PASS.equals(status)
 | 
	
		
			
				|  |  |                  && !StudentRegistrationStatusEnum.AUDIT_REJECT.equals(status)) {
 | 
	
	
		
			
				|  | @@ -339,6 +341,31 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | +    public HttpResponseResult updateExamAllRegistStatus(Long examId, StudentRegistrationStatusEnum status, String memo) {
 | 
	
		
			
				|  |  | +        if (Objects.isNull(examId)) {
 | 
	
		
			
				|  |  | +            throw new BizException("请指定考级项目");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        ExaminationBasic examinationBasic = examinationBasicDao.get(examId);
 | 
	
		
			
				|  |  | +        if(Objects.isNull(examinationBasic)){
 | 
	
		
			
				|  |  | +            throw new BizException("考级项目不存在");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(ExamStatusEnum.RESULT_CONFIRM.equals(examinationBasic)){
 | 
	
		
			
				|  |  | +            throw new BizException("考级项目结果以确定");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (!StudentRegistrationStatusEnum.AUDIT_PASS.equals(status)
 | 
	
		
			
				|  |  | +                && !StudentRegistrationStatusEnum.AUDIT_REJECT.equals(status)) {
 | 
	
		
			
				|  |  | +            throw new BizException("审核状态错误");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        int i = examRegistrationDao.updateRegistStatusByExam(examId, status, memo);
 | 
	
		
			
				|  |  | +        if(i>0){
 | 
	
		
			
				|  |  | +            return BaseController.succeedMsg("审核成功");
 | 
	
		
			
				|  |  | +        }else{
 | 
	
		
			
				|  |  | +            return BaseController.failed("暂无待审核学员");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
 | 
	
		
			
				|  |  |      public void updateExamRegistration(ExamRegistration examRegistration) {
 | 
	
		
			
				|  |  |          if (Objects.isNull(examRegistration.getId())) {
 | 
	
		
			
				|  |  |              throw new BizException("学员报名信息有误");
 | 
	
	
		
			
				|  | @@ -347,6 +374,13 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
 | 
	
		
			
				|  |  |          if (Objects.isNull(er)) {
 | 
	
		
			
				|  |  |              throw new BizException("学员报名信息有误");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        ExaminationBasic examinationBasic = examinationBasicDao.lockExam(er.getExaminationBasicId());
 | 
	
		
			
				|  |  | +        if(Objects.isNull(examinationBasic)){
 | 
	
		
			
				|  |  | +            throw new BizException("考级信息错误");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(ExamStatusEnum.RESULT_CONFIRM.equals(examinationBasic.getStatus())){
 | 
	
		
			
				|  |  | +            throw new BizException("本次考级已结束");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          if (er.getStudentId().equals(examRegistration.getStudentId())) {
 | 
	
		
			
				|  |  |              examRegistration.setStatus(StudentRegistrationStatusEnum.AUDIT_WAIT);
 | 
	
		
			
				|  |  |          } else {
 |