|
@@ -514,7 +514,7 @@ public class MarkServiceImpl implements MarkService {
|
|
for (MarkQuestion markQuestion : markQuestionList) {
|
|
for (MarkQuestion markQuestion : markQuestionList) {
|
|
// 生成正评任务
|
|
// 生成正评任务
|
|
buildFormalTask(markQuestion);
|
|
buildFormalTask(markQuestion);
|
|
- if (markQuestion.getDoubleRate() != null && markQuestion.getDoubleRate() > 0) {
|
|
|
|
|
|
+ if (markQuestion.getDoubleRate() != null && markQuestion.getDoubleRate() > 0 && markQuestion.getArbitrateThreshold() > 0) {
|
|
// 补双评任务
|
|
// 补双评任务
|
|
fillFormalTask(markQuestion);
|
|
fillFormalTask(markQuestion);
|
|
}
|
|
}
|
|
@@ -711,6 +711,14 @@ public class MarkServiceImpl implements MarkService {
|
|
this.updateMarkedCount(markQuestion.getExamId(), markQuestion.getPaperNumber(), markQuestion.getId());
|
|
this.updateMarkedCount(markQuestion.getExamId(), markQuestion.getPaperNumber(), markQuestion.getId());
|
|
this.updatePersonTask(markQuestion.getExamId(), markQuestion.getPaperNumber(), markQuestion.getId());
|
|
this.updatePersonTask(markQuestion.getExamId(), markQuestion.getPaperNumber(), markQuestion.getId());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ for (MarkTask markTask : taskList) {
|
|
|
|
+ Long studentId = markTask.getStudentId();
|
|
|
|
+ markSubjectiveScoreService.deleteByStudentIdAndQuestionId(studentId, markQuestion.getId());
|
|
|
|
+ lockService.waitlock(LockType.STUDENT, markTask.getStudentId());
|
|
|
|
+ markStudentService.updateSubjectiveStatusAndScore(studentId, SubjectiveStatus.UNMARK);
|
|
|
|
+ lockService.unlock(LockType.STUDENT, markTask.getStudentId());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
studentList = markStudentService.listUnMarkTaskStudent(markQuestion.getExamId(), markQuestion.getPaperNumber(), markQuestion.getId(), pageSize);
|
|
studentList = markStudentService.listUnMarkTaskStudent(markQuestion.getExamId(), markQuestion.getPaperNumber(), markQuestion.getId(), pageSize);
|
|
}
|
|
}
|
|
@@ -1582,15 +1590,15 @@ public class MarkServiceImpl implements MarkService {
|
|
List<MarkTask> markTasks = null;
|
|
List<MarkTask> markTasks = null;
|
|
int pageNumber = 1;
|
|
int pageNumber = 1;
|
|
do {
|
|
do {
|
|
- Set<Long> questions = new HashSet<>(Arrays.asList(questionId));
|
|
|
|
|
|
+// Set<Long> questions = new HashSet<>(Arrays.asList(questionId));
|
|
markTasks = markTaskService.findAiUnMarked(new Page<>(pageNumber, 20), examId, paperNumber, questionId);
|
|
markTasks = markTaskService.findAiUnMarked(new Page<>(pageNumber, 20), examId, paperNumber, questionId);
|
|
if (markTasks.isEmpty() || !markQuestion.getEnableAi()) {
|
|
if (markTasks.isEmpty() || !markQuestion.getEnableAi()) {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
for (MarkTask t : markTasks) {
|
|
for (MarkTask t : markTasks) {
|
|
- if (this.applyTask(examId, paperNumber, t.getStudentId(), aiUser.getId(), questions, Arrays.asList(t.getId()))) {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
|
|
+// if (this.applyTask(examId, paperNumber, t.getStudentId(), aiUser.getId(), questions, Arrays.asList(t.getId()))) {
|
|
|
|
+// continue;
|
|
|
|
+// }
|
|
// 考生作答
|
|
// 考生作答
|
|
try {
|
|
try {
|
|
long startTime = System.currentTimeMillis();
|
|
long startTime = System.currentTimeMillis();
|
|
@@ -1693,7 +1701,6 @@ public class MarkServiceImpl implements MarkService {
|
|
int finalI = i + 1;
|
|
int finalI = i + 1;
|
|
MarkOcrStudentQuestion markOcrStudentQuestion = markOcrStudentQuestions.stream().filter(m -> m.getNumber().equals(finalI)).findFirst().get();
|
|
MarkOcrStudentQuestion markOcrStudentQuestion = markOcrStudentQuestions.stream().filter(m -> m.getNumber().equals(finalI)).findFirst().get();
|
|
|
|
|
|
-
|
|
|
|
int offsetX = 0, offsetY = 0;
|
|
int offsetX = 0, offsetY = 0;
|
|
for (int j = 0; j < doubles.length; j++) {
|
|
for (int j = 0; j < doubles.length; j++) {
|
|
int picX = (int) (markOcrStudentQuestion.getImageWidth() * markConfigItem.getX());
|
|
int picX = (int) (markOcrStudentQuestion.getImageWidth() * markConfigItem.getX());
|
|
@@ -1707,7 +1714,8 @@ public class MarkServiceImpl implements MarkService {
|
|
} else {
|
|
} else {
|
|
offsetX = offsetX + stepXAdd;
|
|
offsetX = offsetX + stepXAdd;
|
|
}
|
|
}
|
|
- if (offsetX > picX + picW) {
|
|
|
|
|
|
+ // -50,防止太靠边出界
|
|
|
|
+ if (offsetX > picX + picW - 50) {
|
|
if (offsetY > picY + picH) {
|
|
if (offsetY > picY + picH) {
|
|
continue;
|
|
continue;
|
|
} else {
|
|
} else {
|