USE teachcloud_db;

-- ----------------------------
-- Table structure for mark_arbitrate_history
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_arbitrate_history` (
    `id` bigint(20) NOT NULL COMMENT '自增主键',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(100) NOT NULL COMMENT '试卷编号',
    `group_number` int(11) NOT NULL COMMENT '大题号',
    `student_code` varchar(64) NOT NULL COMMENT '准考证号',
    `secret_number` varchar(64) NOT NULL COMMENT '考生密号',
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `status` varchar(16) NOT NULL COMMENT '状态',
    `update_user_id` bigint(20) DEFAULT NULL COMMENT '处理人ID',
    `total_score` double DEFAULT NULL COMMENT '总分',
    `score_list` text COMMENT '给分明细',
    `create_time` bigint(20) NOT NULL COMMENT '创建时间',
    `update_time` bigint(20) DEFAULT NULL COMMENT '处理时间',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `index1` (`exam_id`,`paper_number`,`group_number`,`status`) USING BTREE,
    KEY `index3` (`student_id`,`status`) USING BTREE,
    KEY `index2` (`update_user_id`,`status`,`update_time`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='仲裁记录表';

-- ----------------------------
-- Table structure for mark_group
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_group` (
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `course_code` varchar(100) DEFAULT NULL COMMENT '课程代码',
    `course_name` varchar(100) DEFAULT NULL COMMENT '课程名称',
    `paper_number` varchar(100) NOT NULL COMMENT '试卷编号',
    `number` int(11) NOT NULL COMMENT '序号',
    `pic_list` text COMMENT '小图配置',
    `total_score` double NOT NULL COMMENT '满分',
    `double_enable` tinyint(1) DEFAULT '0' COMMENT '是否开启双评',
    `double_rate` double DEFAULT NULL COMMENT '双评比例',
    `arbitrate_threshold` double DEFAULT NULL COMMENT '仲裁阈值',
    `score_policy` varchar(16) DEFAULT NULL COMMENT '合分策略',
    `task_count` int(11) NOT NULL COMMENT '任务总量',
    `marked_count` int(11) NOT NULL COMMENT '已评数量',
    `left_count` int(11) DEFAULT NULL COMMENT '剩余数量',
    PRIMARY KEY (`exam_id`,`paper_number`,`number`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='评卷分组表';

-- ----------------------------
-- Table structure for mark_group_student
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_group_student` (
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `group_number` int(11) NOT NULL COMMENT '分组ID',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(32) NOT NULL COMMENT '科目代码',
    `status` varchar(16) NOT NULL COMMENT '状态',
    PRIMARY KEY (`student_id`,`group_number`) USING BTREE,
    KEY `index1` (`exam_id`,`paper_number`,`group_number`,`status`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考生分组状态表';

-- ----------------------------
-- Table structure for mark_header_subjective_score
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_header_subjective_score` (
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `main_number` int(11) NOT NULL COMMENT '大题号',
    `sub_number` varchar(32) NOT NULL COMMENT '小题号',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(100) NOT NULL COMMENT '课程代码',
    `group_number` int(11) NOT NULL COMMENT '分组序号',
    `group_score` double NOT NULL COMMENT '分组得分',
    `main_score` double NOT NULL COMMENT '大题得分',
    `score` double NOT NULL COMMENT '小题得分',
    `uncalculate` tinyint(4) NOT NULL COMMENT '是否合分',
    `user_id` bigint(20) DEFAULT NULL COMMENT '科组长ID',
    PRIMARY KEY (`student_id`,`main_number`,`sub_number`) USING BTREE,
    KEY `index1` (`exam_id`,`paper_number`,`main_number`,`main_score`) USING BTREE,
    KEY `index11` (`exam_id`,`paper_number`,`main_number`,`main_score`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='主观题得分明细表';

-- ----------------------------
-- Table structure for mark_header_tag
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_header_tag` (
    `id` bigint(20) NOT NULL COMMENT '主键',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(45) NOT NULL COMMENT '试卷编号',
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `group_number` int(11) NOT NULL COMMENT '大题题号',
    `user_id` bigint(20) NOT NULL COMMENT '用户ID',
    `tag_name` varchar(64) NOT NULL COMMENT '标记内容',
    `position_x` double NOT NULL COMMENT 'X轴位置',
    `position_y` double NOT NULL COMMENT 'Y轴位置',
    `offset_index` int(11) NOT NULL COMMENT '裁切图序号',
    `offset_x` int(11) NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y` int(11) NOT NULL COMMENT '裁切图Y轴坐标',
    `tag_type` varchar(64) DEFAULT NULL COMMENT '标记类型',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `index1` (`student_id`,`group_number`) USING BTREE,
    KEY `index2` (`user_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组长特殊标记表';

-- ----------------------------
-- Table structure for mark_header_track
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_header_track` (
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `question_number` varchar(128) NOT NULL COMMENT '完整题号',
    `number` int(11) NOT NULL COMMENT '序号',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(100) NOT NULL COMMENT '科目代码',
    `group_number` int(11) NOT NULL COMMENT '大题题号',
    `user_id` bigint(20) NOT NULL COMMENT '用户ID',
    `score` double NOT NULL COMMENT '给分',
    `position_x` double NOT NULL COMMENT 'X轴位置',
    `position_y` double NOT NULL COMMENT 'Y轴位置',
    `offset_index` int(11) NOT NULL COMMENT '裁切图序号',
    `offset_x` int(11) NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y` int(11) NOT NULL COMMENT '裁切图Y轴坐标',
    PRIMARY KEY (`student_id`,`question_number`,`number`) USING BTREE,
    KEY `index1` (`student_id`,`group_number`) USING BTREE,
    KEY `index2` (`user_id`) USING BTREE,
    KEY `index3` (`exam_id`,`paper_number`,`group_number`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组长轨迹给分表';

-- ----------------------------
-- Table structure for mark_paper
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_paper` (
    `id` bigint(20) NOT NULL,
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `course_code` varchar(32) NOT NULL COMMENT '课程代码',
    `course_name` varchar(100) NOT NULL COMMENT '科目名称',
    `paper_number` varchar(64) DEFAULT NULL COMMENT '试卷编号',
    `course_paper_id` varchar(32) DEFAULT NULL COMMENT '试卷编号（交互）',
    `objective_score` double NOT NULL COMMENT '客观题满分',
    `subjective_score` double NOT NULL COMMENT '主观题满分',
    `total_score` double NOT NULL COMMENT '全卷满分',
    `student_count` int(11) DEFAULT NULL COMMENT '考生人数',
    `upload_count` int(11) NOT NULL COMMENT '已上传人数',
    `absent_count` int(11) DEFAULT NULL COMMENT '缺考人数',
    `remark` varchar(128) DEFAULT NULL COMMENT '备注',
    `sheet_config` text COMMENT '原图遮盖配置',
    `pass_score` double DEFAULT NULL COMMENT '及格分',
    `excellent_score` double DEFAULT NULL COMMENT '优秀分',
    `card_type` varchar(16) DEFAULT NULL COMMENT '题卡类型',
    `paper_file_path` varchar(500) DEFAULT NULL COMMENT '试卷文件类型',
    `answer_file_path` varchar(500) DEFAULT NULL COMMENT '标答文件类型',
    `auto_scroll` tinyint(1) DEFAULT NULL COMMENT '评卷是否跳转',
    `mark_mode` varchar(16) DEFAULT NULL COMMENT '评卷模式',
    `force_mode` tinyint(1) DEFAULT '1' COMMENT '强制评卷模式（不限为false）',
    `mark_start_time` bigint(20) DEFAULT NULL COMMENT '评卷开始时间',
    `mark_end_time` bigint(20) DEFAULT NULL COMMENT '评卷结束时间',
    `sheet_view` tinyint(4) DEFAULT NULL COMMENT '是否原卷显示',
    `show_object_score` tinyint(4) DEFAULT NULL COMMENT '评卷是否显示客观分',
    `group_status` tinyint(4) DEFAULT '0' COMMENT '评卷分组是否提交',
    `open_mark_class` tinyint(4) DEFAULT '0' COMMENT '是否开启分班阅',
    `status` varchar(10) DEFAULT NULL COMMENT '评卷状态',
    `package_code` mediumtext COMMENT '签到表编号',
    `user_id` bigint(20) DEFAULT NULL COMMENT '命题老师ID',
    `paper_type` varchar(10) DEFAULT NULL COMMENT '试卷类型',
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试科目表';

-- ----------------------------
-- Table structure for mark_paper_package
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_paper_package` (
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `course_code` varchar(32) NOT NULL COMMENT '课程代码',
    `course_name` varchar(100) NOT NULL COMMENT '科目名称',
    `paper_number` varchar(50) DEFAULT NULL COMMENT '试卷编号',
    `course_paper_id` varchar(50) NOT NULL COMMENT '课程试卷号',
    `paper_type` varchar(10) NOT NULL COMMENT '试卷类型',
    `package_code` varchar(10) NOT NULL COMMENT '卷袋号',
    PRIMARY KEY (`exam_id`,`course_paper_id`,`paper_type`,`package_code`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for mark_problem_history
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_problem_history` (
    `id` bigint(20) NOT NULL COMMENT '自增主键',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(32) NOT NULL COMMENT '试卷编号',
    `group_number` int(11) NOT NULL COMMENT '大题号',
    `student_code` varchar(64) NOT NULL COMMENT '学号',
    `secret_number` varchar(64) NOT NULL COMMENT '考生密号',
    `type` varchar(10) NOT NULL COMMENT '问题类型',
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `task_id` bigint(20) NOT NULL COMMENT '评卷任务ID',
    `status` varchar(16) DEFAULT NULL COMMENT '状态',
    `update_user_id` bigint(20) DEFAULT NULL COMMENT '处理人ID',
    `user_id` bigint(20) DEFAULT NULL COMMENT '评卷员ID',
    `score_list` text COMMENT '给分明细',
    `create_time` bigint(20) NOT NULL COMMENT '创建时间',
    `update_time` bigint(20) DEFAULT NULL COMMENT '处理时间',
    `remark` varchar(100) DEFAULT NULL COMMENT '问题原因',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `index2` (`update_user_id`,`status`,`update_time`) USING BTREE,
    KEY `index3` (`student_id`,`status`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='问题卷历史表';

-- ----------------------------
-- Table structure for mark_question
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_question` (
    `id` bigint(20) NOT NULL COMMENT '主键',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(100) NOT NULL COMMENT '试卷类型',
    `paper_type` varchar(100) DEFAULT NULL COMMENT '卷型',
    `objective` tinyint(4) NOT NULL COMMENT '是否客观题',
    `group_number` int(11) DEFAULT NULL COMMENT '分组序号',
    `main_number` int(11) NOT NULL COMMENT '大题号',
    `sub_number` int(11) NOT NULL COMMENT '小题号',
    `main_title` varchar(128) NOT NULL COMMENT '大题名称',
    `answer` varchar(16) DEFAULT NULL COMMENT '正确答案',
    `total_score` double DEFAULT NULL COMMENT '满分',
    `option_count` int(11) DEFAULT NULL COMMENT '客观题答案数量',
    `interval_score` double DEFAULT NULL COMMENT '评卷间隔分',
    `objective_policy` varchar(16) DEFAULT NULL COMMENT '客观题判分策略',
    `question_type` varchar(2) DEFAULT NULL COMMENT '题型',
    `name` varchar(128) DEFAULT NULL,
    `paper_index` int(11) DEFAULT NULL,
    `page_index` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小题信息表';

-- ----------------------------
-- Table structure for mark_special_tag
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_special_tag` (
    `id` bigint(20) NOT NULL COMMENT '主键',
    `task_id` bigint(20) NOT NULL COMMENT '评卷任务ID',
    `tag_name` varchar(64) NOT NULL COMMENT '标记内容',
    `position_x` double NOT NULL COMMENT 'X轴位置',
    `position_y` double NOT NULL COMMENT 'Y轴位置',
    `offset_index` int(11) NOT NULL COMMENT '裁切图序号',
    `offset_x` int(11) NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y` int(11) NOT NULL COMMENT '裁切图Y轴坐标',
    `tag_type` varchar(64) DEFAULT NULL COMMENT '标记类型',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `index1` (`task_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='特殊标记表';

-- ----------------------------
-- Table structure for mark_student
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_student` (
    `id` bigint(20) NOT NULL COMMENT '主键(和exam_student表id一样)',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `course_code` varchar(32) NOT NULL COMMENT '科目代码',
    `course_name` varchar(100) NOT NULL COMMENT '科目名称',
    `paper_number` varchar(100) NOT NULL COMMENT '试卷类型',
    `course_paper_id` varchar(45) DEFAULT NULL COMMENT '试卷编号（交互）',
    `paper_type` varchar(10) DEFAULT NULL COMMENT '试卷编号',
    `secret_number` varchar(64) NOT NULL COMMENT '密号',
    `student_code` varchar(64) NOT NULL COMMENT '学号',
    `student_name` varchar(64) NOT NULL COMMENT '姓名',
    `package_code` varchar(64) NOT NULL COMMENT '试卷袋编号',
    `exam_place` varchar(32) DEFAULT NULL COMMENT '校区',
    `exam_room` varchar(32) DEFAULT NULL COMMENT '考场',
    `remark` varchar(128) DEFAULT NULL COMMENT '备注',
    `batch_code` varchar(32) DEFAULT NULL COMMENT '扫描批次号',
    `sheet_count` int(11) NOT NULL COMMENT '原图数量',
    `sheet_path` mediumtext COMMENT '考生所有图片地址',
    `answers` text COMMENT '客观题识别结果',
    `is_upload` tinyint(4) NOT NULL COMMENT '是否已上传',
    `is_absent` tinyint(4) NOT NULL COMMENT '是否缺考',
    `is_manual_absent` tinyint(4) NOT NULL COMMENT '是否人工指定缺考',
    `is_breach` tinyint(4) NOT NULL COMMENT '是否违纪',
    `upload_time` bigint(20) DEFAULT NULL COMMENT '上传时间',
    `check_time` bigint(20) DEFAULT NULL COMMENT '检查时间',
    `check_user_id` bigint(20) DEFAULT NULL COMMENT '检查人ID',
    `objective_score` double DEFAULT NULL COMMENT '客观总分',
    `objective_score_list` text COMMENT '客观得分明细',
    `subjective_status` varchar(16) NOT NULL COMMENT '主观题状态',
    `subjective_score` double DEFAULT NULL COMMENT '主观总分',
    `subjective_score_list` text COMMENT '主观得分明细',
    `college` varchar(64) DEFAULT NULL COMMENT '学院',
    `major_name` varchar(100) DEFAULT NULL COMMENT '专业',
    `class_name` varchar(64) DEFAULT NULL COMMENT '班级',
    `teacher` varchar(64) DEFAULT NULL COMMENT '任课老师',
    `scan_status` varchar(20) DEFAULT NULL COMMENT '扫描状态',
    `question_filled` bit(1) DEFAULT NULL,
    `assigned` bit(1) DEFAULT NULL,
    `assign_confirmed` bit(1) DEFAULT b'0' COMMENT '人工绑定确认',
    `absent_suspect` bit(1) DEFAULT NULL,
    `incomplete` bit(1) DEFAULT NULL,
    `breach_code` varchar(32) DEFAULT NULL,
    `omr_absent` bit(1) DEFAULT NULL COMMENT '识别缺考',
    `omr_absent_checked` bit(1) DEFAULT NULL COMMENT '识别缺考检查',
    `card_number` int(11) DEFAULT NULL,
    `exam_start_time` bigint(20) DEFAULT NULL COMMENT '考试开始时间',
    `exam_end_time` bigint(20) DEFAULT NULL COMMENT '考试结束时间',
    `create_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `index2` (`exam_id`,`secret_number`) USING BTREE,
    UNIQUE KEY `index1` (`exam_id`,`course_paper_id`,`student_code`),
    KEY `index3` (`exam_id`,`course_code`,`upload_time`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试考生库';

-- ----------------------------
-- Table structure for mark_subjective_score
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_subjective_score` (
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `main_number` int(11) NOT NULL COMMENT '大题号',
    `sub_number` varchar(32) NOT NULL COMMENT '小题号',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(100) NOT NULL COMMENT '课程代码',
    `group_number` int(11) NOT NULL COMMENT '分组序号',
    `group_score` double NOT NULL COMMENT '分组得分',
    `main_score` double NOT NULL COMMENT '大题得分',
    `score` double NOT NULL COMMENT '小题得分',
    `uncalculate` tinyint(1) NOT NULL COMMENT '是否合分',
    PRIMARY KEY (`student_id`,`main_number`,`sub_number`) USING BTREE,
    KEY `index1` (`exam_id`,`paper_number`,`main_number`,`main_score`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='主观题得分明细表';

-- ----------------------------
-- Table structure for mark_task
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_task` (
    `id` bigint(20) NOT NULL COMMENT '主键',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `course_code` varchar(32) NOT NULL COMMENT '课程代码',
    `course_name` varchar(100) NOT NULL COMMENT '课程名称',
    `paper_number` varchar(100) NOT NULL COMMENT '试卷编号',
    `group_number` int(11) NOT NULL COMMENT '大题号',
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `student_code` varchar(64) NOT NULL COMMENT '学号',
    `secret_number` varchar(64) NOT NULL COMMENT '考生密号',
    `task_number` int(11) NOT NULL COMMENT '多评任务序号',
    `status` varchar(16) NOT NULL COMMENT '状态',
    `user_id` bigint(20) DEFAULT NULL COMMENT '评卷员ID',
    `marker_time` bigint(20) DEFAULT NULL COMMENT '评卷时间',
    `marker_score` double DEFAULT NULL COMMENT '评卷总分',
    `marker_score_list` text COMMENT '评卷给分明细',
    `marker_spent` int(11) DEFAULT NULL COMMENT '评卷时长',
    `header_id` bigint(20) DEFAULT NULL COMMENT '科组长ID',
    `header_time` bigint(20) DEFAULT NULL COMMENT '科组长评卷时间',
    `header_score` double DEFAULT NULL COMMENT '科组长总分',
    `header_score_list` text COMMENT '科组长给分明细',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `index2` (`student_id`,`group_number`,`task_number`) USING BTREE,
    KEY `index3` (`user_id`,`status`,`marker_time`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='评卷任务表';

-- ----------------------------
-- Table structure for mark_track
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_track` (
    `id` bigint(20) NOT NULL,
    `task_id` bigint(20) NOT NULL COMMENT '评卷任务ID',
    `question_number` varchar(128) NOT NULL COMMENT '完整题号',
    `number` int(11) NOT NULL COMMENT '序号',
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(100) NOT NULL COMMENT '试卷编号',
    `group_number` int(11) NOT NULL COMMENT '大题题号',
    `user_id` bigint(20) NOT NULL COMMENT '评卷员ID',
    `type` varchar(10) DEFAULT NULL COMMENT '标记类型（SCORE：分数，REMARK：备注）',
    `score` double DEFAULT NULL COMMENT '给分',
    `remark` varchar(20) DEFAULT NULL COMMENT '备注',
    `position_x` double NOT NULL COMMENT 'X轴位置',
    `position_y` double NOT NULL COMMENT 'Y轴位置',
    `offset_index` int(11) NOT NULL COMMENT '裁切图序号',
    `offset_x` int(11) NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y` int(11) NOT NULL COMMENT '裁切图Y轴坐标',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `index2` (`user_id`) USING BTREE,
    KEY `index3` (`exam_id`,`paper_number`,`group_number`) USING BTREE,
    KEY `index1` (`exam_id`,`task_id`,`student_id`,`group_number`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='轨迹给分表';

-- ----------------------------
-- Table structure for mark_user_class
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_user_class` (
    `Id` bigint(20) NOT NULL,
    `exam_id` bigint(20) DEFAULT NULL COMMENT '\n考试ID',
    `paper_number` varchar(100) DEFAULT NULL COMMENT '试卷编号',
    `group_number` int(11) DEFAULT NULL COMMENT '分组号',
    `user_id` bigint(20) unsigned DEFAULT NULL COMMENT '评卷员ID',
    `class_name` varchar(100) DEFAULT NULL COMMENT '班级名称',
    PRIMARY KEY (`Id`) USING BTREE,
    KEY `idx_1` (`exam_id`,`paper_number`,`group_number`,`class_name`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='评卷员班级';

-- ----------------------------
-- Table structure for mark_user_group
-- ----------------------------
CREATE TABLE IF NOT EXISTS `mark_user_group` (
    `id` bigint(20) NOT NULL COMMENT '主键',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(100) NOT NULL COMMENT '试卷编号',
    `group_number` int(11) NOT NULL COMMENT '分组编号',
    `user_id` bigint(20) NOT NULL COMMENT '用户ID',
    `mode` varchar(16) DEFAULT NULL COMMENT '强制评卷模式',
    `top_count` int(11) DEFAULT NULL COMMENT '评卷数上限',
    `finish_count` int(11) DEFAULT NULL COMMENT '完成数量',
    `header_finish_count` int(11) DEFAULT NULL COMMENT '管理员直接打分数量',
    `valid_count` int(11) DEFAULT NULL COMMENT '有效数量',
    `avg_score` double DEFAULT NULL COMMENT '平均分',
    `avg_speed` double DEFAULT NULL COMMENT '平均时长',
    `stdev_score` double DEFAULT NULL COMMENT '标准差',
    `max_score` double DEFAULT NULL COMMENT '最高分',
    `min_score` double DEFAULT NULL COMMENT '最低分',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `index2` (`exam_id`,`paper_number`,`group_number`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='评卷员表';

-- ----------------------------
-- Table structure for scan_answer_card
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_answer_card` (
    `id` bigint(20) NOT NULL,
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `paper_number` varchar(100) DEFAULT NULL COMMENT '科目代码',
    `course_paper_id` varchar(50) NOT NULL COMMENT '试卷编号（交互）',
    `paper_type` varchar(100) NOT NULL COMMENT '试卷编号',
    `card_id` bigint(20) DEFAULT NULL COMMENT '知学知考题卡ID（自定义卡格式为空）',
    `number` int(11) NOT NULL COMMENT '序号',
    `source` varchar(16) NOT NULL COMMENT '来源',
    `uri` varchar(500) DEFAULT NULL COMMENT '卡格式文件路径',
    `md5` varchar(255) DEFAULT NULL COMMENT '文件md5',
    `parameter` varchar(255) DEFAULT NULL COMMENT '其他属性',
    `remark` varchar(255) DEFAULT NULL COMMENT '备注',
    `update_time` bigint(20) DEFAULT NULL COMMENT '修改时间',
    `need_adapte` tinyint(4) DEFAULT NULL COMMENT '是否需要适配',
    `paper_count` int(11) DEFAULT NULL,
    `single_page` tinyint(1) DEFAULT NULL,
    `slice_config` text COMMENT '裁切配置',
    `dpi` int(11) DEFAULT NULL COMMENT 'dpi',
    `code` varchar(64) DEFAULT NULL COMMENT '混扫代码',
    `adapte_md5` varchar(32) DEFAULT NULL COMMENT '适配后文件md5',
    `adapte_uri` varchar(500) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `idx_1` (`exam_id`,`number`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='题卡卡格式表';

-- ----------------------------
-- Table structure for scan_answer_card_subject
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_answer_card_subject` (
    `id` bigint(20) NOT NULL COMMENT '主键',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `card_number` int(11) NOT NULL COMMENT '卡格式号',
    `paper_number` varchar(255) NOT NULL COMMENT '试卷编号',
    `course_paper_id` varchar(50) NOT NULL COMMENT '试卷编号（交互）',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `index1` (`exam_id`,`card_number`,`paper_number`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='卡格式科目关联关系';

-- ----------------------------
-- Table structure for scan_batch
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_batch` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `user_id` bigint(20) NOT NULL COMMENT '扫描员ID',
    `scan_count` int(11) NOT NULL COMMENT '扫描数量',
    `assigned_count` int(11) NOT NULL,
    `status` varchar(16) NOT NULL COMMENT '状态',
    `creator_id` bigint(20) DEFAULT NULL,
    `updater_id` bigint(20) DEFAULT NULL,
    `create_time` bigint(20) DEFAULT NULL,
    `update_time` bigint(20) DEFAULT NULL,
    `course_paper_id` varchar(64) DEFAULT NULL COMMENT '试卷编号',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `exam_verify_status` (`exam_id`) USING BTREE
    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_batch_paper
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_batch_paper` (
    `batch_id` bigint(20) NOT NULL COMMENT '批次ID',
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `paper_index` int(11) NOT NULL COMMENT '试卷页数',
    `paper_id` bigint(20) NOT NULL COMMENT '试卷ID',
    `card_number` int(11) NOT NULL COMMENT '题卡编号',
    `assigned` bit(1) NOT NULL,
    PRIMARY KEY (`batch_id`,`student_id`,`paper_index`) USING BTREE,
    UNIQUE KEY `paper_id` (`paper_id`) USING BTREE,
    UNIQUE KEY `paper_id_2` (`paper_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_file_property
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_file_property` (
    `path` varchar(255) NOT NULL COMMENT '文件路径',
    `md5` varchar(32) NOT NULL COMMENT '文件md5',
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `file_size` bigint(20) NOT NULL COMMENT '文件大小',
    `create_time` bigint(20) DEFAULT NULL,
    `update_time` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`path`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_log` (
    `school_code` varchar(20) NOT NULL COMMENT '学校代码',
    `device_code` varchar(50) NOT NULL COMMENT '设备号',
    `file_name` varchar(45) NOT NULL,
    `type` varchar(10) DEFAULT NULL COMMENT '错误文件类型，崩溃异常文件：COLLAPSE，正常文件：NORMAL',
    `md5` varchar(45) NOT NULL COMMENT '扫描端日志',
    `path` varchar(500) DEFAULT NULL,
    `login_name` varchar(45) DEFAULT NULL COMMENT '扫描账号',
    `upload_time` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`school_code`,`device_code`,`file_name`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_omr_task
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_omr_task` (
    `id` bigint(20) NOT NULL,
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `conditions` varchar(100) NOT NULL COMMENT '条件',
    `student_id` bigint(20) NOT NULL COMMENT '考生ID',
    `paper_index` int(11) NOT NULL COMMENT '试卷页数',
    `paper_id` bigint(20) NOT NULL COMMENT '试卷ID',
    `card_number` int(11) NOT NULL COMMENT '题卡编号',
    `status` varchar(16) NOT NULL COMMENT '状态',
    `user_id` bigint(20) DEFAULT NULL,
    `pages` text NOT NULL,
    `creator_id` bigint(20) DEFAULT NULL,
    `updater_id` bigint(20) DEFAULT NULL,
    `create_time` bigint(20) DEFAULT NULL,
    `update_time` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `group_paper` (`conditions`,`paper_id`) USING BTREE,
    KEY `exam_status` (`exam_id`,`status`,`student_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_package
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_package` (
    `id` bigint(20) NOT NULL,
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `course_paper_id` varchar(30) DEFAULT NULL COMMENT '试卷编号',
    `package_code` varchar(20) DEFAULT NULL COMMENT '卷袋编号',
    `package_no` int(11) DEFAULT NULL COMMENT '页码',
    `path` varchar(255) NOT NULL COMMENT '签到表图片路径',
    `md5` varchar(32) NOT NULL COMMENT '文件md5',
    `assigned` bit(1) DEFAULT NULL,
    `creator_id` bigint(20) DEFAULT NULL,
    `updater_id` bigint(20) DEFAULT NULL,
    `create_time` bigint(20) DEFAULT NULL,
    `update_time` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `exam` (`exam_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_paper
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_paper` (
    `id` bigint(20) NOT NULL,
    `exam_id` bigint(20) NOT NULL COMMENT '考试ID',
    `card_number` int(11) NOT NULL COMMENT '卡格式编号',
    `number` int(11) NOT NULL COMMENT '题卡编号（对应paper_index）',
    `page_count` int(11) NOT NULL COMMENT '数量',
    `mismatch` bit(1) NOT NULL,
    `assigned` bit(1) NOT NULL,
    `question_filled` bit(1) NOT NULL,
    `checked` varchar(45) DEFAULT NULL COMMENT '已检查',
    `creator_id` bigint(20) DEFAULT NULL,
    `updater_id` bigint(20) DEFAULT NULL,
    `create_time` bigint(20) DEFAULT NULL,
    `update_time` bigint(20) DEFAULT NULL,
    `assign_confirmed` bit(1) DEFAULT NULL COMMENT '人工绑定确认',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `mismatch` (`exam_id`,`mismatch`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_paper_page
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_paper_page` (
    `id` bigint(20) DEFAULT NULL,
    `paper_id` bigint(20) NOT NULL,
    `page_index` int(11) NOT NULL,
    `absent` text,
    `breach` text,
    `question` text,
    `selective` text,
    `sheet_path` varchar(1000) NOT NULL,
    `recog_data` longtext,
    `creator_id` bigint(20) DEFAULT NULL,
    `updater_id` bigint(20) DEFAULT NULL,
    `create_time` bigint(20) DEFAULT NULL,
    `update_time` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`paper_id`,`page_index`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_refix_batch
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_refix_batch` (
    `id` bigint(20) NOT NULL,
    `exam_id` bigint(20) NOT NULL,
    `card_number` int(11) NOT NULL,
    `conditions` text NOT NULL,
    `update_slice` bit(1) NOT NULL,
    `total_count` int(11) NOT NULL,
    `sucess_count` int(11) NOT NULL,
    `finished` bit(1) NOT NULL,
    `creator_id` bigint(20) DEFAULT NULL,
    `updater_id` bigint(20) DEFAULT NULL,
    `create_time` bigint(20) DEFAULT NULL,
    `update_time` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for scan_student_paper
-- ----------------------------
CREATE TABLE IF NOT EXISTS `scan_student_paper` (
    `id` bigint(20) NOT NULL,
    `student_id` bigint(20) NOT NULL,
    `paper_index` int(11) NOT NULL,
    `paper_id` bigint(20) NOT NULL,
    `create_time` bigint(20) DEFAULT NULL,
    `update_time` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `paper_id` (`paper_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



ALTER TABLE `exam_student` ADD COLUMN `course_paper_id` VARCHAR(45) NULL COMMENT '试卷编号（交互）' AFTER `paper_number`;
ALTER TABLE `exam_detail_course` ADD COLUMN `course_paper_id` VARCHAR(45) NULL COMMENT '试卷编号（交互）' AFTER `paper_number`;

ALTER TABLE `sys_user` ADD COLUMN `ui_setting` TEXT NULL COMMENT '阅卷参数' AFTER `historic_name`;

ALTER TABLE `basic_exam` DROP COLUMN `auto_sync_student`;

UPDATE `sys_privilege` SET `name` = '评卷管理' WHERE (`id` = '483');
UPDATE `sys_privilege` SET `name` = '评卷管理' WHERE (`id` = '486');
UPDATE `sys_privilege` SET `name` = '评卷入口' WHERE (`id` = '491');
UPDATE `sys_privilege` SET `parent_id` = '897', `sequence` = '3' WHERE (`id` = '495');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('884', '列表', 'List', 'LIST', '491', '1', 'AUTH', '887', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('886', '点击评卷', 'Marking', 'LINK', '491', '3', 'AUTH', '888,889,890,891,892,893,894,895,896', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('885', '查询', 'Select', 'BUTTON', '491', '2', 'AUTH', '887', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('887', '查询', '/api/admin/mark/entrance/list', 'URL', '491', '1', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('888', '评卷页面', '/api/mark/getSetting', 'URL', '491', '2', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('889', '获取分组列表', '/api/mark/getGroup', 'URL', '491', '3', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('890', '获取评卷状态', '/api/mark/getStatus', 'URL', '491', '4', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('891', '获取任务', '/api/mark/getTask', 'URL', '491', '5', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('892', '保存任务', '/api/mark/saveTask', 'URL', '491', '6', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('893', '获取评卷历史', '/api/mark/getHistory', 'URL', '491', '7', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('894', '更新个人评卷配置', '/api/mark/updateSetting', 'URL', '491', '8', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('895', '选择评卷分组', '/api/mark/subjectSelect', 'URL', '491', '9', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('896', '清理评卷员的评卷任务缓存', '/api/mark/clear', 'URL', '491', '10', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('897', '评卷设置', 'MarkSetting', 'MENU', '486', '2', 'AUTH', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('898', '列表', 'List', 'LIST', '897', '1', 'AUTH', '900', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('899', '查询', 'Select', 'BUTTON', '897', '2', 'AUTH', '900', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('900', '查询', '/api/admin/mark/setting/list', 'URL', '897', '1', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('901', '评卷参数设置', 'MarkParamSetting', 'LINK', '897', '3', 'AUTH', '672,902,903,904,905,906,907,908,909,910,911,912,913,962,963', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('902', '结构查询', '/api/admin/mark/question/list', 'URL', '897', '1', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('903', '结构提交', '/api/admin/mark/question/save', 'URL', '897', '2', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('904', '评卷任务查询', '/api/admin/mark/group/list', 'URL', '897', '3', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('905', '评卷任务新增', '/api/admin/mark/group/save', 'URL', '897', '4', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('906', '评卷任务修改', '/api/admin/mark/group/update', 'URL', '897', '5', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('907', '评卷任务删除', '/api/admin/mark/group/delete', 'URL', '897', '6', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('908', '分班阅查询', '/api/admin/mark/class/list', 'URL', '897', '7', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('909', '分班阅提交', '/api/admin/mark/class/save', 'URL', '897', '8', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('910', '客观题标答查询', '/api/admin/mark/question/objective/list', 'URL', '897', '9', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('911', '客观题标答提交', '/api/admin/mark/question/objective/save', 'URL', '897', '10', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('912', '主观题标答查询', '/api/admin/mark/question/subjective/get', 'URL', '897', '11', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('913', '主观题标答提交', '/api/admin/mark/question/subjective/upload', 'URL', '897', '12', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('914', '评卷设置', 'MarkConfig', 'LINK', '897', '4', 'AUTH', '915,916', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('915', '数据获取', '/api/admin/mark/setting/paper/get', 'URL', '897', '13', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('916', '数据保存', '/api/admin/mark/setting/paper/save', 'URL', '897', '14', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('917', '评卷管理', 'MarkManage', 'MENU', '486', '3', 'AUTH', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('918', '列表', 'List', 'LIST', '917', '1', 'AUTH', '925', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('919', '查询', 'Select', 'BUTTON', '917', '2', 'AUTH', '925', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('920', '查询条件', 'Condition', 'CONDITION', '917', '3', 'AUTH', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('921', '查询条件', 'Condition', 'CONDITION', '491', '3', 'AUTH', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('922', '查询条件', 'Condition', 'CONDITION', '897', '3', 'AUTH', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('923', '导出评卷工作量', 'Export', 'BUTTON', '917', '4', 'AUTH', '926', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('924', '结束评卷', 'BatchFinish', 'BUTTON', '917', '5', 'AUTH', '927', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('925', '列表获取', '/api/admin/mark/setting/summary', 'URL', '917', '1', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('926', '导出评卷员工作量', '/api/admin/mark/setting/export_marker', 'URL', '917', '2', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('927', '结束评卷', '/api/admin/mark/paper/finish', 'URL', '917', '3', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('928', '进度列表查询', '/api/admin/mark/group/summary', 'URL', '917', '4', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('929', '评卷员管理列表查询', '/api/admin/mark/marker/list', 'URL', '917', '5', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('930', '重置', '/api/admin/mark/marker/reset', 'URL', '917', '6', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('931', '解绑', '/api/admin/mark/marker/delete', 'URL', '917', '7', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('932', '回收', '/api/admin/mark/marker/release', 'URL', '917', '8', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('933', '设置评卷数', '/api/admin/mark/marker/setTaskCount', 'URL', '917', '9', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('934', '评卷质量查询', '/api/admin/mark/quality/list', 'URL', '917', '10', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('935', '问题试卷列表查询', '/api/admin/mark/problem/list', 'URL', '917', '11', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('936', '问题试卷重置', '/api/admin/mark/problem/reset', 'URL', '917', '12', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('937', '仲裁管理列表查询', '/api/admin/mark/arbitrate/list', 'URL', '917', '13', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('938', '仲裁-获取任务', '/api/admin/mark/arbitrate/getTask', 'URL', '917', '14', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('939', '仲裁-左边的列表', '/api/admin/mark/arbitrate/getArbitrationList', 'URL', '917', '15', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('940', '仲裁-清理锁卷缓存', '/api/admin/mark/arbitrate/clear', 'URL', '917', '16', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('941', '仲裁-获取评卷状态', '/api/admin/mark/arbitrate/getStatus', 'URL', '917', '17', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('942', '仲裁-获取配置信息', '/api/admin/mark/arbitrate/getSetting', 'URL', '917', '18', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('943', '仲裁-保存任务', '/api/admin/mark/arbitrate/saveTask', 'URL', '917', '19', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('944', '查看详情', 'Detail', 'LINK', '917', '6', 'AUTH', '928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,964,965,966,967,968,1008', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('945', '结束评卷', 'Finish', 'LINK', '917', '7', 'AUTH', '927', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('946', '成绩检查', 'ScoreCheck', 'MENU', '486', '4', 'AUTH', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('947', '列表', 'List', 'LIST', '946', '1', 'AUTH', '952', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('948', '查询条件', 'Condition', 'CONDITION', '946', '2', 'AUTH', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('949', '查询', 'Select', 'BUTTON', '946', '3', 'AUTH', '952', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('950', '查看详情', 'Detail', 'LINK', '946', '4', 'AUTH', '953,954,955,956,957,958,959,960,969', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('951', '查看签到表', 'PackageDetail', 'LINK', '946', '5', 'AUTH', '961', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('952', '列表获取', '/api/admin/mark/setting/scoreList', 'URL', '946', '1', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('953', '详情列表', '/api/admin/mark/student/score', 'URL', '946', '2', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('954', '获取配置', '/api/admin/mark/track/getSetting', 'URL', '946', '3', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('955', '获取任务', '/api/admin/mark/track/getTask', 'URL', '946', '4', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('956', '主观题检查-获取配置', '/api/admin/mark/inspected/getSetting', 'URL', '946', '5', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('957', '主观题检查-获取任务', '/api/admin/mark/inspected/subjective/getTask', 'URL', '946', '6', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('958', '主观题检查-保存任务', '/api/admin/mark/inspected/subjective/saveTask', 'URL', '946', '7', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('959', '客观题检查-获取任务', '/api/admin/mark/inspected/objective/getTask', 'URL', '946', '8', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('960', '客观题检查-保存任务', '/api/admin/mark/inspected/objective/saveTask', 'URL', '946', '9', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('961', '签到表列表', '/api/admin/mark/paper/package/list', 'URL', '946', '10', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('962', '评卷区设置', '/api/admin/mark/group/update_picture_config', 'URL', '897', '13', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('963', '开启/关闭分班阅', '/api/admin/mark/group/update_open_mark_class', 'URL', '897', '14', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('964', '班级阅卷进度', '/api/admin/mark/group/class/summary', 'URL', '917', '20', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('965', '绑定评卷员', '/api/admin/mark/marker/add', 'URL', '917', '21', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('966', '评卷质量重新计算', '/api/admin/mark/quality/update', 'URL', '917', '22', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('967', '评卷质量给分曲线', '/api/admin/mark/quality/chart', 'URL', '917', '23', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('968', '绑定评卷员-已绑定评卷员集合', '/api/admin/mark/marker/list_bind_marker', 'URL', '917', '20', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('969', '客观题统分', '/api/admin/mark/student/objective/calculate', 'URL', '946', '11', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `sequence`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('970', '扫描端', 'scan', 'MENU', '11', '971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1007,1009,1010', '1', '0', '0');
UPDATE `sys_privilege` SET `name` = '打印端', `related` = '200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,973,974,975' WHERE (`id` = '199');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('971', '心跳接口', '/api/scan/server/heartbeat', 'URL', '970', '1', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('972', '登出接口', '/api/scan/logout', 'URL', '970', '2', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('973', '获取学期、考试列表', '/api/admin/basic/condition/scan/semester/list', 'URL', '970', '3', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('974', '获取课程、试卷编号列表', '/api/admin/basic/condition/scan/course/list', 'URL', '970', '4', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('975', '获取校区、考场', '/api/admin/basic/condition/scan/campus/list', 'URL', '970', '5', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('976', '扫描汇总-答题卡扫描、签到表扫描', '/api/scan/exam/card/info', 'URL', '970', '6', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('977', '扫描汇总-数据校对', '/api/scan/exam/check/info', 'URL', '970', '7', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('978', '答题卡卡格式列表', '/api/scan/answer/card/list', 'URL', '970', '8', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('979', '创建/修改题卡卡格式', '/api/scan/answer/card/save', 'URL', '970', '9', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('980', '删除答题卡卡格式', '/api/scan/answer/card/delete', 'URL', '970', '10', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('981', '答题卡适配卡格式上传', '/api/scan/answer/card/adapte/upload', 'URL', '970', '11', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('982', '答题卡卡格式查询', '/api/scan/answer/card/get', 'URL', '970', '12', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('983', '答题卡扫描批次创建', '/api/scan/answer/batch/create', 'URL', '970', '13', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('984', '答题卡扫描批次完成', '/api/scan/answer/batch/finish', 'URL', '970', '14', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('985', '答题卡扫描结果保存', '/api/scan/answer/batch/save', 'URL', '970', '15', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('986', '获取考生信息', '/api/scan/student/find', 'URL', '970', '16', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('987', '答题卡扫描原图上传', '/api/scan/answer/sheet/upload', 'URL', '970', '17', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('988', '答题卡条码识别坐标获取', '/api/scan/package/position/get', 'URL', '970', '18', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('989', '签到表扫描图片上传', '/api/scan/package/image/upload', 'URL', '970', '19', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('990', '签到表扫描结果保存', '/api/scan/package/save', 'URL', '970', '20', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('991', '签到表扫描结果列表', '/api/scan/package/image/list', 'URL', '970', '21', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('992', '签到表编号查询', '/api/scan/package/find', 'URL', '970', '22', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('993', '签到表详情', '/api/scan/package/image/get', 'URL', '970', '23', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('994', '查询答题卡扫描详情', '/api/scan/answer/query', 'URL', '970', '24', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('995', '查询答题卡扫描概要', '/api/scan/answer/summary', 'URL', '970', '25', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('996', '修改答题卡识别结果', '/api/scan/answer/omr/edit', 'URL', '970', '26', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('997', '更新缺考状态', '/api/scan/student/absent/update', 'URL', '970', '27', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('998', '修改答题卡扫描图片绑定考生', '/api/scan/answer/paper/migrate', 'URL', '970', '28', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('999', '任务确认', '/api/scan/student/confirm', 'URL', '970', '29', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1000', '任务待处理列表', '/api/scan/task/omr/get', 'URL', '970', '30', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1001', '任务提交', '/api/scan/task/omr/save', 'URL', '970', '31', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1002', '任务状态', '/api/scan/task/omr/status', 'URL', '970', '32', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1003', '任务释放', '/api/scan/task/omr/release', 'URL', '970', '33', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1004', '任务历史', '/api/scan/task/omr/history', 'URL', '970', '34', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1005', '答题卡二次识别', '/api/scan/answer/refix', 'URL', '970', '35', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`,`related`, `enable`, `default_auth`, `front_display`) VALUES ('1006', '查询条件', 'Condition', 'CONDITION', '970', '1', 'AUTH','971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1007,1009,1010', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1007', '未扫描-导出', '/api/scan/student/unexist/export', 'URL', '970', '36', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1008', '仲裁-评卷历史', '/api/admin/mark/arbitrate/getHistory', 'URL', '917', '20', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1009, '任务列表', '/api/scan/task/omr/list', 'URL', 970, 37, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1010', '人工绑定确认', '/api/scan/student/assign/confirm', 'URL', '970', '38', 'AUTH', '1', '1', '1');

DELETE FROM `sys_privilege` WHERE (`id` = '392');
DELETE FROM `sys_privilege` WHERE (`id` = '393');
DELETE FROM `sys_privilege` WHERE (`id` = '394');
DELETE FROM `sys_privilege` WHERE (`id` = '395');
DELETE FROM `sys_privilege` WHERE (`id` = '396');
DELETE FROM `sys_privilege` WHERE (`id` = '397');
DELETE FROM `sys_privilege` WHERE (`id` = '398');
DELETE FROM `sys_privilege` WHERE (`id` = '399');
DELETE FROM `sys_privilege` WHERE (`id` = '431');
DELETE FROM `sys_privilege` WHERE (`id` = '435');
DELETE FROM `sys_privilege` WHERE (`id` = '792');
DELETE FROM `sys_privilege` WHERE (`id` = '793');
UPDATE `sys_privilege` SET `name` = '查看详情' WHERE (`id` = '320');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('327', '新增考生', '/api/admin/exam/print/add_exam_student', 'URL', '44', '8', 'AUTH', '1', '1', '1');
UPDATE `sys_privilege` SET `related` = '55,327,328,329' WHERE (`id` = '320');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('328', '查询考场下试卷列表', '/api/admin/exam/print/list_exam_detail_course', 'URL', '44', '9', 'AUTH', '1', '1', '1');
ALTER TABLE `exam_student` ADD COLUMN `required_fields` MEDIUMTEXT NULL COMMENT '基础字段' AFTER `print_card`;
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('329', '删除考生', '/api/admin/exam/print/delete_exam_student', 'URL', '44', '10', 'AUTH', '1', '1', '1');
INSERT INTO `sys_config` (`id`, `config_key`, `config_name`, `config_value`, `enable`, `sort`, `create_id`) VALUES ('41', 'package.barcode.position', '签到表条码坐标', '[0.7,0,0.3,0.1]', '1', '17', '1');
UPDATE `sys_privilege` SET `url` = '/api/admin/exam/card/find_jpg_file' WHERE (`id` = '672');
UPDATE `sys_privilege` SET `url` = 'MarkEntrance' WHERE (`id` = '491');
DELETE FROM `sys_privilege` WHERE (`id` = '488');
DELETE FROM `sys_privilege` WHERE (`id` = '489');
DELETE FROM `sys_privilege` WHERE (`id` = '490');
DELETE FROM `sys_privilege` WHERE (`id` = '494');
DELETE FROM `sys_privilege` WHERE (`id` = '540');
DELETE FROM `sys_privilege` WHERE (`id` = '667');
DELETE FROM `sys_privilege` WHERE (`id` = '669');
DELETE FROM `sys_privilege` WHERE (`id` = '670');
DELETE FROM `sys_privilege` WHERE (`id` = '671');
DELETE FROM `sys_privilege` WHERE (`id` = '673');
DELETE FROM `sys_privilege` WHERE (`id` = '674');
DELETE FROM `sys_privilege` WHERE (`id` = '754');
DELETE FROM `sys_privilege` WHERE (`id` = '855');
DELETE FROM `sys_privilege` WHERE (`id` = '857');
DELETE FROM `sys_privilege` WHERE (`id` = '858');
DELETE FROM `sys_privilege` WHERE (`id` = '859');
DELETE FROM `sys_privilege` WHERE (`id` = '882');
DELETE FROM `sys_privilege` WHERE (`id` = '883');
DELETE FROM `sys_privilege` WHERE (`id` = '819');
DELETE FROM `sys_privilege` WHERE (`id` = '820');
DELETE FROM `sys_privilege` WHERE (`id` = '821');
DELETE FROM `sys_privilege` WHERE (`id` = '822');
DELETE FROM `sys_privilege` WHERE (`id` = '823');
DELETE FROM `sys_privilege` WHERE (`id` = '824');
DELETE FROM `sys_privilege` WHERE (`id` = '818');

delete from t_b_task where type in ('COURSE_IMPORT', 'ORG_IMPORT');
delete from t_b_sync_task where type in ('EXAM_PUSH','STRUCTURE_GROUP_PUSH','MARK_LEADER_PUSH','MARKER_PUSH','PAPER_ANSWER_FILE_PUSH','OBJECTIVE_ANSWER_PUSH', 'SCORE_PUSH');
ALTER TABLE `t_b_sync_task`
    DROP COLUMN `org_code`,
    DROP COLUMN `third_relate_name`,
    DROP COLUMN `third_relate_id`,
    ADD COLUMN `paper_type` VARCHAR(10) NULL COMMENT '试卷类型' AFTER `paper_number`;
ALTER TABLE `sys_user`
    ADD COLUMN `allow_manual_card` TINYINT(1) NULL DEFAULT 0 COMMENT '是否允许新增卡格式' AFTER `ui_setting`;
ALTER TABLE `exam_card` DROP COLUMN `sync_status`;
ALTER TABLE `exam_student` DROP COLUMN `sync_status`;
ALTER TABLE `exam_print_plan` DROP COLUMN `sync_status`;

ALTER TABLE `basic_print_config`
    ADD COLUMN `audit_content` VARCHAR(45) NULL COMMENT '[PAPER,CARD]' AFTER `review`;

ALTER TABLE `exam_student`
    ADD COLUMN `can_delete` TINYINT(1) NULL DEFAULT 0 COMMENT '是否可以删除（手动新增可以删除）' AFTER `attachment_id`;
ALTER TABLE `exam_student`
    CHANGE COLUMN `org_id` `org_id` BIGINT NULL COMMENT '机构id' ;
UPDATE `sys_privilege` SET `url` = 'ScoreManage' WHERE (`id` = '487');
DELETE FROM `sys_privilege` WHERE (`id` = '501');
DELETE FROM `sys_privilege` WHERE (`id` = '503');
UPDATE `sys_privilege` SET `url` = '/api/admin/mark/archive/score/list', `parent_id` = '487' WHERE (`id` = '542');
UPDATE `sys_privilege` SET `url` = '/api/admin/mark/archive/score/export', `parent_id` = '488' WHERE (`id` = '543');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('488', '班级详情', 'ClassScoreDetail', 'LINK', '487', '1', 'AUTH', '490,543', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('489', '成绩报告', 'ScoreReport', 'LINK', '487', '2', 'AUTH', '494', '1', '0', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('490', '列表查询', '/api/admin/mark/archive/student/list', 'URL', '488', '1', 'AUTH', NULL, '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('494', '报告数据', '/api/admin/mark/archive/score/report', 'URL', '489', '1', 'AUTH', '1', '1', '1');
UPDATE `sys_privilege` SET `property` = 'SYS' WHERE (`id` = '370');
delete from sys_config  where config_key = 'cloudmark.host.url';
delete from sys_config  where config_key = 'cloudmark.sync.mode';
DELETE FROM `sys_privilege` WHERE (`id` = '546');
DELETE FROM `sys_privilege` WHERE (`id` = '545');
DELETE FROM `sys_privilege` WHERE (`id` = '544');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('544', '报告下载', '/api/admin/mark/archive/score/report/download', 'URL', '488', '3', 'AUTH', '1', '1', '1');
UPDATE `sys_privilege` SET `related` = '490,543,544' WHERE (`id` = '488');
DELETE FROM `sys_privilege` WHERE (`id` = '502');
DELETE FROM `sys_privilege` WHERE (`id` = '563');
DELETE FROM `sys_privilege` WHERE (`id` = '504');
DELETE FROM `sys_privilege` WHERE (`id` = '505');
UPDATE `sys_privilege` SET `related` = '490,543' WHERE (`id` = '488');
UPDATE `sys_privilege` SET `related` = '494,544' WHERE (`id` = '489');
UPDATE `sys_privilege` SET `parent_id` = '489', `sequence` = '2' WHERE (`id` = '544');

ALTER TABLE `basic_card_rule`
    ADD COLUMN `undertaking_enable` TINYINT(1) NULL COMMENT '启用考生承诺书' AFTER `discipline`,
ADD COLUMN `undertaking_body` VARCHAR(300) NULL COMMENT '考生承诺书内容' AFTER `undertaking_enable`;

ALTER TABLE `basic_template`
    ADD COLUMN `font_size` VARCHAR(10) DEFAULT 'SMALL' COMMENT '字体大小（small,medium,large）' AFTER `line_height_times`;

ALTER TABLE `basic_operation_log`
    CHANGE COLUMN `customized_operation_type` `customized_operation_type` VARCHAR(32) CHARACTER SET 'utf8' NULL COMMENT '自定义记录日志操作类型（LOGIN(\"用户登录\"),LOGOUT(\"用户登出\"),ADD(\"新增\"),DELETE(\"删除\"),UPDATE(\"修改\"),IMPORT(\"导入\"),EXPORT(\"导出\"),UN_KNOW(\"未知\")）' ;
update basic_operation_log set customized_operation_type = null where customized_operation_type = '';
