|
@@ -2,7 +2,6 @@ package cn.com.qmth.scancentral.service.impl;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
-import cn.com.qmth.scancentral.service.*;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -29,12 +28,21 @@ import cn.com.qmth.scancentral.entity.SubjectEntity;
|
|
import cn.com.qmth.scancentral.enums.CheckStatus;
|
|
import cn.com.qmth.scancentral.enums.CheckStatus;
|
|
import cn.com.qmth.scancentral.enums.ExamMode;
|
|
import cn.com.qmth.scancentral.enums.ExamMode;
|
|
import cn.com.qmth.scancentral.enums.ExamStatus;
|
|
import cn.com.qmth.scancentral.enums.ExamStatus;
|
|
-import cn.com.qmth.scancentral.enums.ImageTransferMode;
|
|
|
|
import cn.com.qmth.scancentral.enums.OP;
|
|
import cn.com.qmth.scancentral.enums.OP;
|
|
import cn.com.qmth.scancentral.enums.Role;
|
|
import cn.com.qmth.scancentral.enums.Role;
|
|
import cn.com.qmth.scancentral.enums.TaskStatus;
|
|
import cn.com.qmth.scancentral.enums.TaskStatus;
|
|
import cn.com.qmth.scancentral.exception.ParameterExceptions;
|
|
import cn.com.qmth.scancentral.exception.ParameterExceptions;
|
|
-import cn.com.qmth.scancentral.util.JsonMapper;
|
|
|
|
|
|
+import cn.com.qmth.scancentral.service.AnswerCardService;
|
|
|
|
+import cn.com.qmth.scancentral.service.BatchService;
|
|
|
|
+import cn.com.qmth.scancentral.service.ExamService;
|
|
|
|
+import cn.com.qmth.scancentral.service.ExamSummaryService;
|
|
|
|
+import cn.com.qmth.scancentral.service.MarkSiteService;
|
|
|
|
+import cn.com.qmth.scancentral.service.OmrGroupService;
|
|
|
|
+import cn.com.qmth.scancentral.service.OmrTaskService;
|
|
|
|
+import cn.com.qmth.scancentral.service.PackageCardService;
|
|
|
|
+import cn.com.qmth.scancentral.service.PackageTaskService;
|
|
|
|
+import cn.com.qmth.scancentral.service.StudentService;
|
|
|
|
+import cn.com.qmth.scancentral.service.SubjectService;
|
|
import cn.com.qmth.scancentral.util.MathUtil;
|
|
import cn.com.qmth.scancentral.util.MathUtil;
|
|
import cn.com.qmth.scancentral.util.PageUtil;
|
|
import cn.com.qmth.scancentral.util.PageUtil;
|
|
import cn.com.qmth.scancentral.vo.ExamConfigVo;
|
|
import cn.com.qmth.scancentral.vo.ExamConfigVo;
|
|
@@ -143,7 +151,6 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
|
|
examEntity.setEnableSinglePageAnswer(false);
|
|
examEntity.setEnableSinglePageAnswer(false);
|
|
examEntity.setEnableUpload(false);
|
|
examEntity.setEnableUpload(false);
|
|
examEntity.setEnableSyncVerify(true);
|
|
examEntity.setEnableSyncVerify(true);
|
|
- examEntity.setImageTransferMode(ImageTransferMode.CET);
|
|
|
|
examEntity.setImageCheckRatio(0.05);
|
|
examEntity.setImageCheckRatio(0.05);
|
|
examEntity.setExamNumberFillCount(10);
|
|
examEntity.setExamNumberFillCount(10);
|
|
examEntity.setImageCheckOrder("ASC");
|
|
examEntity.setImageCheckOrder("ASC");
|
|
@@ -197,7 +204,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
|
|
vo.getScan().setImageCheckCount(imageCheckCount);
|
|
vo.getScan().setImageCheckCount(imageCheckCount);
|
|
vo.getScan().setImageCheckTodoCount(imageCheckTodoCount);
|
|
vo.getScan().setImageCheckTodoCount(imageCheckTodoCount);
|
|
|
|
|
|
- if (!exam.getEnableSyncVerify()){
|
|
|
|
|
|
+ if (!exam.getEnableSyncVerify()) {
|
|
int auditorTodoCount = studentService.getCountByExamAndAssignedCheckCount(examId, null, 0, OP.EQ);
|
|
int auditorTodoCount = studentService.getCountByExamAndAssignedCheckCount(examId, null, 0, OP.EQ);
|
|
int auditorFinishCount = studentService.getCountByExamAndAssignedCheckCount(examId, null, 0, OP.GT);
|
|
int auditorFinishCount = studentService.getCountByExamAndAssignedCheckCount(examId, null, 0, OP.GT);
|
|
int auditorTotalCount = auditorTodoCount + auditorFinishCount;
|
|
int auditorTotalCount = auditorTodoCount + auditorFinishCount;
|
|
@@ -205,7 +212,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
|
|
vo.getAssignedCheck().setAuditorTodoCount(auditorTodoCount);
|
|
vo.getAssignedCheck().setAuditorTodoCount(auditorTodoCount);
|
|
vo.getAssignedCheck().setAuditorFinishCount(auditorFinishCount);
|
|
vo.getAssignedCheck().setAuditorFinishCount(auditorFinishCount);
|
|
vo.getAssignedCheck().setAuditorFinishRate(auditorFinishRate);
|
|
vo.getAssignedCheck().setAuditorFinishRate(auditorFinishRate);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
vo.getAssignedCheck().setAuditorTodoCount(0);
|
|
vo.getAssignedCheck().setAuditorTodoCount(0);
|
|
vo.getAssignedCheck().setAuditorFinishCount(0);
|
|
vo.getAssignedCheck().setAuditorFinishCount(0);
|
|
vo.getAssignedCheck().setAuditorFinishRate(0);
|
|
vo.getAssignedCheck().setAuditorFinishRate(0);
|
|
@@ -257,7 +264,6 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
|
|
|
|
|
|
vo.getExamConfig().setAllowUnexistPaper(exam.getAllowUnexistPaper());
|
|
vo.getExamConfig().setAllowUnexistPaper(exam.getAllowUnexistPaper());
|
|
vo.getExamConfig().setAnswerFrontCardType(exam.getAnswerFrontCardType());
|
|
vo.getExamConfig().setAnswerFrontCardType(exam.getAnswerFrontCardType());
|
|
- vo.getExamConfig().setImageTransferMode(exam.getImageTransferMode());
|
|
|
|
vo.getExamConfig().setEnableSinglePageAnswer(exam.getEnableSinglePageAnswer());
|
|
vo.getExamConfig().setEnableSinglePageAnswer(exam.getEnableSinglePageAnswer());
|
|
vo.getExamConfig().setMode(exam.getMode());
|
|
vo.getExamConfig().setMode(exam.getMode());
|
|
vo.getExamConfig().setScanByPackage(exam.getScanByPackage());
|
|
vo.getExamConfig().setScanByPackage(exam.getScanByPackage());
|
|
@@ -344,9 +350,8 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
|
|
updateWrapper.eq(ExamEntity::getId, config.getExamId());
|
|
updateWrapper.eq(ExamEntity::getId, config.getExamId());
|
|
this.update(updateWrapper);
|
|
this.update(updateWrapper);
|
|
|
|
|
|
-
|
|
|
|
- if (config.getPaperTypeBarcodeContent() != null &&!config.getPaperTypeBarcodeContent().isEmpty()) {
|
|
|
|
- markSiteService.saveByExamIdAndSubjectCode(config.getExamId(),config.getPaperTypeBarcodeContent());
|
|
|
|
|
|
+ if (config.getPaperTypeBarcodeContent() != null && !config.getPaperTypeBarcodeContent().isEmpty()) {
|
|
|
|
+ markSiteService.saveByExamIdAndSubjectCode(config.getExamId(), config.getPaperTypeBarcodeContent());
|
|
}
|
|
}
|
|
|
|
|
|
if (config.getEnableSyncVerify() != null && !config.getEnableSyncVerify()) {
|
|
if (config.getEnableSyncVerify() != null && !config.getEnableSyncVerify()) {
|
|
@@ -419,10 +424,6 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
|
|
if (domain.getAnswerFrontCardType() == null) {
|
|
if (domain.getAnswerFrontCardType() == null) {
|
|
throw new ParameterException("AnswerFrontCardType 不能为空");
|
|
throw new ParameterException("AnswerFrontCardType 不能为空");
|
|
}
|
|
}
|
|
- if (domain.getImageTransferMode() == null) {
|
|
|
|
- domain.setImageTransferMode(ImageTransferMode.OFF);
|
|
|
|
- // throw new ParameterException("ImageTransferMode 不能为空");
|
|
|
|
- }
|
|
|
|
if (domain.getMode() == null) {
|
|
if (domain.getMode() == null) {
|
|
throw new ParameterException("ExamMode 不能为空");
|
|
throw new ParameterException("ExamMode 不能为空");
|
|
}
|
|
}
|
|
@@ -444,7 +445,6 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
|
|
exam.setScanByPackage(domain.getScanByPackage());
|
|
exam.setScanByPackage(domain.getScanByPackage());
|
|
exam.setAbsentBarcodeContent(domain.getAbsentBarcodeContent());
|
|
exam.setAbsentBarcodeContent(domain.getAbsentBarcodeContent());
|
|
exam.setAnswerFrontCardType(domain.getAnswerFrontCardType());
|
|
exam.setAnswerFrontCardType(domain.getAnswerFrontCardType());
|
|
- exam.setImageTransferMode(domain.getImageTransferMode());
|
|
|
|
exam.setMode(domain.getMode());
|
|
exam.setMode(domain.getMode());
|
|
exam.setPaperTypeBarcodeContent(domain.getPaperTypeBarcodeContent());
|
|
exam.setPaperTypeBarcodeContent(domain.getPaperTypeBarcodeContent());
|
|
if (getById(domain.getId()) == null) {
|
|
if (getById(domain.getId()) == null) {
|