Browse Source

新增模式4答题卡管理

wangliang 3 months ago
parent
commit
ecdc2433ba

+ 160 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/ExamCardModelFour.java

@@ -0,0 +1,160 @@
+package com.qmth.distributed.print.business.entity;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.distributed.print.business.enums.ExamCardStatusEnum;
+import com.qmth.teachcloud.common.base.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 模式4题卡
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-03-06
+ */
+@ApiModel(value = "ExamCardModelFour对象", description = "模式4题卡")
+public class ExamCardModelFour extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "学校id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long schoolId;
+
+    @ApiModelProperty(value = "考试id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long examId;
+
+    @ApiModelProperty(value = "课程ID(basic_course表ID)")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long courseId;
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "STAGE-暂存,SUBMIT-提交")
+    private ExamCardStatusEnum status;
+
+    @ApiModelProperty(value = "题卡工具制作题卡内容")
+    private String content;
+
+    @ApiModelProperty(value = "暂存内容(提交后置空)")
+    private String stageContent;
+
+    @ApiModelProperty(value = "html格式内容")
+    private String htmlContent;
+
+    @ApiModelProperty(value = "1正常,0禁用")
+    private Boolean enable;
+
+    @ApiModelProperty(value = "题卡规则Id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long cardRuleId;
+
+    @ApiModelProperty(value = "题卡转换成的jpg文件信息")
+    private String jpgAttachment;
+
+    @ApiModelProperty(value = "题卡纸张大小(A3,8K)")
+    private String pageSize;
+
+    public Long getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Long schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    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 getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public ExamCardStatusEnum getStatus() {
+        return status;
+    }
+
+    public void setStatus(ExamCardStatusEnum status) {
+        this.status = status;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getStageContent() {
+        return stageContent;
+    }
+
+    public void setStageContent(String stageContent) {
+        this.stageContent = stageContent;
+    }
+
+    public String getHtmlContent() {
+        return htmlContent;
+    }
+
+    public void setHtmlContent(String htmlContent) {
+        this.htmlContent = htmlContent;
+    }
+
+    public Boolean getEnable() {
+        return enable;
+    }
+
+    public void setEnable(Boolean enable) {
+        this.enable = enable;
+    }
+
+    public Long getCardRuleId() {
+        return cardRuleId;
+    }
+
+    public void setCardRuleId(Long cardRuleId) {
+        this.cardRuleId = cardRuleId;
+    }
+
+    public String getJpgAttachment() {
+        return jpgAttachment;
+    }
+
+    public void setJpgAttachment(String jpgAttachment) {
+        this.jpgAttachment = jpgAttachment;
+    }
+
+    public String getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(String pageSize) {
+        this.pageSize = pageSize;
+    }
+}

+ 16 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamCardModelFourMapper.java

@@ -0,0 +1,16 @@
+package com.qmth.distributed.print.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.distributed.print.business.entity.ExamCardModelFour;
+
+/**
+ * <p>
+ * 模式4题卡 Mapper 接口
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-03-06
+ */
+public interface ExamCardModelFourMapper extends BaseMapper<ExamCardModelFour> {
+
+}

+ 16 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamCardModelFourService.java

@@ -0,0 +1,16 @@
+package com.qmth.distributed.print.business.service;
+
+import com.qmth.distributed.print.business.entity.ExamCardModelFour;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 模式4题卡 服务类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-03-06
+ */
+public interface ExamCardModelFourService extends IService<ExamCardModelFour> {
+
+}

+ 20 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardModelFourServiceImpl.java

@@ -0,0 +1,20 @@
+package com.qmth.distributed.print.business.service.impl;
+
+import com.qmth.distributed.print.business.entity.ExamCardModelFour;
+import com.qmth.distributed.print.business.mapper.ExamCardModelFourMapper;
+import com.qmth.distributed.print.business.service.ExamCardModelFourService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 模式4题卡 服务实现类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-03-06
+ */
+@Service
+public class ExamCardModelFourServiceImpl extends ServiceImpl<ExamCardModelFourMapper, ExamCardModelFour> implements ExamCardModelFourService {
+
+}

+ 5 - 0
distributed-print-business/src/main/resources/mapper/ExamCardModelFourMapper.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.distributed.print.business.mapper.ExamCardModelFourMapper">
+
+</mapper>

+ 73 - 0
distributed-print/install/mysql/upgrade/3.4.4.sql

@@ -181,6 +181,79 @@ INSERT INTO sys_config
 VALUES(51, NULL, NULL, 'mark.score.calculate.job.db.limit', '统分查询考生条数', 'limit 0,500', NULL, 1, 20, 1, NULL, NULL, NULL);
 
 -- 2025-03-06
+CREATE TABLE IF NOT EXISTS `exam_card_model_four` (
+  `id` bigint NOT NULL COMMENT '主键',
+  `school_id` bigint NOT NULL COMMENT '学校id',
+  `exam_id` bigint DEFAULT NULL COMMENT '考试id',
+  `course_id` bigint DEFAULT NULL COMMENT '课程ID(basic_course表ID)',
+  `title` varchar(200) NOT NULL COMMENT '标题',
+  `status` varchar(45) DEFAULT NULL COMMENT 'STAGE-暂存,SUBMIT-提交',
+  `content` mediumtext COMMENT '题卡工具制作题卡内容',
+  `stage_content` mediumtext COMMENT '暂存内容(提交后置空)',
+  `html_content` mediumtext COMMENT 'html格式内容',
+  `enable` tinyint(1) DEFAULT '1' COMMENT '1正常,0禁用',
+  `card_rule_id` bigint DEFAULT NULL COMMENT '题卡规则Id',
+  `jpg_attachment` text COMMENT '题卡转换成的jpg文件信息',
+  `create_id` bigint DEFAULT NULL COMMENT '创建人',
+  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
+  `update_id` bigint DEFAULT NULL COMMENT '更新人',
+  `update_time` bigint DEFAULT NULL COMMENT '更新时间',
+  `page_size` varchar(10) DEFAULT NULL COMMENT '题卡纸张大小(A3,8K)',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模式4题卡';
+
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1199, '答题卡管理', 'CardModel4Manage', 'MENU', 3, 4, 'AUTH', NULL, 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1200, '查询', 'Select', 'BUTTON', 1199, 1, 'AUTH', '1209', 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1201, '新增题卡', 'Add', 'BUTTON', 1199, 2, 'AUTH', '1210', 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1202, '批量下载', 'BatchDownload', 'BUTTON', 1199, 3, 'AUTH', '1214', 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1203, '查询条件', 'Condition', 'CONDITION', 1199, 4, 'AUTH', NULL, 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1204, '查看', 'Preview', 'LINK', 1199, 1, 'AUTH', NULL, 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1205, '生成图片/预览图片', 'ConvertImage', 'LINK', 1199, 2, 'AUTH', '1212', 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1206, '编辑题卡/编辑信息', 'Edit', 'LINK', 1199, 3, 'AUTH', '1210', 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1207, '下载', 'Download', 'LINK', 1199, 4, 'AUTH', '1213', 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1208, '删除', 'Delete', 'LINK', 1199, 5, 'AUTH', '1211', 1, 0, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1209, '查询', '/api/admin/exam/model_4/card/page', 'URL', 1199, 1, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1210, '新增/修改', '/api/admin/exam/model_4/card/save_generic', 'URL', 1199, 2, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1211, '删除', '/api/admin/exam/model_4/card/delete_generic', 'URL', 1199, 3, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1212, '生成图片', '/api/admin/exam/model_4/card/convert_image', 'URL', 1199, 4, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1213, '下载', '/api/admin/exam/model_4/card/download_card', 'URL', 1199, 5, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1214, '批量下载', '/api/admin/exam/model_4/card/batch_download_card', 'URL', 1199, 6, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1215, '列表', 'List', 'LIST', 1199, 5, 'AUTH', '1209', 1, 0, 1);
+
 ALTER TABLE `mark_arbitrate_history` CHANGE COLUMN `group_number` `group_number` INT NULL COMMENT '大题号' ;
 ALTER TABLE `mark_problem_history` CHANGE COLUMN `group_number` `group_number` INT NULL COMMENT '大题号' ;
 ALTER TABLE `mark_subjective_score` CHANGE COLUMN `group_number` `group_number` INT NULL COMMENT '分组序号' ;

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

@@ -0,0 +1,24 @@
+package com.qmth.distributed.print.api;
+
+
+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>
+ * 模式4题卡 前端控制器
+ * </p>
+ *
+ * @author wangliang
+ * @since 2025-03-06
+ */
+@Api(tags = "版本管理Controller")
+@RestController
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_VERSION)
+public class ExamCardModelFourController {
+
+}