|
@@ -257,6 +257,7 @@ public class MarkServiceImpl implements MarkService {
|
|
|
queryWrapper.lambda().eq(MarkTask::getExamId, examId)
|
|
|
.eq(MarkTask::getPaperNumber, paperNumber)
|
|
|
.eq(MarkTask::getQuestionId, questionId)
|
|
|
+ .eq(MarkTask::getAiMarked, false)
|
|
|
.last(" limit 1");
|
|
|
MarkTask markTask = markTaskService.getOne(queryWrapper);
|
|
|
|
|
@@ -506,10 +507,10 @@ public class MarkServiceImpl implements MarkService {
|
|
|
}
|
|
|
// 处理正常考生
|
|
|
List<MarkQuestion> markQuestionList = markQuestionService.listByExamIdAndPaperNumberAndObjective(markPaper.getExamId(), markPaper.getPaperNumber(), false);
|
|
|
+ if (CollectionUtils.isEmpty(markQuestionList) || markQuestionList.stream().filter(m -> m.getTotalScore() == null || m.getIntervalScore() == null || StringUtils.isBlank(m.getPicList())).count() > 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
for (MarkQuestion markQuestion : markQuestionList) {
|
|
|
- if (!MarkPaperAiMark.NONE.equals(markQuestion.getAiMark()) && !markAiQuestionParamService.existMarkAiQuestionPointOrLevel(markQuestion.getExamId(), markQuestion.getPaperNumber(), markQuestion.getId())) {
|
|
|
- continue;
|
|
|
- }
|
|
|
// 生成正评任务
|
|
|
buildFormalTask(markQuestion);
|
|
|
if (markQuestion.getDoubleRate() != null && markQuestion.getDoubleRate() > 0) {
|
|
@@ -1513,12 +1514,24 @@ public class MarkServiceImpl implements MarkService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public void aiMark(Long schoolId, Long examId, String paperNumber, Long questionId) {
|
|
|
- SysUser aiUser = sysUserService.getAiUserBySchoolId(schoolId);
|
|
|
+ public void aiMark(MarkQuestion markQuestion) {
|
|
|
+ Long examId = markQuestion.getExamId();
|
|
|
+ String paperNumber = markQuestion.getPaperNumber();
|
|
|
+ Long questionId = markQuestion.getId();
|
|
|
+
|
|
|
+ // 终止AI评卷
|
|
|
+ if (!markQuestion.getEnableAi()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // AI评卷且未设置评卷参数
|
|
|
+ if (!MarkPaperAiMark.NONE.equals(markQuestion.getAiMark()) && !markAiQuestionParamService.existMarkAiQuestionPointOrLevel(examId, paperNumber, questionId)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ BasicSchool basicSchool = basicSchoolMapper.selectByExamId(examId);
|
|
|
+ SysUser aiUser = sysUserService.getAiUserBySchoolId(basicSchool.getId());
|
|
|
if (aiUser != null) {
|
|
|
- BasicSchool basicSchool = basicSchoolMapper.selectByExamId(examId);
|
|
|
BasicCourse basicCourse = basicCourseMapper.selectByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
- MarkQuestion markQuestion = markQuestionService.getById(questionId);
|
|
|
MarkAiQuestionParam markAiQuestionParam = markAiQuestionParamService.getByExamIdAndPaperNumberAndQuestionId(examId, paperNumber, questionId);
|
|
|
List<MarkTask> markTasks = null;
|
|
|
int pageNumber = 1;
|