|
@@ -56,13 +56,13 @@ import com.qmth.teachcloud.mark.dto.mark.score.*;
|
|
|
import com.qmth.teachcloud.mark.entity.*;
|
|
|
import com.qmth.teachcloud.mark.enums.ExamStatus;
|
|
|
import com.qmth.teachcloud.mark.enums.LockType;
|
|
|
+import com.qmth.teachcloud.mark.enums.MarkTaskStatus;
|
|
|
import com.qmth.teachcloud.mark.enums.OmrTaskStatus;
|
|
|
import com.qmth.teachcloud.mark.lock.LockService;
|
|
|
import com.qmth.teachcloud.mark.mapper.MarkStudentMapper;
|
|
|
import com.qmth.teachcloud.mark.params.MarkHeaderResult;
|
|
|
import com.qmth.teachcloud.mark.service.*;
|
|
|
import com.qmth.teachcloud.mark.utils.BatchGetDataUtil;
|
|
|
-import com.qmth.teachcloud.mark.utils.BigDecimalUtils;
|
|
|
import com.qmth.teachcloud.mark.utils.Calculator;
|
|
|
import com.qmth.teachcloud.mark.utils.ScoreCalculateUtil;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
@@ -161,6 +161,9 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
@Resource
|
|
|
private MarkTrackService markTrackService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ MarkTaskService markTaskService;
|
|
|
+
|
|
|
@Override
|
|
|
public List<String> listClassByExamIdAndCourseCode(Long examId, String paperNumber) {
|
|
|
MarkStudentQuery markStudentQuery = new MarkStudentQuery();
|
|
@@ -338,6 +341,15 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
Set<StudentScoreDetailExportDto> studentScoreDetailExportDtoSet = new HashSet<>();
|
|
|
for (StudentScoreDetailDto scoreDetailDto : studentScoreDetailDtoList) {
|
|
|
studentScoreDetailExportDtoSet.add(new StudentScoreDetailExportDto(scoreDetailDto));
|
|
|
+
|
|
|
+ List<MarkTask> markTaskList = markTaskService.list(new QueryWrapper<MarkTask>().lambda().eq(MarkTask::getStudentId, scoreDetailDto.getStudentId()));
|
|
|
+ if (!CollectionUtils.isEmpty(markTaskList)) {
|
|
|
+ for (MarkTask m : markTaskList) {
|
|
|
+ if (Objects.nonNull(m.getStatus()) && m.getStatus() != MarkTaskStatus.MARKED) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("[" + scoreDetailDto.getStudentName() + "]评卷任务未完成,请完成评卷任务并检查成绩后再导出");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// 原图
|
|
|
scoreDetailDto.setSheetUrls(buildSheetUrls(scoreDetailDto.getStudentId()));
|
|
|
scoreDetailDto.setSheetPath(null);
|
|
@@ -1757,8 +1769,8 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
public void updateByBasicExamStudent(BasicExamStudent basicExamStudent, MarkPaper markPaper, Set<String> secretNumberSet) {
|
|
|
MarkStudent markStudent = this.findByExamIdAndPaperNumberAndStudentCode(basicExamStudent.getExamId(), basicExamStudent.getPaperNumber(), basicExamStudent.getStudentCode());
|
|
|
if (markStudent == null) {
|
|
|
- if(MarkPaperStatus.FINISH.equals(markPaper.getStatus())){
|
|
|
- throw ExceptionResultEnum.ERROR.exception("试卷编号["+markPaper.getPaperNumber()+"]已结束阅卷,不允许新增考生");
|
|
|
+ if (MarkPaperStatus.FINISH.equals(markPaper.getStatus())) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("试卷编号[" + markPaper.getPaperNumber() + "]已结束阅卷,不允许新增考生");
|
|
|
}
|
|
|
markStudent = new MarkStudent(SystemConstant.getDbUuid(), basicExamStudent.getExamId(), basicExamStudent.getId(), basicExamStudent.getCourseId(), basicExamStudent.getPaperNumber(), markPaper.getCoursePaperId(), markPaper.getPaperType(), basicExamStudent.getStudentCode(), "", basicExamStudent.getExamPlace(), basicExamStudent.getExamRoom(), basicExamStudent.getExamStartTime(), basicExamStudent.getExamEndTime(), markPaper.getUserId());
|
|
|
if (markStudent.getSecretNumber() == null) {
|