-- -------------补考-----------
update basic_exam t set t.category = 'MAKEUP' where t.category = 'ONLINE';
update basic_exam t set t.category = 'FORMAL' where t.category = 'OFFLINE';

ALTER TABLE `exam_print_plan` ADD COLUMN `category` VARCHAR(10) NULL COMMENT '考试类型' AFTER `org_id`;

update exam_print_plan t set t.category = 'FORMAL' where t.category is null;

INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('193', '补考任务查询', '/api/admin/exam/print/list_makeup_task', 'URL', '43', '5', 'AUTH', '1', '1', '1');
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('194', '补考任务保存', '/api/admin/exam/print/save_makeup_task', 'URL', '43', '6', 'AUTH', '1', '1', '1');

UPDATE `sys_privilege` SET `related` = '50,49,193,194,621' WHERE (`id` = '310');


-- --------------3.3.1新需求--------------
ALTER TABLE `mark_paper`
    ADD COLUMN `open_double_marking` BIGINT(1) NULL DEFAULT 0 COMMENT '是否开启双评：true-开启，false-关闭' AFTER `paper_type`;

ALTER TABLE `basic_card_rule`
    ADD COLUMN `first_level_subheading` VARCHAR(200) NULL COMMENT '一级副标题' AFTER `fill_number`,
ADD COLUMN `second_level_subheading` VARCHAR(200) NULL COMMENT '二级副标题' AFTER `first_level_subheading`;

ALTER TABLE `exam_task`
DROP INDEX `idx_school_id_paper_number` ,
ADD INDEX `idx_school_id_paper_number` USING BTREE (`exam_id`, `paper_number`) VISIBLE;

INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2000, '目标达成度', 'TargetDegreeManage', 'MENU', NULL, 13, NULL, NULL, 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2001, '成绩管理', 'TargetScoreManage', 'MENU', 2000, 1, NULL, '2003,2004,2005', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2002, '报告管理', 'TargetReportManage', 'MENU', 2000, 2, NULL, '2021,2022,2023', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2003, '列表', 'List', 'LIST', 2001, 1, 'AUTH', '2007', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2004, '查询条件', 'Condition', 'CONDITION', 2001, 2, 'AUTH', '2007', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2005, '查询', 'Select', 'BUTTON', 2001, 3, 'AUTH', '2007', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2006, '管理成绩', 'Score', 'LINK', 2001, 1, 'AUTH', '2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2029', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2007, '列表', '/api/admin/course/degree/score/list', 'URL', 2001, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2008, '平时成绩-下载模版', '/api/admin/course/degree/score/template_download', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2009, '平时成绩-导入模版', '/api/admin/course/degree/score/import', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2010, '平时成绩列表', '/api/admin/course/degree/score/normal/list', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2011, '平时成绩编辑', '/api/admin/course/degree/score/normal/edit', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2012, '平时成绩保存', '/api/admin/course/degree/score/normal/save', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2013, '平时成绩启用/禁用', '/api/admin/course/degree/score/normal/enable', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2014, '期末成绩-下载模版', '/api/admin/course/degree/score/end_exam/template_download', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2015, '期末成绩-导入模版', '/api/admin/course/degree/score/end_exam/import', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2016, '期末成绩列表', '/api/admin/course/degree/score/end_exam/list', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2017, '期末成绩编辑', '/api/admin/course/degree/score/end_exam/edit', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2018, '期末成绩保存', '/api/admin/course/degree/score/end_exam/save', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2019, '期末成绩启用/禁用', '/api/admin/course/degree/score/end_exam/enable', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2020, '保存试卷蓝图', '/api/admin/course/degree/score/end_exam/paper_positive/save', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2021, '列表', 'List', 'LIST', 2002, 1, 'AUTH', '2024', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2022, '查询条件', 'Condition', 'CONDITION', 2002, 2, 'AUTH', '2024', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2023, '查询', 'Select', 'BUTTON', 2002, 3, 'AUTH', '2024', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2024, '列表', '/api/admin/course/degree/report/list', 'URL', 2002, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2025, '查看报告', 'View', 'LINK', 2002, 1, 'AUTH', '2026,2027,2028', 1, 0, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2026, '查看报告', '/api/admin/course/degree/report/view', 'URL', 2025, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2027, '导出报告', '/api/admin/course/degree/report/export', 'URL', 2025, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2028, '保存报告', '/api/admin/course/degree/report/save', 'URL', 2025, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2029, '获取试卷蓝图信息', '/api/admin/course/degree/score/end_exam/paper_positive/query', 'URL', 2006, 1, 'AUTH', NULL, 1, 1, 1);