From 25fcd4e000abbb6b8550b2c525c514eb7b1a6e94 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Wed, 12 Oct 2022 10:41:01 +0800 Subject: [PATCH 1/3] paper --- .../rtss/simulation/cbtc/CTC/rail/dcmd/data/DisCmdDb.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/dcmd/data/DisCmdDb.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/dcmd/data/DisCmdDb.java index f4e16dea1..7a270ba0a 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/dcmd/data/DisCmdDb.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/dcmd/data/DisCmdDb.java @@ -1,6 +1,5 @@ package club.joylink.rtss.simulation.cbtc.CTC.rail.dcmd.data; -import club.joylink.rtss.simulation.cbtc.data.map.MapElement; import club.joylink.rtss.simulation.cbtc.member.SimulationMember; import org.springframework.util.CollectionUtils; import java.lang.reflect.Field; From d64117292a48d9cbf70ed8ff41e6d2bf7b09ada6 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Wed, 12 Oct 2022 17:44:11 +0800 Subject: [PATCH 2/3] paper --- .../mybatis/mapper/PaperCompositionDAO.xml | 22 +++++++++---------- .../resources/mybatis/mapper/PaperRuleDAO.xml | 22 +++++++++---------- .../resources/mybatis/mapper/PaperUserDAO.xml | 22 +++++++++---------- .../mybatis/mapper/PaperUserQuestionDAO.xml | 22 +++++++++---------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/main/resources/mybatis/mapper/PaperCompositionDAO.xml b/src/main/resources/mybatis/mapper/PaperCompositionDAO.xml index 65a595af0..647f29994 100644 --- a/src/main/resources/mybatis/mapper/PaperCompositionDAO.xml +++ b/src/main/resources/mybatis/mapper/PaperCompositionDAO.xml @@ -83,7 +83,7 @@ distinct - from paper_composition + from rts_paper_composition @@ -102,21 +102,21 @@ - delete from paper_composition + delete from rts_paper_composition where id = #{id,jdbcType=BIGINT} - delete from paper_composition + delete from rts_paper_composition - insert into paper_composition (id, `name`, profile, + insert into rts_paper_composition (id, `name`, profile, org_id, start_time, end_time, valid_duration, pass_score, creator_id, create_time, update_time, `state` @@ -128,7 +128,7 @@ ) - insert into paper_composition + insert into rts_paper_composition id, @@ -207,13 +207,13 @@ - update paper_composition + update rts_paper_composition id = #{record.id,jdbcType=BIGINT}, @@ -257,7 +257,7 @@ - update paper_composition + update rts_paper_composition set id = #{record.id,jdbcType=BIGINT}, `name` = #{record.name,jdbcType=VARCHAR}, profile = #{record.profile,jdbcType=VARCHAR}, @@ -275,7 +275,7 @@ - update paper_composition + update rts_paper_composition `name` = #{name,jdbcType=VARCHAR}, @@ -314,7 +314,7 @@ where id = #{id,jdbcType=BIGINT} - update paper_composition + update rts_paper_composition set `name` = #{name,jdbcType=VARCHAR}, profile = #{profile,jdbcType=VARCHAR}, org_id = #{orgId,jdbcType=BIGINT}, diff --git a/src/main/resources/mybatis/mapper/PaperRuleDAO.xml b/src/main/resources/mybatis/mapper/PaperRuleDAO.xml index 440ffd830..25bced396 100644 --- a/src/main/resources/mybatis/mapper/PaperRuleDAO.xml +++ b/src/main/resources/mybatis/mapper/PaperRuleDAO.xml @@ -77,7 +77,7 @@ distinct - from paper_rule + from rts_paper_rule @@ -96,21 +96,21 @@ - delete from paper_rule + delete from rts_paper_rule where id = #{id,jdbcType=BIGINT} - delete from paper_rule + delete from rts_paper_rule - insert into paper_rule (id, pc_id, `type`, + insert into rts_paper_rule (id, pc_id, `type`, subType, tags, amount, score) values (#{id,jdbcType=BIGINT}, #{pcId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, @@ -118,7 +118,7 @@ #{score,jdbcType=INTEGER}) - insert into paper_rule + insert into rts_paper_rule id, @@ -167,13 +167,13 @@ - update paper_rule + update rts_paper_rule id = #{record.id,jdbcType=BIGINT}, @@ -202,7 +202,7 @@ - update paper_rule + update rts_paper_rule set id = #{record.id,jdbcType=BIGINT}, pc_id = #{record.pcId,jdbcType=BIGINT}, `type` = #{record.type,jdbcType=INTEGER}, @@ -215,7 +215,7 @@ - update paper_rule + update rts_paper_rule pc_id = #{pcId,jdbcType=BIGINT}, @@ -239,7 +239,7 @@ where id = #{id,jdbcType=BIGINT} - update paper_rule + update rts_paper_rule set pc_id = #{pcId,jdbcType=BIGINT}, `type` = #{type,jdbcType=INTEGER}, subType = #{subtype,jdbcType=INTEGER}, diff --git a/src/main/resources/mybatis/mapper/PaperUserDAO.xml b/src/main/resources/mybatis/mapper/PaperUserDAO.xml index e5718591e..3e0b5b757 100644 --- a/src/main/resources/mybatis/mapper/PaperUserDAO.xml +++ b/src/main/resources/mybatis/mapper/PaperUserDAO.xml @@ -79,7 +79,7 @@ distinct - from paper_user + from rts_paper_user @@ -98,21 +98,21 @@ - delete from paper_user + delete from rts_paper_user where id = #{id,jdbcType=BIGINT} - delete from paper_user + delete from rts_paper_user - insert into paper_user (id, user_id, pc_id, + insert into rts_paper_user (id, user_id, pc_id, org_id, score, start_time, end_time, cause, create_time ) @@ -122,7 +122,7 @@ ) - insert into paper_user + insert into rts_paper_user id, @@ -183,13 +183,13 @@ - update paper_user + update rts_paper_user id = #{record.id,jdbcType=BIGINT}, @@ -224,7 +224,7 @@ - update paper_user + update rts_paper_user set id = #{record.id,jdbcType=BIGINT}, user_id = #{record.userId,jdbcType=BIGINT}, pc_id = #{record.pcId,jdbcType=BIGINT}, @@ -239,7 +239,7 @@ - update paper_user + update rts_paper_user user_id = #{userId,jdbcType=BIGINT}, @@ -269,7 +269,7 @@ where id = #{id,jdbcType=BIGINT} - update paper_user + update rts_paper_user set user_id = #{userId,jdbcType=BIGINT}, pc_id = #{pcId,jdbcType=BIGINT}, org_id = #{orgId,jdbcType=BIGINT}, diff --git a/src/main/resources/mybatis/mapper/PaperUserQuestionDAO.xml b/src/main/resources/mybatis/mapper/PaperUserQuestionDAO.xml index de218f51e..6d0d896f0 100644 --- a/src/main/resources/mybatis/mapper/PaperUserQuestionDAO.xml +++ b/src/main/resources/mybatis/mapper/PaperUserQuestionDAO.xml @@ -76,7 +76,7 @@ distinct - from paper_user_question + from rts_paper_user_question @@ -95,21 +95,21 @@ - delete from paper_user_question + delete from rts_paper_user_question where id = #{id,jdbcType=BIGINT} - delete from paper_user_question + delete from rts_paper_user_question - insert into paper_user_question (id, pu_id, org_id, + insert into rts_paper_user_question (id, pu_id, org_id, `type`, question_id, `state` ) values (#{id,jdbcType=BIGINT}, #{puId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT}, @@ -117,7 +117,7 @@ ) - insert into paper_user_question + insert into rts_paper_user_question id, @@ -160,13 +160,13 @@ - update paper_user_question + update rts_paper_user_question id = #{record.id,jdbcType=BIGINT}, @@ -192,7 +192,7 @@ - update paper_user_question + update rts_paper_user_question set id = #{record.id,jdbcType=BIGINT}, pu_id = #{record.puId,jdbcType=BIGINT}, org_id = #{record.orgId,jdbcType=BIGINT}, @@ -204,7 +204,7 @@ - update paper_user_question + update rts_paper_user_question pu_id = #{puId,jdbcType=BIGINT}, @@ -225,7 +225,7 @@ where id = #{id,jdbcType=BIGINT} - update paper_user_question + update rts_paper_user_question set pu_id = #{puId,jdbcType=BIGINT}, org_id = #{orgId,jdbcType=BIGINT}, `type` = #{type,jdbcType=INTEGER}, From dcf41945aa7a3530ad5295833a02c345f8142ee6 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Wed, 12 Oct 2022 17:52:18 +0800 Subject: [PATCH 3/3] paper --- sql/20221008-xia-paper_composition.sql | 40 ----------- sql/20221008-xia-paper_rule.sql | 35 ---------- sql/20221008-xia-paper_user.sql | 37 ---------- sql/20221008-xia-paper_user_question.sql | 34 ---------- sql/20221012-xia-paper.sql | 86 ++++++++++++++++++++++++ 5 files changed, 86 insertions(+), 146 deletions(-) delete mode 100644 sql/20221008-xia-paper_composition.sql delete mode 100644 sql/20221008-xia-paper_rule.sql delete mode 100644 sql/20221008-xia-paper_user.sql delete mode 100644 sql/20221008-xia-paper_user_question.sql create mode 100644 sql/20221012-xia-paper.sql diff --git a/sql/20221008-xia-paper_composition.sql b/sql/20221008-xia-paper_composition.sql deleted file mode 100644 index 525f0230e..000000000 --- a/sql/20221008-xia-paper_composition.sql +++ /dev/null @@ -1,40 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : room - Source Server Type : MySQL - Source Server Version : 80029 - Source Host : 192.168.3.233:3306 - Source Schema : joylink - - Target Server Type : MySQL - Target Server Version : 80029 - File Encoding : 65001 - - Date: 09/10/2022 14:50:58 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for paper_composition --- ---------------------------- -DROP TABLE IF EXISTS `paper_composition`; -CREATE TABLE `paper_composition` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷蓝图id', - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '试卷蓝图名称', - `profile` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '试卷蓝图简介', - `org_id` bigint NULL DEFAULT NULL COMMENT '组织id', - `start_time` datetime NULL DEFAULT NULL COMMENT '启用起始时间', - `end_time` datetime NULL DEFAULT NULL COMMENT '启用截止时间', - `valid_duration` int NULL DEFAULT NULL COMMENT '完成考试有效最长时长,单位min', - `pass_score` int NULL DEFAULT NULL COMMENT '及格分', - `creator_id` bigint NULL DEFAULT NULL COMMENT '创建者id', - `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', - `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', - `state` int NULL DEFAULT NULL COMMENT '试卷蓝图状态:1-正在编辑,2-封存(不能修改),3-已经被使用(不能修改删除);定于见PaperCompositionState', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/20221008-xia-paper_rule.sql b/sql/20221008-xia-paper_rule.sql deleted file mode 100644 index f367fc886..000000000 --- a/sql/20221008-xia-paper_rule.sql +++ /dev/null @@ -1,35 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : room - Source Server Type : MySQL - Source Server Version : 80029 - Source Host : 192.168.3.233:3306 - Source Schema : joylink - - Target Server Type : MySQL - Target Server Version : 80029 - File Encoding : 65001 - - Date: 09/10/2022 14:51:19 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for paper_rule --- ---------------------------- -DROP TABLE IF EXISTS `paper_rule`; -CREATE TABLE `paper_rule` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷规则定义id', - `pc_id` bigint NULL DEFAULT NULL COMMENT 'paper_compostion的id', - `type` int NULL DEFAULT NULL COMMENT '试题类型:1-理论题,2-实训题', - `subType` int NULL DEFAULT NULL COMMENT '规则类型:理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)', - `tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '筛选题目的标签,即根据标签来筛选题目;List的json', - `amount` int NULL DEFAULT NULL COMMENT '该类型题目数量', - `score` int NULL DEFAULT NULL COMMENT '每题分值', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/20221008-xia-paper_user.sql b/sql/20221008-xia-paper_user.sql deleted file mode 100644 index 553f04513..000000000 --- a/sql/20221008-xia-paper_user.sql +++ /dev/null @@ -1,37 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : room - Source Server Type : MySQL - Source Server Version : 80029 - Source Host : 192.168.3.233:3306 - Source Schema : joylink - - Target Server Type : MySQL - Target Server Version : 80029 - File Encoding : 65001 - - Date: 09/10/2022 14:51:35 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for paper_user --- ---------------------------- -DROP TABLE IF EXISTS `paper_user`; -CREATE TABLE `paper_user` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id', - `user_id` bigint NOT NULL COMMENT '用户id', - `pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id', - `org_id` bigint NULL DEFAULT NULL COMMENT '组织id', - `score` int NULL DEFAULT NULL COMMENT '用户最终得分', - `start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间', - `end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间', - `cause` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因', - `create_time` datetime NULL DEFAULT NULL COMMENT '用户试卷生成时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/20221008-xia-paper_user_question.sql b/sql/20221008-xia-paper_user_question.sql deleted file mode 100644 index 2eec5dd8b..000000000 --- a/sql/20221008-xia-paper_user_question.sql +++ /dev/null @@ -1,34 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : room - Source Server Type : MySQL - Source Server Version : 80029 - Source Host : 192.168.3.233:3306 - Source Schema : joylink - - Target Server Type : MySQL - Target Server Version : 80029 - File Encoding : 65001 - - Date: 09/10/2022 14:51:52 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for paper_user_question --- ---------------------------- -DROP TABLE IF EXISTS `paper_user_question`; -CREATE TABLE `paper_user_question` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷试题结果id', - `pu_id` bigint NOT NULL COMMENT '用户试卷paper_user的id', - `org_id` bigint NULL DEFAULT NULL COMMENT '组织id', - `type` int NULL DEFAULT NULL COMMENT '试题类型:1-理论题,2-实训题', - `question_id` bigint NOT NULL COMMENT '试题id', - `state` int NULL DEFAULT NULL COMMENT '试题状态:1-未做(初始),2-答对,3-答错,4-时间到结束', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 151 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/20221012-xia-paper.sql b/sql/20221012-xia-paper.sql new file mode 100644 index 000000000..d7f9477d2 --- /dev/null +++ b/sql/20221012-xia-paper.sql @@ -0,0 +1,86 @@ +/* + Navicat Premium Data Transfer + + Source Server : room + Source Server Type : MySQL + Source Server Version : 80029 + Source Host : 192.168.3.233:3306 + Source Schema : joylink + + Target Server Type : MySQL + Target Server Version : 80029 + File Encoding : 65001 + + Date: 12/10/2022 17:49:36 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for rts_paper_composition +-- ---------------------------- +DROP TABLE IF EXISTS `rts_paper_composition`; +CREATE TABLE `rts_paper_composition` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷蓝图id', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '试卷蓝图名称', + `profile` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '试卷蓝图简介', + `org_id` bigint NULL DEFAULT NULL COMMENT '组织id', + `start_time` datetime NULL DEFAULT NULL COMMENT '启用起始时间', + `end_time` datetime NULL DEFAULT NULL COMMENT '启用截止时间', + `valid_duration` int NULL DEFAULT NULL COMMENT '完成考试有效最长时长,单位min', + `pass_score` int NULL DEFAULT NULL COMMENT '及格分', + `creator_id` bigint NULL DEFAULT NULL COMMENT '创建者id', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + `state` int NULL DEFAULT NULL COMMENT '试卷蓝图状态:1-正在编辑,2-封存(不能修改),3-已经被使用(不能修改删除);定于见PaperCompositionState', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for rts_paper_rule +-- ---------------------------- +DROP TABLE IF EXISTS `rts_paper_rule`; +CREATE TABLE `rts_paper_rule` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷规则定义id', + `pc_id` bigint NULL DEFAULT NULL COMMENT 'paper_compostion的id', + `type` int NULL DEFAULT NULL COMMENT '试题类型:1-理论题,2-实训题', + `subType` int NULL DEFAULT NULL COMMENT '规则类型:理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)', + `tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '筛选题目的标签,即根据标签来筛选题目;List的json', + `amount` int NULL DEFAULT NULL COMMENT '该类型题目数量', + `score` int NULL DEFAULT NULL COMMENT '每题分值', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for rts_paper_user +-- ---------------------------- +DROP TABLE IF EXISTS `rts_paper_user`; +CREATE TABLE `rts_paper_user` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id', + `user_id` bigint NOT NULL COMMENT '用户id', + `pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id', + `org_id` bigint NULL DEFAULT NULL COMMENT '组织id', + `score` int NULL DEFAULT NULL COMMENT '用户最终得分', + `start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间', + `end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间', + `cause` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因', + `create_time` datetime NULL DEFAULT NULL COMMENT '用户试卷生成时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for rts_paper_user_question +-- ---------------------------- +DROP TABLE IF EXISTS `rts_paper_user_question`; +CREATE TABLE `rts_paper_user_question` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷试题结果id', + `pu_id` bigint NOT NULL COMMENT '用户试卷paper_user的id', + `org_id` bigint NULL DEFAULT NULL COMMENT '组织id', + `type` int NULL DEFAULT NULL COMMENT '试题类型:1-理论题,2-实训题', + `question_id` bigint NOT NULL COMMENT '试题id', + `state` int NULL DEFAULT NULL COMMENT '试题状态:1-未做(初始),2-答对,3-答错,4-时间到结束', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 151 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1;