|
@@ -19,6 +19,7 @@ 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.ExamRecordInfo;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord.ExamRecordQuery;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord.ExamRecordQuery;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord.ExamStudentQuestionScoreInfo;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord.ExamStudentQuestionScoreInfo;
|
|
|
|
+import cn.com.qmth.examcloud.support.helper.IdentityNumberHelper;
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
import cn.com.qmth.examcloud.web.support.Naked;
|
|
import cn.com.qmth.examcloud.web.support.Naked;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -44,43 +45,51 @@ import java.util.List;
|
|
public class ExamRecordController extends ControllerSupport {
|
|
public class ExamRecordController extends ControllerSupport {
|
|
@Autowired
|
|
@Autowired
|
|
private ExamRecordService examRecordService;
|
|
private ExamRecordService examRecordService;
|
|
-
|
|
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private ExamRecordDataRepo examRecordDataRepo;
|
|
private ExamRecordDataRepo examRecordDataRepo;
|
|
-
|
|
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private ExamRecordForMarkingRepo examRecordForMarkingRepo;
|
|
private ExamRecordForMarkingRepo examRecordForMarkingRepo;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
@PostMapping("/waiting/audit/list")
|
|
@PostMapping("/waiting/audit/list")
|
|
@ApiOperation(value = "查询“监考待审”列表(分页)")
|
|
@ApiOperation(value = "查询“监考待审”列表(分页)")
|
|
public Page<ExamRecordInfo> getExamRecordWaitingAuditList(@RequestBody ExamRecordQuery query) {
|
|
public Page<ExamRecordInfo> getExamRecordWaitingAuditList(@RequestBody ExamRecordQuery query) {
|
|
- return examRecordService.getExamRecordWaitingAuditList(query);
|
|
|
|
|
|
+ Page<ExamRecordInfo> examRecordWaitingAuditList = examRecordService.getExamRecordWaitingAuditList(query);
|
|
|
|
+ examRecordWaitingAuditList.getContent().forEach(p -> {
|
|
|
|
+ p.setIdentityNumber(IdentityNumberHelper.conceal(p.getRootOrgId(), p.getIdentityNumber()));
|
|
|
|
+ });
|
|
|
|
+ return examRecordWaitingAuditList;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@PostMapping("/detail/check")
|
|
@PostMapping("/detail/check")
|
|
@ApiOperation(value = "查询“考试明细” 是否存在待审数据")
|
|
@ApiOperation(value = "查询“考试明细” 是否存在待审数据")
|
|
public Long existsWarnExamRecordDetail(@RequestBody ExamRecordQuery query) {
|
|
public Long existsWarnExamRecordDetail(@RequestBody ExamRecordQuery query) {
|
|
return examRecordService.existsWarnExamRecordDetail(query);
|
|
return examRecordService.existsWarnExamRecordDetail(query);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@PostMapping("/detail/list")
|
|
@PostMapping("/detail/list")
|
|
@ApiOperation(value = "查询“考试明细”列表(分页)")
|
|
@ApiOperation(value = "查询“考试明细”列表(分页)")
|
|
public Page<ExamRecordInfo> getExamRecordDetailList(@RequestBody ExamRecordQuery query) {
|
|
public Page<ExamRecordInfo> getExamRecordDetailList(@RequestBody ExamRecordQuery query) {
|
|
- Page<ExamRecordInfo> examRecordInfoPage = examRecordService.getExamRecordDetailListForPage(query);
|
|
|
|
- List<ExamRecordInfo> examRecordInfoList = examRecordInfoPage.getContent();
|
|
|
|
- if(examRecordInfoList!=null && examRecordInfoList.size() > 0){
|
|
|
|
- String examType = examRecordInfoList.get(0).getExamType();
|
|
|
|
- if(ExamType.OFFLINE.name() == examType){
|
|
|
|
- for(ExamRecordInfo examRecordInfo:examRecordInfoList){
|
|
|
|
- long examRecordDataId = examRecordInfo.getDataId();
|
|
|
|
- ExamRecordForMarkingEntity examRecordForMarkingEntity = examRecordForMarkingRepo.findByExamRecordDataId(examRecordDataId);
|
|
|
|
- if(examRecordForMarkingEntity!=null){
|
|
|
|
- examRecordInfo.setOfflineFileUrl(examRecordForMarkingEntity.getOfflineFileUrl());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ Page<ExamRecordInfo> examRecordInfoPage = examRecordService.getExamRecordDetailListForPage(query);
|
|
|
|
+ List<ExamRecordInfo> examRecordInfoList = examRecordInfoPage.getContent();
|
|
|
|
+ if (examRecordInfoList != null && examRecordInfoList.size() > 0) {
|
|
|
|
+ String examType = examRecordInfoList.get(0).getExamType();
|
|
|
|
+
|
|
|
|
+ for (ExamRecordInfo examRecordInfo : examRecordInfoList) {
|
|
|
|
+ examRecordInfo.setIdentityNumber((IdentityNumberHelper.conceal(examRecordInfo.getRootOrgId(),
|
|
|
|
+ examRecordInfo.getIdentityNumber())));
|
|
|
|
+
|
|
|
|
+ if (ExamType.OFFLINE.name() == examType) {
|
|
|
|
+ long examRecordDataId = examRecordInfo.getDataId();
|
|
|
|
+ ExamRecordForMarkingEntity examRecordForMarkingEntity = examRecordForMarkingRepo.findByExamRecordDataId(examRecordDataId);
|
|
|
|
+ if (examRecordForMarkingEntity != null) {
|
|
|
|
+ examRecordInfo.setOfflineFileUrl(examRecordForMarkingEntity.getOfflineFileUrl());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return examRecordInfoPage;
|
|
return examRecordInfoPage;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -92,7 +101,7 @@ public class ExamRecordController extends ControllerSupport {
|
|
Check.isNull(newQuery, "请求参数不能为空!");
|
|
Check.isNull(newQuery, "请求参数不能为空!");
|
|
Check.isNull(newQuery.getExamId(), "请先选择考试批次!");
|
|
Check.isNull(newQuery.getExamId(), "请先选择考试批次!");
|
|
List<ExamRecordInfo> examRecordInfoList = examRecordService.getExamRecordDetailList(newQuery);
|
|
List<ExamRecordInfo> examRecordInfoList = examRecordService.getExamRecordDetailList(newQuery);
|
|
- ExportUtils.exportEXCEL("考试明细列表", ExamRecordInfo.class,examRecordInfoList,response);
|
|
|
|
|
|
+ ExportUtils.exportEXCEL("考试明细列表", ExamRecordInfo.class, examRecordInfoList, response);
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/refresh/capture/statistic")
|
|
@PostMapping(value = "/refresh/capture/statistic")
|
|
@@ -112,17 +121,17 @@ public class ExamRecordController extends ControllerSupport {
|
|
|
|
|
|
@GetMapping("/select/byExamStudentId")
|
|
@GetMapping("/select/byExamStudentId")
|
|
@ApiOperation(value = "根据考生ID查询考试记录")
|
|
@ApiOperation(value = "根据考生ID查询考试记录")
|
|
- public List<ExamRecordDataEntity> getExamRecordByExamStudentId(@RequestParam Long examStudentId){
|
|
|
|
- List<ExamRecordDataEntity> examRecordEntityList = examRecordDataRepo.findByExamStudentId(examStudentId);
|
|
|
|
- return examRecordEntityList;
|
|
|
|
|
|
+ public List<ExamRecordDataEntity> getExamRecordByExamStudentId(@RequestParam Long examStudentId) {
|
|
|
|
+ List<ExamRecordDataEntity> examRecordEntityList = examRecordDataRepo.findByExamStudentId(examStudentId);
|
|
|
|
+ return examRecordEntityList;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@GetMapping("/detail/examStudentQuestionScoreList")
|
|
@GetMapping("/detail/examStudentQuestionScoreList")
|
|
@ApiOperation(value = "导出考生作答分数明细列表(Excel)", notes = "参数examId和examId必传")
|
|
@ApiOperation(value = "导出考生作答分数明细列表(Excel)", notes = "参数examId和examId必传")
|
|
- public void getExamStudentQuestionScoreList(@RequestParam Long examId,@RequestParam String courseCode, HttpServletResponse response) throws Exception {
|
|
|
|
|
|
+ public void getExamStudentQuestionScoreList(@RequestParam Long examId, @RequestParam String courseCode, HttpServletResponse response) throws Exception {
|
|
Check.isNull(examId, "考试id不能为空!");
|
|
Check.isNull(examId, "考试id不能为空!");
|
|
Check.isBlank(courseCode, "课程代码不能空!");
|
|
Check.isBlank(courseCode, "课程代码不能空!");
|
|
- List<ExamStudentQuestionScoreInfo> examRecordInfoList = examRecordService.getExamStudentQuestionScoreList(examId,courseCode);
|
|
|
|
- ExportUtils.exportEXCEL("考试明细列表", ExamStudentQuestionScoreInfo.class,examRecordInfoList,response);
|
|
|
|
|
|
+ List<ExamStudentQuestionScoreInfo> examRecordInfoList = examRecordService.getExamStudentQuestionScoreList(examId, courseCode);
|
|
|
|
+ ExportUtils.exportEXCEL("考试明细列表", ExamStudentQuestionScoreInfo.class, examRecordInfoList, response);
|
|
}
|
|
}
|
|
}
|
|
}
|