|
@@ -7,6 +7,21 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.core.oe.admin.api.controller;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
import cn.com.qmth.examcloud.api.commons.enums.ExamType;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.base.utils.Check;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.base.utils.JsonMapper;
|
|
@@ -15,6 +30,7 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordForMarkingRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordForMarkingEntity;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.service.ExamCaptureService;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordService;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord.ExamRecordInfo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord.ExamRecordQuery;
|
|
@@ -25,14 +41,6 @@ import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
import cn.com.qmth.examcloud.web.support.Naked;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.data.domain.Page;
|
|
|
-import org.springframework.http.HttpStatus;
|
|
|
-import org.springframework.http.ResponseEntity;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 考试记录相关接口
|
|
@@ -49,7 +57,9 @@ public class ExamRecordController extends ControllerSupport {
|
|
|
|
|
|
@Autowired
|
|
|
private ExamRecordDataRepo examRecordDataRepo;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private ExamCaptureService examCaptureService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ExamRecordForMarkingRepo examRecordForMarkingRepo;
|
|
|
|
|
@@ -61,6 +71,16 @@ public class ExamRecordController extends ControllerSupport {
|
|
|
examRecordWaitingAuditList.getContent().forEach(p -> {
|
|
|
p.setIdentityNumber(IdentityNumberHelper.conceal(p.getRootOrgId(), p.getIdentityNumber()));
|
|
|
});
|
|
|
+ List<ExamRecordInfo> examRecordInfoList=examRecordWaitingAuditList.getContent();
|
|
|
+ if (examRecordInfoList != null && examRecordInfoList.size() > 0) {
|
|
|
+ String examType = examRecordInfoList.get(0).getExamType();
|
|
|
+
|
|
|
+ for (ExamRecordInfo examRecordInfo : examRecordInfoList) {
|
|
|
+ if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
|
|
|
+ examRecordInfo.setVirtualCameraNames(examCaptureService.getVirtualCameraNames(examRecordInfo.getDataId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return examRecordWaitingAuditList;
|
|
|
}
|
|
|
|
|
@@ -90,6 +110,9 @@ public class ExamRecordController extends ControllerSupport {
|
|
|
FileStorageUtil.realPath(examRecordForMarkingEntity.getOfflineFileUrl()));
|
|
|
}
|
|
|
}
|
|
|
+ if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
|
|
|
+ examRecordInfo.setVirtualCameraNames(examCaptureService.getVirtualCameraNames(examRecordInfo.getDataId()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return examRecordInfoPage;
|
|
@@ -103,6 +126,15 @@ public class ExamRecordController extends ControllerSupport {
|
|
|
Check.isNull(newQuery, "请求参数不能为空!");
|
|
|
Check.isNull(newQuery.getExamId(), "请先选择考试批次!");
|
|
|
List<ExamRecordInfo> examRecordInfoList = examRecordService.getExamRecordDetailList(newQuery);
|
|
|
+ if (examRecordInfoList != null && examRecordInfoList.size() > 0) {
|
|
|
+ String examType = examRecordInfoList.get(0).getExamType();
|
|
|
+
|
|
|
+ for (ExamRecordInfo examRecordInfo : examRecordInfoList) {
|
|
|
+ if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
|
|
|
+ examRecordInfo.setVirtualCameraNames(examCaptureService.getVirtualCameraNames(examRecordInfo.getDataId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
ExportUtils.exportEXCEL("考试明细列表", ExamRecordInfo.class, examRecordInfoList, response);
|
|
|
}
|
|
|
|