|
@@ -26,6 +26,7 @@ import java.util.stream.Collectors;
|
|
|
import javax.persistence.EntityManager;
|
|
|
import javax.persistence.Query;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamListReq;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.hibernate.query.NativeQuery;
|
|
|
import org.hibernate.transform.Transformers;
|
|
@@ -345,26 +346,9 @@ public class ExamStudentServiceImpl implements ExamStudentService {
|
|
|
|
|
|
@Override
|
|
|
public List<OnHandExamInfo> queryOnlineExamEndList(Long studentId, ExamType examType) {
|
|
|
- StudentCacheBean studentBean = CacheHelper.getStudent(studentId);
|
|
|
-
|
|
|
- //获取可以考的和即将考的考试Id
|
|
|
- GetOngoingExamListReq getOngoingExamListReq = new GetOngoingExamListReq();
|
|
|
- getOngoingExamListReq.setExamType(examType.name());
|
|
|
- getOngoingExamListReq.setRootOrgId(studentBean.getRootOrgId());
|
|
|
- getOngoingExamListReq.setOrgId(studentBean.getOrgId());
|
|
|
- getOngoingExamListReq.setStudentId(studentId);
|
|
|
- GetOngoingExamListResp getOngoingExamListResp = examCloudService.getOngoingExamList(getOngoingExamListReq);
|
|
|
-
|
|
|
- //获取学生所在组织机构的所有考试列表集合
|
|
|
- List<ExamSpecialSettingsBean> examSpecialSettingsBeanList = getOngoingExamListResp.getExamSpecialSettingsList();
|
|
|
- if (examSpecialSettingsBeanList == null || examSpecialSettingsBeanList.size() == 0) {
|
|
|
- return null;
|
|
|
- }
|
|
|
- List<Long> examIds = examSpecialSettingsBeanList.stream().map(ExamSpecialSettingsBean::getExamId).collect(Collectors.toList());
|
|
|
-
|
|
|
//只查没有禁用的考生
|
|
|
List<ExamStudentEntity> examStudents =
|
|
|
- examStudentRepo.findByStudentIdAndEnableAndExamIdIn(studentId, true, examIds);
|
|
|
+ examStudentRepo.findByStudentIdAndEnable(studentId, true);
|
|
|
|
|
|
List<OnHandExamInfo> examStudentDtoList = new ArrayList<OnHandExamInfo>();
|
|
|
Date now = new Date();
|