|
@@ -0,0 +1,76 @@
|
|
|
|
+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.entity.MarkQuestion;
|
|
|
|
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
|
+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;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @Description: 导入导出工具类
|
|
|
|
+ * @Author: CaoZixuan
|
|
|
|
+ * @Date: 2021-09-27
|
|
|
|
+ */
|
|
|
|
+@SpringBootTest
|
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
|
+public class AiMark27160011Test {
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ private MarkStudentService markStudentService;
|
|
|
|
+ @Resource
|
|
|
|
+ private MarkSubjectiveScoreService markSubjectiveScoreService;
|
|
|
|
+ @Resource
|
|
|
|
+ private MarkTaskService markTaskService;
|
|
|
|
+
|
|
|
|
+ Long examId = 664876885490008064l;
|
|
|
|
+ Long questionId = Long.parseLong("1934063467957837829");
|
|
|
|
+ String paperNumber = "27160011";
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ public void test() throws Exception {
|
|
|
|
+ List<MarkTask> markTaskList = listMarkTask();
|
|
|
|
+ List<MarkSubjectiveScore> list = new ArrayList<>();
|
|
|
|
+ for (MarkTask markTask : markTaskList) {
|
|
|
|
+ MarkSubjectiveScore subjectiveScore = new MarkSubjectiveScore();
|
|
|
|
+ subjectiveScore.setStudentId(markTask.getStudentId());
|
|
|
|
+ subjectiveScore.setMainNumber(3);
|
|
|
|
+ subjectiveScore.setSubNumber(2);
|
|
|
|
+ subjectiveScore.setExamId(markTask.getExamId());
|
|
|
|
+ subjectiveScore.setPaperNumber(paperNumber);
|
|
|
|
+ subjectiveScore.setQuestionId(markTask.getQuestionId());
|
|
|
|
+ subjectiveScore.setMainScore(0d);
|
|
|
|
+ subjectiveScore.setScore(20d);
|
|
|
|
+ subjectiveScore.setRejected(false);
|
|
|
|
+ list.add(subjectiveScore);
|
|
|
|
+ }
|
|
|
|
+ markSubjectiveScoreService.saveOrUpdateBatchByMultiId(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private List<MarkTask> listMarkTask() {
|
|
|
|
+ QueryWrapper<MarkTask> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.lambda().eq(MarkTask::getExamId, examId)
|
|
|
|
+ .eq(MarkTask::getQuestionId, questionId);
|
|
|
|
+ return markTaskService.list(queryWrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|