-- SQLite数据库初始化数据 -- 插入默认的解析规则数据 INSERT OR IGNORE INTO parse_rule (id, xml_tag, tag_type, txt_key, parent_tag, is_required, default_value, description, sort_order) VALUES ('1', '任务', 'element', 'task', NULL, 1, NULL, '任务根节点', 1), ('2', '任务信息', 'element', NULL, '任务', 1, NULL, '任务信息节点', 2), ('3', '任务行动信息', 'text', NULL, '任务信息', 1, NULL, '任务行动信息', 3), ('4', '指令有效期', 'text', NULL, '任务信息', 1, NULL, '指令有效期', 4), ('5', '指令确认信息', 'text', NULL, '任务信息', 1, NULL, '指令确认信息', 5), ('6', '覆盖的指令文档', 'text', NULL, '任务信息', 0, NULL, '覆盖的指令文档', 6), ('7', '平台', 'element', 'platform', '任务', 1, NULL, '平台信息节点', 7), ('8', '平台名称', 'text', 'platform_name', '平台', 1, NULL, '平台名称', 8), ('9', '机型', 'text', 'machine_type', '平台', 1, NULL, '机型', 9), ('10', '架数', 'text', 'num_of_cpus', '平台', 1, NULL, 'CPU数量', 10), ('11', '平台识别码', 'text', 'platform_id', '平台', 1, NULL, '平台识别码', 11), ('12', '国家', 'text', 'country', '平台', 1, NULL, '国家', 12), ('13', '行动', 'element_with_attributes', 'action', '平台', 1, NULL, '行动节点', 13), ('14', '航线名称', 'text', 'route_name', '行动', 1, NULL, '航线名称', 14); -- 插入默认的映射规则数据 INSERT OR IGNORE INTO mapper_rule (id, parse_rule_id, txt_key, mapping_type, mapping_value, function_name, description, sort_order) VALUES ('1', '1', 'task', 'direct', NULL, NULL, '任务根节点映射', 1), ('2', '3', 'task_action', 'direct', NULL, NULL, '任务行动信息映射', 2), ('3', '4', 'start_time', 'function', 'splitTimeRange', 'extractStartTime', '开始时间映射', 3), ('4', '4', 'end_time', 'function', 'splitTimeRange', 'extractEndTime', '结束时间映射', 4), ('5', '5', 'confirm_info', 'direct', NULL, NULL, '指令确认信息映射', 5), ('6', '6', 'document_version', 'direct', NULL, NULL, '文档版本映射', 6), ('7', '7', 'platform', 'direct', NULL, NULL, '平台信息映射', 7), ('8', '8', 'platform_name', 'direct', NULL, NULL, '平台名称映射', 8), ('9', '9', 'machine_type', 'direct', NULL, NULL, '机型映射', 9), ('10', '10', 'num_of_cpus', 'direct', NULL, NULL, 'CPU数量映射', 10), ('11', '11', 'platform_id', 'direct', NULL, NULL, '平台识别码映射', 11), ('12', '12', 'country', 'direct', NULL, NULL, '国家映射', 12), ('13', '13', 'action', 'direct', NULL, NULL, '行动节点映射', 13), ('14', '14', 'route_name', 'direct', NULL, NULL, '航线名称映射', 14);