Browse Source

新增ai评卷参数表

wangliang 2 months ago
parent
commit
bb5d5bc7f1
18 changed files with 509 additions and 0 deletions
  1. 37 0
      distributed-print/install/mysql/upgrade/3.4.5.sql
  2. 24 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkAiQuestionParamController.java
  3. 79 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkAiQuestionLevel.java
  4. 105 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkAiQuestionParam.java
  5. 68 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkAiQuestionScore.java
  6. 25 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/enums/AiQuestionParamModeStatus.java
  7. 16 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkAiQuestionLevelMapper.java
  8. 16 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkAiQuestionParamMapper.java
  9. 16 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkAiQuestionScoreMapper.java
  10. 16 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkAiQuestionLevelService.java
  11. 16 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkAiQuestionParamService.java
  12. 16 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkAiQuestionScoreService.java
  13. 20 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkAiQuestionLevelServiceImpl.java
  14. 20 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkAiQuestionParamServiceImpl.java
  15. 20 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkAiQuestionScoreServiceImpl.java
  16. 5 0
      teachcloud-mark/src/main/resources/mapper/MarkAiQuestionLevelMapper.xml
  17. 5 0
      teachcloud-mark/src/main/resources/mapper/MarkAiQuestionParamMapper.xml
  18. 5 0
      teachcloud-mark/src/main/resources/mapper/MarkAiQuestionScoreMapper.xml

+ 37 - 0
distributed-print/install/mysql/upgrade/3.4.5.sql

@@ -18,3 +18,40 @@ CREATE TABLE `mark_ocr_student_question` (
     `create_time` BIGINT(20) NULL COMMENT '识别时间',
     PRIMARY KEY (`id`))
     COMMENT = '考生主观题小题OCR识别结果';
