|
@@ -380,23 +380,11 @@ public class BatchServiceImpl extends ServiceImpl<BatchDao, BatchEntity> impleme
|
|
|
|
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
- public BatchVerifyVo verify(Long batchId, Boolean comfirm, User user) {
|
|
|
|
|
|
+ public void verify(Long batchId, Boolean comfirm, User user) {
|
|
BatchEntity entity = this.getById(batchId);
|
|
BatchEntity entity = this.getById(batchId);
|
|
if (entity == null) {
|
|
if (entity == null) {
|
|
throw new ParameterException("批次不存在");
|
|
throw new ParameterException("批次不存在");
|
|
}
|
|
}
|
|
- Integer count = findStudentCountByBatch(batchId);
|
|
|
|
- if (count == null || count == 0) {
|
|
|
|
- throw new ParameterException("该批次未上传图片");
|
|
|
|
- }
|
|
|
|
- if (entity.getVerifyStatus() == null) {
|
|
|
|
- ExamEntity exam = examService.getById(entity.getExamId());
|
|
|
|
- if (exam.getEnableSyncVerify() == null || !exam.getEnableSyncVerify()) {
|
|
|
|
- throw new ParameterException("考试未启用实时审核");
|
|
|
|
- }
|
|
|
|
- entity.setVerifyStatus(VerifyStatus.WAITING);
|
|
|
|
- this.saveOrUpdate(entity);
|
|
|
|
- }
|
|
|
|
if (!VerifyStatus.WAITING.equals(entity.getVerifyStatus())) {
|
|
if (!VerifyStatus.WAITING.equals(entity.getVerifyStatus())) {
|
|
throw new ParameterException("批次已被处理");
|
|
throw new ParameterException("批次已被处理");
|
|
}
|
|
}
|
|
@@ -408,7 +396,27 @@ public class BatchServiceImpl extends ServiceImpl<BatchDao, BatchEntity> impleme
|
|
}
|
|
}
|
|
entity.setUpdateTime(System.currentTimeMillis());
|
|
entity.setUpdateTime(System.currentTimeMillis());
|
|
this.saveOrUpdate(entity);
|
|
this.saveOrUpdate(entity);
|
|
- this.releaseVerifyTask(entity);
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Transactional
|
|
|
|
+ @Override
|
|
|
|
+ public BatchVerifyVo batchVerify(Long id) {
|
|
|
|
+ BatchEntity entity = this.getById(id);
|
|
|
|
+ if (entity == null) {
|
|
|
|
+ throw new ParameterException("批次不存在");
|
|
|
|
+ }
|
|
|
|
+ Integer count = findStudentCountByBatch(id);
|
|
|
|
+ if (count == null || count == 0) {
|
|
|
|
+ throw new ParameterException("该批次未上传图片");
|
|
|
|
+ }
|
|
|
|
+ if (entity.getVerifyStatus() == null) {
|
|
|
|
+ ExamEntity exam = examService.getById(entity.getExamId());
|
|
|
|
+ if (exam.getEnableSyncVerify() == null || !exam.getEnableSyncVerify()) {
|
|
|
|
+ throw new ParameterException("考试未启用实时审核");
|
|
|
|
+ }
|
|
|
|
+ entity.setVerifyStatus(VerifyStatus.WAITING);
|
|
|
|
+ this.saveOrUpdate(entity);
|
|
|
|
+ }
|
|
BatchVerifyVo vo = new BatchVerifyVo();
|
|
BatchVerifyVo vo = new BatchVerifyVo();
|
|
vo.setStatus(entity.getVerifyStatus());
|
|
vo.setStatus(entity.getVerifyStatus());
|
|
vo.setUpdateTime(entity.getUpdateTime());
|
|
vo.setUpdateTime(entity.getUpdateTime());
|