|
@@ -0,0 +1,74 @@
|
|
|
+package com.qmth.distributed.print;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.qmth.boot.core.ai.model.llm.score.AutoScoreModel;
|
|
|
+import com.qmth.boot.core.ai.model.llm.score.AutoScoreRequest;
|
|
|
+import com.qmth.boot.core.ai.model.llm.score.AutoScoreResult;
|
|
|
+import com.qmth.boot.core.ai.model.llm.score.StandardAnswer;
|
|
|
+import com.qmth.boot.core.ai.service.AiService;
|
|
|
+import com.qmth.teachcloud.common.config.DictionaryConfig;
|
|
|
+import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
+import com.qmth.teachcloud.common.entity.MarkQuestion;
|
|
|
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
+import com.qmth.teachcloud.mark.dto.mark.score.StudentPaperDetailDto;
|
|
|
+import com.qmth.teachcloud.mark.entity.*;
|
|
|
+import com.qmth.teachcloud.mark.enums.AiQuestionParamModeStatus;
|
|
|
+import com.qmth.teachcloud.mark.service.*;
|
|
|
+import com.qmth.teachcloud.mark.utils.AiUtil;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.junit.Test;
|
|
|
+import org.junit.runner.RunWith;
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 更新题卡扫描原始结果中的大题号、小题号
|
|
|
+ * 原因:轨迹图中客观题答案未还原,因为扫描卡格式和试卷结构设置题号不一致
|
|
|
+ */
|
|
|
+@SpringBootTest
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+public class UpdateObjectiveOmrResultTest {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private MarkStudentService markStudentService;
|
|
|
+ @Resource
|
|
|
+ private ScanPaperService scanPaperService;
|
|
|
+
|
|
|
+ private Long examId = 1l;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void test() throws Exception {
|
|
|
+ String[] paperNumbers = {"", ""};
|
|
|
+ for (String paperNumber : paperNumbers) {
|
|
|
+ List<MarkStudent> markStudentList = listMarkStudentByPaperNumber(paperNumber);
|
|
|
+ if (CollectionUtils.isEmpty(markStudentList)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (MarkStudent markStudent : markStudentList) {
|
|
|
+ List<StudentPaperDetailDto> studentPaperDetailDtoList = scanPaperService.listStudentPaperDetail(markStudent.getId());
|
|
|
+ for (StudentPaperDetailDto studentPaperDetailDto : studentPaperDetailDtoList) {
|
|
|
+ if (studentPaperDetailDto.getPageIndex() ==1){
|
|
|
+ String recogData = studentPaperDetailDto.getRecogData();
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<MarkStudent> listMarkStudentByPaperNumber(String paperNumber) {
|
|
|
+ QueryWrapper<MarkStudent> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.lambda().eq(MarkStudent::getExamId, examId)
|
|
|
+ .eq(MarkStudent::getPaperNumber, paperNumber);
|
|
|
+ return markStudentService.list(queryWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|