+
+-- 2025-04-10
+DROP TABLE IF EXISTS `mark_ai_question_param`;
+CREATE TABLE `mark_ai_question_param` (
+                                          `id` bigint NOT NULL COMMENT '主键',
+                                          `question_id` bigint NOT NULL COMMENT '题目id',
+                                          `exam_id` bigint NOT NULL COMMENT '考试id',
+                                          `course_id` bigint NOT NULL COMMENT '科目id',
+                                          `paper_number` varchar(100) NOT NULL COMMENT '试卷类型',
+                                          `mode` varchar(30) NOT NULL COMMENT '评分模式,SCORE:按得分点,LEVEL:按档次',
+                                          `main_title` varchar(1000) NOT NULL COMMENT '试题题干',
+                                          `min_score` double NOT NULL COMMENT '最小分',
+                                          `create_id` bigint DEFAULT NULL COMMENT '创建人id',
+                                          `create_time` bigint DEFAULT NULL COMMENT '创建时间',
+                                          `update_id` bigint DEFAULT NULL COMMENT '更新人id',
+                                          `update_time` bigint DEFAULT NULL COMMENT '更新时间',
+                                          PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AI评卷参数表';
+
+DROP TABLE IF EXISTS `mark_ai_question_score`;
+CREATE TABLE `mark_ai_question_score` (
+                                          `id` bigint NOT NULL COMMENT '主键',
+                                          `ai_question_id` bigint NOT NULL COMMENT 'AI评卷参数id',
+                                          `score` double NOT NULL COMMENT '分值',
+                                          `answer` varchar(1000) NOT NULL COMMENT '标答',
+                                          PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AI评卷得分明细表';
+
+DROP TABLE IF EXISTS `mark_ai_question_level`;
+CREATE TABLE `mark_ai_question_level` (
+                                          `id` bigint NOT NULL COMMENT '主键',
+                                          `ai_question_id` bigint NOT NULL COMMENT 'AI评卷参数id',
+                                          `min_score` double NOT NULL COMMENT '最小分值',
+                                          `max_score` double NOT NULL COMMENT '最大分值',
+                                          `answer` varchar(1000) NOT NULL COMMENT '标答',
+                                          PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AI评卷得分明细表';

+ 24 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkAiQuestionParamController.java

@@ -0,0 +1,24 @@
+package com.qmth.distributed.print.api.mark;
+
+
+import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.teachcloud.common.contant.SystemConstant;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * AI评卷参数表 前端控制器
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+@Api(tags = "AI评卷参数Controller")
+@RestController
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_MARK + "/ai_question_param")
+public class MarkAiQuestionParamController {
+
+}

+ 79 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkAiQuestionLevel.java

@@ -0,0 +1,79 @@
+package com.qmth.teachcloud.mark.entity;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * AI评卷得分明细表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+@ApiModel(value = "MarkAiQuestionLevel对象", description = "AI评卷得分明细表")
+public class MarkAiQuestionLevel implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "主键")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    @ApiModelProperty(value = "AI评卷参数id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long aiQuestionId;
+
+    @ApiModelProperty(value = "最小分值")
+    private Double minScore;
+
+    @ApiModelProperty(value = "最大分值")
+    private Double maxScore;
+
+    @ApiModelProperty(value = "标答")
+    private String answer;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAiQuestionId() {
+        return aiQuestionId;
+    }
+
+    public void setAiQuestionId(Long aiQuestionId) {
+        this.aiQuestionId = aiQuestionId;
+    }
+
+    public Double getMinScore() {
+        return minScore;
+    }
+
+    public void setMinScore(Double minScore) {
+        this.minScore = minScore;
+    }
+
+    public Double getMaxScore() {
+        return maxScore;
+    }
+
+    public void setMaxScore(Double maxScore) {
+        this.maxScore = maxScore;
+    }
+
+    public String getAnswer() {
+        return answer;
+    }
+
+    public void setAnswer(String answer) {
+        this.answer = answer;
+    }
+}

+ 105 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkAiQuestionParam.java

@@ -0,0 +1,105 @@
+package com.qmth.teachcloud.mark.entity;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.teachcloud.common.base.BaseEntity;
+import com.qmth.teachcloud.mark.enums.AiQuestionParamModeStatus;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * AI评卷参数表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+@ApiModel(value = "MarkAiQuestionParam对象", description = "AI评卷参数表")
+public class MarkAiQuestionParam extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "题目id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long questionId;
+
+    @ApiModelProperty(value = "考试id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long examId;
+
+    @ApiModelProperty(value = "科目id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long courseId;
+
+    @ApiModelProperty(value = "试卷类型")
+    private String paperNumber;
+
+    @ApiModelProperty(value = "评分模式,SCORE:按得分点,LEVEL:按档次")
+    private AiQuestionParamModeStatus mode;
+
+    @ApiModelProperty(value = "试题题干")
+    private String mainTitle;
+
+    @ApiModelProperty(value = "最小分")
+    private Double minScore;
+
+
+    public Long getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
+    public String getPaperNumber() {
+        return paperNumber;
+    }
+
+    public void setPaperNumber(String paperNumber) {
+        this.paperNumber = paperNumber;
+    }
+
+    public AiQuestionParamModeStatus getMode() {
+        return mode;
+    }
+
+    public void setMode(AiQuestionParamModeStatus mode) {
+        this.mode = mode;
+    }
+
+    public String getMainTitle() {
+        return mainTitle;
+    }
+
+    public void setMainTitle(String mainTitle) {
+        this.mainTitle = mainTitle;
+    }
+
+    public Double getMinScore() {
+        return minScore;
+    }
+
+    public void setMinScore(Double minScore) {
+        this.minScore = minScore;
+    }
+}

+ 68 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkAiQuestionScore.java

@@ -0,0 +1,68 @@
+package com.qmth.teachcloud.mark.entity;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * AI评卷得分明细表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+@ApiModel(value = "MarkAiQuestionScore对象", description = "AI评卷得分明细表")
+public class MarkAiQuestionScore implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "主键")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    @ApiModelProperty(value = "AI评卷参数id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long aiQuestionId;
+
+    @ApiModelProperty(value = "分值")
+    private Double score;
+
+    @ApiModelProperty(value = "标答")
+    private String answer;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAiQuestionId() {
+        return aiQuestionId;
+    }
+
+    public void setAiQuestionId(Long aiQuestionId) {
+        this.aiQuestionId = aiQuestionId;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public String getAnswer() {
+        return answer;
+    }
+
+    public void setAnswer(String answer) {
+        this.answer = answer;
+    }
+}

+ 25 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/enums/AiQuestionParamModeStatus.java

@@ -0,0 +1,25 @@
+package com.qmth.teachcloud.mark.enums;
+
+/**
+ * @Description: AI评卷参数模式
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2025/4/10
+ */
+public enum AiQuestionParamModeStatus {
+
+    SCORE("按得分点"),
+
+    LEVEL("按档次");
+
+    private String name;
+
+    AiQuestionParamModeStatus(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+}

+ 16 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkAiQuestionLevelMapper.java

@@ -0,0 +1,16 @@
+package com.qmth.teachcloud.mark.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionLevel;
+
+/**
+ * <p>
+ * AI评卷得分明细表 Mapper 接口
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+public interface MarkAiQuestionLevelMapper extends BaseMapper<MarkAiQuestionLevel> {
+
+}

+ 16 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkAiQuestionParamMapper.java

@@ -0,0 +1,16 @@
+package com.qmth.teachcloud.mark.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionParam;
+
+/**
+ * <p>
+ * AI评卷参数表 Mapper 接口
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+public interface MarkAiQuestionParamMapper extends BaseMapper<MarkAiQuestionParam> {
+
+}

+ 16 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkAiQuestionScoreMapper.java

@@ -0,0 +1,16 @@
+package com.qmth.teachcloud.mark.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionScore;
+
+/**
+ * <p>
+ * AI评卷得分明细表 Mapper 接口
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+public interface MarkAiQuestionScoreMapper extends BaseMapper<MarkAiQuestionScore> {
+
+}

+ 16 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkAiQuestionLevelService.java

@@ -0,0 +1,16 @@
+package com.qmth.teachcloud.mark.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionLevel;
+
+/**
+ * <p>
+ * AI评卷得分明细表 服务类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+public interface MarkAiQuestionLevelService extends IService<MarkAiQuestionLevel> {
+
+}

+ 16 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkAiQuestionParamService.java

@@ -0,0 +1,16 @@
+package com.qmth.teachcloud.mark.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionParam;
+
+/**
+ * <p>
+ * AI评卷参数表 服务类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+public interface MarkAiQuestionParamService extends IService<MarkAiQuestionParam> {
+
+}

+ 16 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkAiQuestionScoreService.java

@@ -0,0 +1,16 @@
+package com.qmth.teachcloud.mark.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionScore;
+
+/**
+ * <p>
+ * AI评卷得分明细表 服务类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+public interface MarkAiQuestionScoreService extends IService<MarkAiQuestionScore> {
+
+}

+ 20 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkAiQuestionLevelServiceImpl.java

@@ -0,0 +1,20 @@
+package com.qmth.teachcloud.mark.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionLevel;
+import com.qmth.teachcloud.mark.mapper.MarkAiQuestionLevelMapper;
+import com.qmth.teachcloud.mark.service.MarkAiQuestionLevelService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * AI评卷得分明细表 服务实现类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+@Service
+public class MarkAiQuestionLevelServiceImpl extends ServiceImpl<MarkAiQuestionLevelMapper, MarkAiQuestionLevel> implements MarkAiQuestionLevelService {
+
+}

+ 20 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkAiQuestionParamServiceImpl.java

@@ -0,0 +1,20 @@
+package com.qmth.teachcloud.mark.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionParam;
+import com.qmth.teachcloud.mark.mapper.MarkAiQuestionParamMapper;
+import com.qmth.teachcloud.mark.service.MarkAiQuestionParamService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * AI评卷参数表 服务实现类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+@Service
+public class MarkAiQuestionParamServiceImpl extends ServiceImpl<MarkAiQuestionParamMapper, MarkAiQuestionParam> implements MarkAiQuestionParamService {
+
+}

+ 20 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkAiQuestionScoreServiceImpl.java

@@ -0,0 +1,20 @@
+package com.qmth.teachcloud.mark.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.mark.entity.MarkAiQuestionScore;
+import com.qmth.teachcloud.mark.mapper.MarkAiQuestionScoreMapper;
+import com.qmth.teachcloud.mark.service.MarkAiQuestionScoreService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * AI评卷得分明细表 服务实现类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-04-10
+ */
+@Service
+public class MarkAiQuestionScoreServiceImpl extends ServiceImpl<MarkAiQuestionScoreMapper, MarkAiQuestionScore> implements MarkAiQuestionScoreService {
+
+}

+ 5 - 0
teachcloud-mark/src/main/resources/mapper/MarkAiQuestionLevelMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.qmth.teachcloud.mark.mapper.MarkAiQuestionLevelMapper">
+
+</mapper>

+ 5 - 0
teachcloud-mark/src/main/resources/mapper/MarkAiQuestionParamMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.qmth.teachcloud.mark.mapper.MarkAiQuestionParamMapper">
+
+</mapper>

+ 5 - 0
teachcloud-mark/src/main/resources/mapper/MarkAiQuestionScoreMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.qmth.teachcloud.mark.mapper.MarkAiQuestionScoreMapper">
+
+</mapper>