|
@@ -1272,19 +1272,22 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
@Override
|
|
|
public List<ExportCetVo> exportCetData(ExportCetMarkingQueryVo query) {
|
|
|
if (query.getExamId() == null) {
|
|
|
- throw new ParameterException("examId不能为空");
|
|
|
+ throw new StatusException("examId不能为空");
|
|
|
}
|
|
|
ExamEntity exam = examService.getById(query.getExamId());
|
|
|
if (exam == null) {
|
|
|
- throw new ParameterException("未找到考试");
|
|
|
+ throw new StatusException("未找到考试");
|
|
|
}
|
|
|
List<String> paperTypeBarcodeContents = markSiteService
|
|
|
.findPaperTypeBarcodeContentByExamAndSubjectCode(query.getExamId(), query.getSubjectCode());
|
|
|
- if (CollectionUtils.isEmpty(paperTypeBarcodeContents)) {
|
|
|
- throw new ParameterException("该科目条码值未设置");
|
|
|
+ int subjectCodeVal = Integer.valueOf(query.getSubjectCode());
|
|
|
+ if (subjectCodeVal <= 2) {
|
|
|
+ if (CollectionUtils.isEmpty(paperTypeBarcodeContents)) {
|
|
|
+ throw new StatusException("该科目条码值未设置");
|
|
|
+ }
|
|
|
}
|
|
|
if (!ExamMode.CET.equals(exam.getMode())) {
|
|
|
- throw new ParameterException("该考试不是CET");
|
|
|
+ throw new StatusException("该考试不是CET");
|
|
|
}
|
|
|
IPage<ExportCetVo> iPage = baseMapper
|
|
|
.listCetMarkingPage(new Page<ExportCetVo>(query.getPageNumber(), query.getPageSize()), query);
|