|
@@ -1,3 +1,4 @@
|
|
|
+use scan_db;
|
|
|
-- ----------------------------
|
|
|
-- Table structure for sc_answer_card
|
|
|
-- ----------------------------
|
|
@@ -14,6 +15,8 @@ CREATE TABLE `sc_answer_card`
|
|
|
`source` varchar(16) NOT NULL,
|
|
|
`need_adapte` bit(1) NOT NULL,
|
|
|
`single_page` bit(1) NOT NULL,
|
|
|
+ `slice_config` text NOT NULL,
|
|
|
+ `slice_name` text DEFAULT NULL,
|
|
|
`parameter` text DEFAULT NULL,
|
|
|
`remark` varchar(255) DEFAULT NULL,
|
|
|
`creator_id` bigint DEFAULT NULL,
|
|
@@ -40,11 +43,14 @@ CREATE TABLE `sc_exam`
|
|
|
`allow_unexist_paper` bit(1) NOT NULL,
|
|
|
`answer_front_card_type` int NOT NULL,
|
|
|
`enable_single_page_answer` bit(1) NOT NULL,
|
|
|
- `answer_paper_number_figure` int NOT NULL,
|
|
|
`enable_upload` bit(1) NOT NULL,
|
|
|
`enable_sync_verify` bit(1) NOT NULL,
|
|
|
`paper_type_barcode_content` text DEFAULT NULL,
|
|
|
`absent_barcode_content` varchar(16) DEFAULT NULL,
|
|
|
+ `image_transfer_mode` varchar(32) DEFAULT NULL,
|
|
|
+ `image_check_ratio` double DEFAULT NULL,
|
|
|
+ `data_sync_time` bigint DEFAULT NULL,
|
|
|
+ `card_sync_time` bigint DEFAULT NULL,
|
|
|
`creator_id` bigint DEFAULT NULL,
|
|
|
`updater_id` bigint DEFAULT NULL,
|
|
|
`create_time` bigint DEFAULT NULL,
|
|
@@ -70,10 +76,10 @@ CREATE TABLE `sc_omr_task`
|
|
|
`status` varchar(16) NOT NULL,
|
|
|
`device` varchar(64) DEFAULT NULL,
|
|
|
`pages` text NOT NULL,
|
|
|
- `creator_id` bigint DEFAULT NULL,
|
|
|
- `updater_id` bigint DEFAULT NULL,
|
|
|
- `create_time` bigint DEFAULT NULL,
|
|
|
- `update_time` bigint DEFAULT NULL,
|
|
|
+ `creator_id` bigint DEFAULT NULL,
|
|
|
+ `updater_id` bigint DEFAULT NULL,
|
|
|
+ `create_time` bigint DEFAULT NULL,
|
|
|
+ `update_time` bigint DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`),
|
|
|
UNIQUE KEY `group_paper` (`group_id`, `paper_id`),
|
|
|
KEY `exam_status` (`exam_id`, `status`, `student_id`)
|
|
@@ -143,7 +149,6 @@ CREATE TABLE `sc_system_config`
|
|
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
|
`scanner_enable_login` bit(1) DEFAULT NULL,
|
|
|
`scanner_password` varchar(16) DEFAULT NULL,
|
|
|
- `image_transfer_mode` varchar(16) DEFAULT NULL,
|
|
|
`system_mode` varchar(16) NOT NULL,
|
|
|
`client_version` varchar(16) DEFAULT NULL,
|
|
|
`client_uri` varchar(255) DEFAULT NULL,
|
|
@@ -191,42 +196,58 @@ CREATE TABLE `sc_scanner_card`
|
|
|
DROP TABLE IF EXISTS `sc_batch`;
|
|
|
CREATE TABLE `sc_batch`
|
|
|
(
|
|
|
- `id` bigint NOT NULL AUTO_INCREMENT,
|
|
|
- `exam_id` bigint NOT NULL,
|
|
|
- `device` varchar(64) NOT NULL,
|
|
|
- `package_code` varchar(64) DEFAULT NULL,
|
|
|
- `scan_count` int NOT NULL,
|
|
|
- `assigned_count` int NOT NULL,
|
|
|
- `status` varchar(16) NOT NULL,
|
|
|
- `verify_status` varchar(16) DEFAULT NULL,
|
|
|
- `creator_id` bigint DEFAULT NULL,
|
|
|
- `updater_id` bigint DEFAULT NULL,
|
|
|
- `create_time` bigint DEFAULT NULL,
|
|
|
- `update_time` bigint DEFAULT NULL,
|
|
|
- PRIMARY KEY (`id`)
|
|
|
+ `id` bigint NOT NULL AUTO_INCREMENT,
|
|
|
+ `exam_id` bigint NOT NULL,
|
|
|
+ `device` varchar(64) NOT NULL,
|
|
|
+ `package_code` varchar(64) DEFAULT NULL,
|
|
|
+ `scan_count` int NOT NULL,
|
|
|
+ `assigned_count` int NOT NULL,
|
|
|
+ `status` varchar(16) NOT NULL,
|
|
|
+ `verify_status` varchar(16) DEFAULT NULL,
|
|
|
+ `check_status` varchar(16) DEFAULT NULL,
|
|
|
+ `check_image_user_id` bigint DEFAULT NULL,
|
|
|
+ `check_image_time` bigint DEFAULT NULL,
|
|
|
+ `creator_id` bigint DEFAULT NULL,
|
|
|
+ `updater_id` bigint DEFAULT NULL,
|
|
|
+ `create_time` bigint DEFAULT NULL,
|
|
|
+ `update_time` bigint DEFAULT NULL,
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
+ KEY `exam_verify_status` (`exam_id`, `verify_status`)
|
|
|
+) ENGINE = InnoDB
|
|
|
+ DEFAULT CHARSET = utf8mb4;
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `sc_batch_paper`;
|
|
|
+CREATE TABLE `sc_batch_paper`
|
|
|
+(
|
|
|
+ `batch_id` bigint(20) NOT NULL,
|
|
|
+ `student_id` bigint(20) NOT NULL,
|
|
|
+ `paper_number` int(11) NOT NULL,
|
|
|
+ `paper_id` bigint(20) NOT NULL,
|
|
|
+ `card_number` int(11) NOT NULL,
|
|
|
+ `assigned` bit(1) NOT NULL,
|
|
|
+ `need_check` bit(1) DEFAULT NULL,
|
|
|
+ PRIMARY KEY (`batch_id`, `student_id`, `paper_number`),
|
|
|
+ UNIQUE KEY `paper_id` (`paper_id`)
|
|
|
) ENGINE = InnoDB
|
|
|
DEFAULT CHARSET = utf8mb4;
|
|
|
|
|
|
DROP TABLE IF EXISTS `sc_paper`;
|
|
|
CREATE TABLE `sc_paper`
|
|
|
(
|
|
|
- `id` bigint NOT NULL AUTO_INCREMENT,
|
|
|
- `exam_id` bigint NOT NULL,
|
|
|
- `student_id` bigint NOT NULL,
|
|
|
- `batch_id` bigint NOT NULL,
|
|
|
- `card_number` int NOT NULL,
|
|
|
- `exam_number` varchar(128) NOT NULL,
|
|
|
- `number` int NOT NULL,
|
|
|
- `page_count` int NOT NULL,
|
|
|
- `mismatch` bit(1) NOT NULL,
|
|
|
- `assigned` bit(1) NOT NULL,
|
|
|
- `question_filled` bit(1) NOT NULL,
|
|
|
+ `id` bigint NOT NULL AUTO_INCREMENT,
|
|
|
+ `exam_id` bigint NOT NULL,
|
|
|
+ `card_number` int NOT NULL,
|
|
|
+ `number` int NOT NULL,
|
|
|
+ `page_count` int NOT NULL,
|
|
|
+ `mismatch` bit(1) NOT NULL,
|
|
|
+ `assigned` bit(1) NOT NULL,
|
|
|
+ `question_filled` bit(1) NOT NULL,
|
|
|
`creator_id` bigint DEFAULT NULL,
|
|
|
`updater_id` bigint DEFAULT NULL,
|
|
|
`create_time` bigint DEFAULT NULL,
|
|
|
`update_time` bigint DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`),
|
|
|
- UNIQUE KEY `batch_student_number` (`batch_id`, `student_id`, `number`)
|
|
|
+ KEY `mismatch` (`exam_id`, `mismatch`)
|
|
|
) ENGINE = InnoDB
|
|
|
DEFAULT CHARSET = utf8mb4;
|
|
|
|
|
@@ -235,9 +256,6 @@ CREATE TABLE `sc_paper_page`
|
|
|
(
|
|
|
`paper_id` bigint NOT NULL,
|
|
|
`page_index` int NOT NULL,
|
|
|
- `batch_id` bigint NOT NULL,
|
|
|
- `student_id` bigint NOT NULL,
|
|
|
- `exam_id` bigint NOT NULL,
|
|
|
`absent` text DEFAULT NULL,
|
|
|
`breach` text DEFAULT NULL,
|
|
|
`paper_type` text DEFAULT NULL,
|
|
@@ -246,10 +264,10 @@ CREATE TABLE `sc_paper_page`
|
|
|
`sheet_path` varchar(255) NOT NULL,
|
|
|
`slice_path` text DEFAULT NULL,
|
|
|
`recog_data` longtext DEFAULT NULL,
|
|
|
- `create_time` bigint DEFAULT NULL,
|
|
|
- `update_time` bigint DEFAULT NULL,
|
|
|
`creator_id` bigint DEFAULT NULL,
|
|
|
`updater_id` bigint DEFAULT NULL,
|
|
|
+ `create_time` bigint DEFAULT NULL,
|
|
|
+ `update_time` bigint DEFAULT NULL,
|
|
|
PRIMARY KEY (`paper_id`, `page_index`)
|
|
|
) ENGINE = InnoDB
|
|
|
DEFAULT CHARSET = utf8mb4;
|
|
@@ -275,6 +293,27 @@ CREATE TABLE `sc_paper_structure`
|
|
|
) ENGINE = InnoDB
|
|
|
DEFAULT CHARSET = utf8mb4;
|
|
|
|
|
|
+DROP TABLE IF EXISTS `sc_question`;
|
|
|
+CREATE TABLE `sc_question`
|
|
|
+(
|
|
|
+ `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
|
+ `exam_id` int(11) NOT NULL COMMENT '考试ID',
|
|
|
+ `subject_code` varchar(32) NOT NULL COMMENT '科目代码',
|
|
|
+ `paper_type` varchar(8) NOT NULL COMMENT '试卷类型',
|
|
|
+ `objective` tinyint(1) NOT NULL COMMENT '是否客观题',
|
|
|
+ `main_number` int(11) NOT NULL COMMENT '大题号',
|
|
|
+ `sub_number` varchar(32) NOT NULL COMMENT '小题号',
|
|
|
+ `main_title` varchar(128) NOT NULL COMMENT '大题名称',
|
|
|
+ `total_score` double DEFAULT NULL COMMENT '满分',
|
|
|
+ `creator_id` bigint DEFAULT NULL,
|
|
|
+ `updater_id` bigint DEFAULT NULL,
|
|
|
+ `create_time` bigint DEFAULT NULL,
|
|
|
+ `update_time` bigint DEFAULT NULL,
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
+ UNIQUE KEY `index1` (`exam_id`, `subject_code`, `objective`, `paper_type`, `main_number`, `sub_number`)
|
|
|
+) ENGINE = InnoDB
|
|
|
+ DEFAULT CHARSET = utf8mb4 COMMENT ='小题信息表';
|
|
|
+
|
|
|
|
|
|
DROP TABLE IF EXISTS `sc_omr_group`;
|
|
|
CREATE TABLE `sc_omr_group`
|
|
@@ -325,9 +364,11 @@ CREATE TABLE `sc_student`
|
|
|
`subject_code` varchar(64) NOT NULL,
|
|
|
`package_code` varchar(64) DEFAULT NULL,
|
|
|
`exam_site` varchar(64) DEFAULT NULL,
|
|
|
+ `exam_site_name` varchar(64) DEFAULT NULL,
|
|
|
`exam_room` varchar(64) DEFAULT NULL,
|
|
|
`seat_number` varchar(16) DEFAULT NULL,
|
|
|
`campus_name` varchar(64) DEFAULT NULL,
|
|
|
+ `campus_code` varchar(64) DEFAULT NULL,
|
|
|
`status` varchar(16) NOT NULL,
|
|
|
`omr_absent` bit(1) NOT NULL,
|
|
|
`question_filled` bit(1) NOT NULL,
|
|
@@ -335,7 +376,10 @@ CREATE TABLE `sc_student`
|
|
|
`absent_suspect` bit(1) NOT NULL,
|
|
|
`incomplete` bit(1) NOT NULL,
|
|
|
`card_number` int DEFAULT NULL,
|
|
|
+ `device` varchar(32) DEFAULT NULL,
|
|
|
`paper_type` varchar(16) NOT NULL,
|
|
|
+ `exam_status` varchar(32) DEFAULT NULL,
|
|
|
+ `breach_code` varchar(32) DEFAULT NULL,
|
|
|
`file_upload_status` varchar(16) DEFAULT NULL,
|
|
|
`data_upload_status` varchar(16) DEFAULT NULL,
|
|
|
`creator_id` bigint DEFAULT NULL,
|
|
@@ -343,8 +387,7 @@ CREATE TABLE `sc_student`
|
|
|
`create_time` bigint DEFAULT NULL,
|
|
|
`update_time` bigint DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`),
|
|
|
- UNIQUE KEY `exam_number` (`exam_id`, `exam_number`),
|
|
|
- UNIQUE KEY `exam_student_subject` (`exam_id`, `student_code`, `subject_code`)
|
|
|
+ UNIQUE KEY `exam_number` (`exam_id`, `exam_number`)
|
|
|
) ENGINE = InnoDB
|
|
|
DEFAULT CHARSET = utf8mb4;
|
|
|
|
|
@@ -354,10 +397,6 @@ CREATE TABLE `sc_student_paper`
|
|
|
`student_id` bigint NOT NULL,
|
|
|
`paper_number` int NOT NULL,
|
|
|
`paper_id` bigint NOT NULL,
|
|
|
- `creator_id` bigint DEFAULT NULL,
|
|
|
- `updater_id` bigint DEFAULT NULL,
|
|
|
- `create_time` bigint DEFAULT NULL,
|
|
|
- `update_time` bigint DEFAULT NULL,
|
|
|
PRIMARY KEY (`student_id`, `paper_number`),
|
|
|
UNIQUE KEY `paper_id` (`paper_id`)
|
|
|
) ENGINE = InnoDB
|
|
@@ -366,13 +405,14 @@ CREATE TABLE `sc_student_paper`
|
|
|
DROP TABLE IF EXISTS `sc_subject`;
|
|
|
CREATE TABLE `sc_subject`
|
|
|
(
|
|
|
- `exam_id` bigint NOT NULL,
|
|
|
- `code` varchar(64) NOT NULL,
|
|
|
- `name` varchar(64) NOT NULL,
|
|
|
- `creator_id` bigint DEFAULT NULL,
|
|
|
- `updater_id` bigint DEFAULT NULL,
|
|
|
- `create_time` bigint DEFAULT NULL,
|
|
|
- `update_time` bigint DEFAULT NULL,
|
|
|
+ `exam_id` bigint NOT NULL,
|
|
|
+ `code` varchar(64) NOT NULL,
|
|
|
+ `name` varchar(64) NOT NULL,
|
|
|
+ `paper_type_barcode_content` text DEFAULT NULL,
|
|
|
+ `creator_id` bigint DEFAULT NULL,
|
|
|
+ `updater_id` bigint DEFAULT NULL,
|
|
|
+ `create_time` bigint DEFAULT NULL,
|
|
|
+ `update_time` bigint DEFAULT NULL,
|
|
|
PRIMARY KEY (`exam_id`, `code`)
|
|
|
) ENGINE = InnoDB
|
|
|
DEFAULT CHARSET = utf8mb4;
|
|
@@ -383,6 +423,7 @@ CREATE TABLE `sc_file_property`
|
|
|
`path` varchar(255) NOT NULL,
|
|
|
`md5` varchar(32) NOT NULL,
|
|
|
`exam_id` bigint NOT NULL,
|
|
|
+ `file_size` bigint NOT NULL,
|
|
|
`create_time` bigint DEFAULT NULL,
|
|
|
`update_time` bigint DEFAULT NULL,
|
|
|
PRIMARY KEY (`path`)
|
|
@@ -399,12 +440,27 @@ CREATE TABLE `sc_user`
|
|
|
`role` varchar(16) NOT NULL,
|
|
|
`enable` tinyint(1) NOT NULL,
|
|
|
`school_id` bigint NOT NULL,
|
|
|
- `creator_id` bigint DEFAULT NULL,
|
|
|
- `updater_id` bigint DEFAULT NULL,
|
|
|
- `create_time` bigint DEFAULT NULL,
|
|
|
- `update_time` bigint DEFAULT NULL,
|
|
|
+ `device` varchar(64) DEFAULT NULL,
|
|
|
+ `creator_id` bigint DEFAULT NULL,
|
|
|
+ `updater_id` bigint DEFAULT NULL,
|
|
|
+ `create_time` bigint DEFAULT NULL,
|
|
|
+ `update_time` bigint DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`),
|
|
|
UNIQUE KEY `login_name` (`login_name`)
|
|
|
) ENGINE = InnoDB
|
|
|
DEFAULT CHARSET = utf8mb4;
|
|
|
|
|
|
+DROP TABLE IF EXISTS `sc_adapte_file`;
|
|
|
+CREATE TABLE `sc_adapte_file`
|
|
|
+(
|
|
|
+ `exam_id` bigint NOT NULL,
|
|
|
+ `card_number` int NOT NULL,
|
|
|
+ `role` varchar(16) NOT NULL,
|
|
|
+ `device` varchar(64) NOT NULL,
|
|
|
+ `uri` varchar(255) NOT NULL,
|
|
|
+ `md5` varchar(32) NOT NULL,
|
|
|
+ `create_time` bigint DEFAULT NULL,
|
|
|
+ `update_time` bigint DEFAULT NULL,
|
|
|
+ PRIMARY KEY (`exam_id`, `card_number`, `role`, `device`)
|
|
|
+) ENGINE = InnoDB
|
|
|
+ DEFAULT CHARSET = utf8mb4;
|