xiaofei 1 жил өмнө
parent
commit
68f16fff97

+ 81 - 79
stmms-ms-main/install/mysql/init/msjg_db.sql

@@ -1,5 +1,86 @@
 USE msjg_db;
 
+-- ----------------------------
+-- Table structure for paper
+-- ----------------------------
+CREATE TABLE IF NOT EXISTS `paper`  (
+    `id` bigint(20) NOT NULL AUTO_INCREMENT,
+    `work_id` bigint(20) NOT NULL,
+    `subject` varchar(50)  NOT NULL,
+    `exam_number` varchar(50)  NOT NULL,
+    `student_name` varchar(50)  NOT NULL,
+    `area_code` varchar(50)  NOT NULL,
+    `idx` bigint(20) NULL DEFAULT NULL,
+    `is_arbitrated` bit(1) NOT NULL,
+    `is_manual` bit(1) NOT NULL,
+    `is_rejected` bit(1) NOT NULL,
+    `is_tagged` bit(1) NOT NULL,
+    `level` varchar(255)  NULL DEFAULT NULL,
+    `redo_level` varchar(255)  NULL DEFAULT NULL,
+    `score` double NULL DEFAULT NULL,
+    `mark_by_leader` bit(1) NOT NULL,
+    `marked_logic` bit(1) NOT NULL,
+    `question_id` bigint(20) NOT NULL,
+    `question_name` varchar(255)  NOT NULL,
+    `secret_number` varchar(255)  NULL DEFAULT NULL,
+    `uploaded_count` int(11) NOT NULL,
+    `uploaded_on` datetime(0) NULL DEFAULT NULL,
+    `inspect_range` bigint(20) NULL DEFAULT NULL,
+    `inspect_score` double NULL DEFAULT NULL,
+    `source_name` varchar(255) NULL DEFAULT NULL,
+    `inspect_level` varchar(255) NULL DEFAULT NULL,
+    `inspector` bigint(20) NULL DEFAULT NULL,
+    `is_sample` bit(1) NOT NULL,
+    `sheet_md5` varchar(255) NULL DEFAULT NULL,
+    `slice_md5` varchar(255) NULL DEFAULT NULL,
+    `random_seq` bigint(20) NULL DEFAULT NULL COMMENT '随机号',
+    `is_missing` bit(1) NOT NULL,
+    `exam_room` varchar(255) NULL DEFAULT NULL,
+    `is_test` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否试评,0:不是,1:数据已导入,2:试评中',
+    `is_active` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否激活',
+    `batch_no` bigint(45) NULL DEFAULT NULL COMMENT '批次号',
+    `score_batch_no` bigint(45) NULL DEFAULT NULL COMMENT '打分任务发布批次号',
+    `is_shift` bit(1) NULL DEFAULT b'0' COMMENT '是否改档',
+    `is_shift_score` bit(1) NULL DEFAULT b'0' COMMENT '是否改档打分',
+    `is_one_click` bit(1) NULL DEFAULT b'0' COMMENT '是否一键定档',
+    `is_rejected_by_leader` bit(1) NULL DEFAULT b'0' COMMENT '是否科组长打回',
+    `is_relate` bit(1) NULL DEFAULT b'0' COMMENT '是否关联试卷',
+    `sort_num` int(11) NULL DEFAULT NULL,
+    `scan_user_id` bigint(20) NULL DEFAULT NULL COMMENT '采集员ID',
+    `is_mark` bit(1) NULL DEFAULT b'0' COMMENT '是否标记',
+    `updated_on` datetime(0) NULL DEFAULT NULL,
+    PRIMARY KEY (`id`) USING BTREE,
+    INDEX `idx_paper_exam_number`(`exam_number`) USING BTREE,
+    INDEX `idx_union_1`(`batch_no`) USING BTREE,
+    INDEX `idx_union_2`(`question_id`, `level`) USING BTREE,
+    INDEX `idx_union_3`(`work_id`, `subject`, `batch_no`) USING BTREE,
+    INDEX `idx_union_4`(`is_shift`, `is_shift_score`) USING BTREE,
+    INDEX `idx_union_5`(`work_id`, `subject`, `score_batch_no`) USING BTREE
+    ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4;
+
+-- ----------------------------
+-- Table structure for work
+-- ----------------------------
+CREATE TABLE IF NOT EXISTS `work`  (
+    `id` bigint(20) NOT NULL AUTO_INCREMENT,
+    `name` varchar(255)  NULL DEFAULT NULL,
+    `organization_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
+    `active` bit(1) NOT NULL,
+    `created_on` date NULL DEFAULT NULL,
+    PRIMARY KEY (`id`) USING BTREE
+    ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4;
+
+-- ----------------------------
+-- Table structure for marker_group
+-- ----------------------------
+CREATE TABLE IF NOT EXISTS `marker_group`  (
+    `id` bigint(20) NOT NULL AUTO_INCREMENT,
+    `work_id` bigint(20) NOT NULL,
+    `subject` varchar(50)  NOT NULL,
+    `name` varchar(255)  NULL DEFAULT NULL,
+    PRIMARY KEY (`id`) USING BTREE
+    ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4;
+
 -- ----------------------------
 -- Table structure for attachment
 -- ----------------------------
@@ -340,16 +421,6 @@ CREATE TABLE IF NOT EXISTS `mark_user`  (
     CONSTRAINT `mark_user_ibfk_9` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
     ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4;
 
--- ----------------------------
--- Table structure for marker_group
--- ----------------------------
-CREATE TABLE IF NOT EXISTS `marker_group`  (
-    `id` bigint(20) NOT NULL AUTO_INCREMENT,
-    `work_id` bigint(20) NOT NULL,
-    `subject` varchar(50)  NOT NULL,
-    `name` varchar(255)  NULL DEFAULT NULL,
-    PRIMARY KEY (`id`) USING BTREE
-    ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4;
 
 -- ----------------------------
 -- Table structure for organization
@@ -363,64 +434,6 @@ CREATE TABLE IF NOT EXISTS `organization`  (
     PRIMARY KEY (`id`) USING BTREE
     ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '机构管理';
 
--- ----------------------------
--- Table structure for paper
--- ----------------------------
-CREATE TABLE IF NOT EXISTS `paper`  (
-    `id` bigint(20) NOT NULL AUTO_INCREMENT,
-    `work_id` bigint(20) NOT NULL,
-    `subject` varchar(50)  NOT NULL,
-    `exam_number` varchar(50)  NOT NULL,
-    `student_name` varchar(50)  NOT NULL,
-    `area_code` varchar(50)  NOT NULL,
-    `idx` bigint(20) NULL DEFAULT NULL,
-    `is_arbitrated` bit(1) NOT NULL,
-    `is_manual` bit(1) NOT NULL,
-    `is_rejected` bit(1) NOT NULL,
-    `is_tagged` bit(1) NOT NULL,
-    `level` varchar(255)  NULL DEFAULT NULL,
-    `redo_level` varchar(255)  NULL DEFAULT NULL,
-    `score` double NULL DEFAULT NULL,
-    `mark_by_leader` bit(1) NOT NULL,
-    `marked_logic` bit(1) NOT NULL,
-    `question_id` bigint(20) NOT NULL,
-    `question_name` varchar(255)  NOT NULL,
-    `secret_number` varchar(255)  NULL DEFAULT NULL,
-    `uploaded_count` int(11) NOT NULL,
-    `uploaded_on` datetime(0) NULL DEFAULT NULL,
-    `inspect_range` bigint(20) NULL DEFAULT NULL,
-    `inspect_score` double NULL DEFAULT NULL,
-    `source_name` varchar(255) NULL DEFAULT NULL,
-    `inspect_level` varchar(255) NULL DEFAULT NULL,
-    `inspector` bigint(20) NULL DEFAULT NULL,
-    `is_sample` bit(1) NOT NULL,
-    `sheet_md5` varchar(255) NULL DEFAULT NULL,
-    `slice_md5` varchar(255) NULL DEFAULT NULL,
-    `random_seq` bigint(20) NULL DEFAULT NULL COMMENT '随机号',
-    `is_missing` bit(1) NOT NULL,
-    `exam_room` varchar(255) NULL DEFAULT NULL,
-    `is_test` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否试评,0:不是,1:数据已导入,2:试评中',
-    `is_active` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否激活',
-    `batch_no` bigint(45) NULL DEFAULT NULL COMMENT '批次号',
-    `score_batch_no` bigint(45) NULL DEFAULT NULL COMMENT '打分任务发布批次号',
-    `is_shift` bit(1) NULL DEFAULT b'0' COMMENT '是否改档',
-    `is_shift_score` bit(1) NULL DEFAULT b'0' COMMENT '是否改档打分',
-    `is_one_click` bit(1) NULL DEFAULT b'0' COMMENT '是否一键定档',
-    `is_rejected_by_leader` bit(1) NULL DEFAULT b'0' COMMENT '是否科组长打回',
-    `is_relate` bit(1) NULL DEFAULT b'0' COMMENT '是否关联试卷',
-    `sort_num` int(11) NULL DEFAULT NULL,
-    `scan_user_id` bigint(20) NULL DEFAULT NULL COMMENT '采集员ID',
-    `is_mark` bit(1) NULL DEFAULT b'0' COMMENT '是否标记',
-    `updated_on` datetime(0) NULL DEFAULT NULL,
-    PRIMARY KEY (`id`) USING BTREE,
-    INDEX `idx_paper_exam_number`(`exam_number`) USING BTREE,
-    INDEX `idx_union_1`(`batch_no`) USING BTREE,
-    INDEX `idx_union_2`(`question_id`, `level`) USING BTREE,
-    INDEX `idx_union_3`(`work_id`, `subject`, `batch_no`) USING BTREE,
-    INDEX `idx_union_4`(`is_shift`, `is_shift_score`) USING BTREE,
-    INDEX `idx_union_5`(`work_id`, `subject`, `score_batch_no`) USING BTREE
-    ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4;
-
 -- ----------------------------
 -- Table structure for param_setting
 -- ----------------------------
@@ -495,15 +508,4 @@ CREATE TABLE IF NOT EXISTS `task_publish_setting`  (
     PRIMARY KEY (`id`) USING BTREE
     ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '发布打分任务';
 
--- ----------------------------
--- Table structure for work
--- ----------------------------
-CREATE TABLE IF NOT EXISTS `work`  (
-    `id` bigint(20) NOT NULL AUTO_INCREMENT,
-    `name` varchar(255)  NULL DEFAULT NULL,
-    `organization_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
-    `active` bit(1) NOT NULL,
-    `created_on` date NULL DEFAULT NULL,
-    PRIMARY KEY (`id`) USING BTREE
-    ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4;