use clbs;
-- 从业人员电话从13个字符扩容到50个字符
ALTER TABLE `zw_m_professionals_info` modify column `phone` varchar(50) DEFAULT NULL;

-- 菜单监控管理修改为车辆监控
UPDATE `zw_c_resource` SET `resource_name` = '车辆监控' WHERE id = '84113afa-df07-4247-8666-f164a7acbefa';
-- 设备管理修改为基本信息
UPDATE `zw_c_resource` SET `resource_name` = '基本信息管理' WHERE `id` = '96327f6e-6aab-11e6-8b77-86f30ca893d3';
-- 监控对象菜单下的子菜单移动到基本信息
UPDATE `zw_c_resource` SET `parent_id` = '96327f6e-6aab-11e6-8b77-86f30ca893d3',`sort_order` = 5004, `code_num` = '5004' WHERE `id` ='a1cf4672-6f4c-11e6-8b77-86f30ca893d3';
UPDATE `zw_c_resource` SET `parent_id` = '96327f6e-6aab-11e6-8b77-86f30ca893d3',`sort_order` = 5005, `code_num` = '5005' WHERE `id` = 'a1cf4258-6f4c-11e6-8b77-86f30ca893d3';

-- 删除监控对象菜单
DELETE FROM `zw_c_resource` WHERE id = '96327be0-6aab-11e6-8b77-86f30ca893d3';

-- 驾驶员管理移动到基本信息
UPDATE `zw_c_resource` SET `parent_id` = '96327f6e-6aab-11e6-8b77-86f30ca893d3',`sort_order` = 5006, `code_num` = '5006' WHERE `id` = 'af69c3e3-037c-4e5e-ba23-ba04bc06ab2f';

-- 违规行为识别及告警 -> 违规行为告警
UPDATE `zw_c_resource` SET `resource_name` = '违规行为告警' WHERE `id` = '27f4a659-a491-44c7-be68-23b147d0ca9d';
-- ADAS报警、DSM报警
UPDATE `zw_c_resource` SET `resource_name` = 'DSM报警' WHERE `id` = '0266048a-6a8e-11e6-8b77-86f30ca893d3';
UPDATE `zw_c_resource` SET `resource_name` = 'ADAS报警' WHERE `id` = '256c9c2c-8168-11e7-bb31-be2e44b06b34';
-- 报警查询 -> 基础报警
UPDATE `zw_c_resource` SET `resource_name` = '基础报警' WHERE `id` = '923213ba-4ddb-118e-9c2d-af7ae01abcpj';
-- 主动安全处置报表
INSERT INTO `zw_c_resource` (`id`, `icon_cls`, `resource_name`, `type`, `code`, `permission`, `perm_value`, `description`, `parent_id`, `sort_order`, `domain`, `code_num`, `editable`, `enabled`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`)
VALUES ('256c9c2c-8168-11e7-bb31-be2e44b06b44', NULL, '主动安全处置报表', 0, NULL, 'report_adas_dispose', '/r/riskManagement/disposeReport/list', NULL, '9122dbfa-6a8c-11e6-8b77-86f30ca893d3', 3005, NULL, NULL, 1, 1, 1, NULL, NULL, NULL, NULL);

INSERT INTO `zw_c_role_resource` (`id`, `resource_id`, `role_id`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `flag`, `editable`) VALUES
('9b5eecc8-c1a5-4aa7-bd93-c9156e3ee607', '256c9c2c-8168-11e7-bb31-be2e44b06b44', 'cn=POWER_USER,ou=Groups', '2023-07-17 16:53:13', NULL, NULL, NULL, 1, 1),
('f4849cd4-b264-452c-affc-588c9f4a0e15', '256c9c2c-8168-11e7-bb31-be2e44b06b44', 'cn=ROLE_ADMIN,ou=Groups', '2023-03-13 09:34:05', 'admin', NULL, NULL, 1, 1);

-- 删除多窗口跟踪传感器数据列
DELETE FROM zw_c_custom_column WHERE id IN ('30ebe9cc-e21c-461e-acd9-bfed959cd627',
                                            '4140ddd6-b995-4398-bcbc-bab2c4bb0336',
                                            '973a34a7-5582-419f-9c90-d014945092be',
                                            'a4797b5b-a505-45ad-b5de-b5cb2c7bf8d7',
                                            'a533a8b3-0627-4f24-a793-e8253c3803bf',
                                            '70e0b2a7-2218-451f-b48e-b996239fb77a',
                                            '6e42ee33-2b9c-49c0-80b4-e94554d5d0c0',
                                            '666df6db-18d4-4c81-8eef-e6f6e70a646b');

