|
@@ -14,6 +14,8 @@ import com.qmth.themis.business.enums.RoleEnum;
|
|
import com.qmth.themis.business.enums.TaskStatusEnum;
|
|
import com.qmth.themis.business.enums.TaskStatusEnum;
|
|
import com.qmth.themis.business.service.*;
|
|
import com.qmth.themis.business.service.*;
|
|
import com.qmth.themis.business.templete.service.TempleteLogicService;
|
|
import com.qmth.themis.business.templete.service.TempleteLogicService;
|
|
|
|
+import com.qmth.themis.common.exception.BusinessException;
|
|
|
|
+
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
@@ -296,6 +298,9 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
|
|
* @param createId
|
|
* @param createId
|
|
*/
|
|
*/
|
|
public void dataVerify(Long examId,String userName, String roomCode, String roomName, Long orgId, Long createId) {
|
|
public void dataVerify(Long examId,String userName, String roomCode, String roomName, Long orgId, Long createId) {
|
|
|
|
+ if(!checkRoomCodeExist(examId, roomCode, orgId)) {
|
|
|
|
+ throw new BusinessException("考场代码 "+roomCode+" 不存在");
|
|
|
|
+ }
|
|
if (Objects.nonNull(userName)) {
|
|
if (Objects.nonNull(userName)) {
|
|
//先查询监考帐号是否存在
|
|
//先查询监考帐号是否存在
|
|
QueryWrapper<TBUser> tbUserQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<TBUser> tbUserQueryWrapper = new QueryWrapper<>();
|
|
@@ -333,6 +338,19 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private boolean checkRoomCodeExist(Long examId,String roomCode,Long orgId) {
|
|
|
|
+ QueryWrapper<TBExamInvigilateUser> tbExamInvigilateUserQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ tbExamInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getOrgId, orgId)
|
|
|
|
+ .eq(TBExamInvigilateUser::getRoomCode, roomCode)
|
|
|
|
+ .eq(TBExamInvigilateUser::getExamId, examId);
|
|
|
|
+ int c = tbExamInvigilateUserService.count(tbExamInvigilateUserQueryWrapper);
|
|
|
|
+ if(c==0) {
|
|
|
|
+ return true;
|
|
|
|
+ }else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 导入换算进度
|
|
* 导入换算进度
|