CREATE TABLE `bev_prod_filing_list` (
  `id` bigint NOT NULL COMMENT '主键id',
  `main_title` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '主标题',
  `sub_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '副标题',
  `filing_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '编号，例如：PD-FM-01（WA08）',
  `filing_version` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '版本',
  `business_id` bigint DEFAULT NULL COMMENT '关联的业务设计的id',
  `fld_sort` decimal(20,2) DEFAULT NULL COMMENT '排序',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `update_user` bigint DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='产线填报表格';

CREATE TABLE `bev_prod_filing_main` (
  `id` bigint NOT NULL COMMENT '主键id',
  `filing_id` bigint DEFAULT NULL COMMENT '填报表的信息，关联填报表主键',
  `filing_date` date DEFAULT NULL COMMENT '填报日期',
  `prod_shift` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '班次',
  `operator_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '操作员姓名',
  `filing_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '编号',
  `table_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '版本号',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `update_user` bigint DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='无纸化填报记录主表';

CREATE TABLE `devops_business_ai_parse_log` (
  `id` bigint NOT NULL COMMENT '主键id',
  `business_id` bigint DEFAULT NULL COMMENT '所属业务id',
  `origin_excel_file_id` bigint DEFAULT NULL COMMENT '原始excel文件id',
  `origin_pic_file_id` bigint DEFAULT NULL COMMENT 'excel转化为png的文件id',
  `parse_status` tinyint DEFAULT NULL COMMENT '解析状态：10-进行中，20-解析成功，30-解析失败',
  `begin_time` datetime DEFAULT NULL COMMENT '开始解析时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束解析时间',
  `ai_response_string` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'AI解析的结果',
  `parse_business_result` json DEFAULT NULL COMMENT 'AI解析为业务数据的结果',
  `error_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '解析过程中的报错信息',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `update_user` bigint DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='AI解析业务日志';

INSERT INTO `devops_business_category` VALUES (1934234939383578625, '填报业务', 'filing_business', 101.00, 0, 'N', '2025-06-15 21:02:01', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_business` VALUES (1934235029460451330, 1934234939383578625, '填报业务主表', 'filing_main', 1, '#BIZ-4', 2, 'api.svg', NULL, 1671419146928205826, 101.00, 1, 'N', '2025-06-15 21:02:22', 1339550467939639299, '2025-06-15 21:02:28', 1339550467939639299, 1);
INSERT INTO `devops_business_permission` VALUES (1934235054903099394, 1934235029460451330, 20, 1339550467939639299, 1, 3, '2025-06-15 21:02:22', 1339550467939639299, NULL, NULL);
INSERT INTO `devops_meta_model` VALUES (1934235073639055361, 1934234939383578625, 1934235029460451330, '无纸化填报记录主表', 'bev_prod_filing_main', 1, '#TB-4', 'v1.0', 1934235073639055362, NULL, 1, NULL, 'Y', NULL, NULL, 1000.00, 0, 'N', '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_definition` VALUES (1934235073639055362, 1934234939383578625, 1934235029460451330, 1934235073639055361, 'v1.0', 0, 'N', '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273090, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'id', 21, NULL, NULL, 'Y', 'Y', NULL, 'Y', '主键id', 'input', 100.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273091, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'filing_id', 21, NULL, NULL, 'N', 'N', NULL, 'Y', '填报表的信息，关联填报表主键', 'input', 110.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273092, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'filing_date', 51, NULL, NULL, 'N', 'N', NULL, 'Y', '填报日期', 'input', 120.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273093, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'prod_shift', 10, 255, NULL, 'N', 'N', NULL, 'Y', '班次', 'input', 130.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273094, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'operator_user', 10, 255, NULL, 'N', 'N', NULL, 'Y', '操作员姓名', 'input', 140.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273095, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'filing_no', 10, 255, NULL, 'N', 'N', NULL, 'Y', '编号', 'input', 150.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273096, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'table_version', 10, 255, NULL, 'N', 'N', NULL, 'Y', '版本号', 'input', 160.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273097, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'create_time', 50, NULL, NULL, 'N', 'N', NULL, 'Y', '创建日期', 'input', 170.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273098, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'create_user', 21, NULL, NULL, 'N', 'N', NULL, 'Y', '创建人', 'input', 180.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273099, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'update_time', 50, NULL, NULL, 'N', 'N', NULL, 'Y', '更新日期', 'input', 190.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `devops_meta_field` VALUES (1934235073773273100, 1934234939383578625, 1934235029460451330, 1934235073639055361, 1934235073639055362, 'update_user', 21, NULL, NULL, 'N', 'N', NULL, 'Y', '更新人', 'input', 200.00, 0, '2025-06-15 21:02:33', 1339550467939639299, NULL, NULL, 1);

-- 更新数据填报的菜单
INSERT INTO `sys_menu` (`menu_id`, `menu_parent_id`, `menu_pids`, `menu_name`, `menu_code`, `app_id`, `menu_sort`, `status_flag`, `remark`, `menu_type`, `antdv_router`, `antdv_component`, `antdv_icon`, `antdv_link_url`, `antdv_active_url`, `antdv_visible`, `app_design_business_id`, `app_design_view_id`, `expand_field`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1930812028494405633, 1729696676605595650, '[-1],[1729696676605595650],', '业务流程设计', 'yewuliuchengsheji', 1671406745336016898, 10906.00, 1, NULL, 10, '/mid/app/flow/design', '/mid/workflow/design/index', 'icon-default', NULL, '/mid/app/list', 'N', NULL, NULL, NULL, 1, 'N', '2025-06-06 10:20:35', 1339550467939639299, '2025-06-10 14:18:59', 1339550467939639299);
INSERT INTO `sys_menu` (`menu_id`, `menu_parent_id`, `menu_pids`, `menu_name`, `menu_code`, `app_id`, `menu_sort`, `status_flag`, `remark`, `menu_type`, `antdv_router`, `antdv_component`, `antdv_icon`, `antdv_link_url`, `antdv_active_url`, `antdv_visible`, `app_design_business_id`, `app_design_view_id`, `expand_field`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1930862735855575042, 1729696676605595650, '[-1],[1729696676605595650],', 'Excel表格设计', 'Excelbiaogesheji', 1671406745336016898, 10912.00, 1, NULL, 20, '/mid/app/excel/design', '/mid/app/excel/design', 'icon-default', NULL, '/mid/app/detail', 'N', NULL, NULL, NULL, 2, 'N', '2025-06-06 13:42:05', 1339550467939639299, '2025-06-10 14:18:59', 1339550467939639299);
INSERT INTO `sys_menu` (`menu_id`, `menu_parent_id`, `menu_pids`, `menu_name`, `menu_code`, `app_id`, `menu_sort`, `status_flag`, `remark`, `menu_type`, `antdv_router`, `antdv_component`, `antdv_icon`, `antdv_link_url`, `antdv_active_url`, `antdv_visible`, `app_design_business_id`, `app_design_view_id`, `expand_field`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1932321545442861058, 1729696676605595650, '[-1],[1729696676605595650],', '基于Excel初始化', 'jiyuExcelchushihua', 1671406745336016898, 10909.00, 1, NULL, 10, '/mid/app/excel/init', '/mid/app/excel-init', 'icon-default', NULL, '/mid/app/list', 'N', NULL, NULL, NULL, 1, 'N', '2025-06-10 14:18:52', 1339550467939639299, '2025-06-10 14:21:46', 1339550467939639299);

-- 数据填报相关的操作，流程图和Excel相关的按钮权限
INSERT INTO `sys_menu` (`menu_id`, `menu_parent_id`, `menu_pids`, `menu_name`, `menu_code`, `app_id`, `menu_sort`, `status_flag`, `remark`, `menu_type`, `antdv_router`, `antdv_component`, `antdv_icon`, `antdv_link_url`, `antdv_active_url`, `antdv_visible`, `app_design_business_id`, `app_design_view_id`, `expand_field`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1932624550906085377, -1, '[-1],', '数据填报', 'shujutianbao', 1888796731468734466, 130.00, 1, NULL, 10, '/mid/fill/data', '/mid/fill/data', 'icon-opt-edit', NULL, NULL, 'Y', NULL, NULL, NULL, 0, 'N', '2025-06-11 10:22:54', 1339550467939639299, NULL, NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_parent_id`, `menu_pids`, `menu_name`, `menu_code`, `app_id`, `menu_sort`, `status_flag`, `remark`, `menu_type`, `antdv_router`, `antdv_component`, `antdv_icon`, `antdv_link_url`, `antdv_active_url`, `antdv_visible`, `app_design_business_id`, `app_design_view_id`, `expand_field`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1934863270556221441, 1932624550906085377, '[-1],[1932624550906085377],', '填报详情', 'tianbaoxiangqing', 1888796731468734466, 100.00, 1, NULL, 10, '/mid/fill/detail', '/mid/fill/detail', 'icon-default', NULL, '/mid/fill/data', 'N', NULL, NULL, NULL, 0, 'N', '2025-06-17 14:38:46', 1339550467939639299, NULL, NULL);
INSERT INTO `sys_menu` (`menu_id`, `menu_parent_id`, `menu_pids`, `menu_name`, `menu_code`, `app_id`, `menu_sort`, `status_flag`, `remark`, `menu_type`, `antdv_router`, `antdv_component`, `antdv_icon`, `antdv_link_url`, `antdv_active_url`, `antdv_visible`, `app_design_business_id`, `app_design_view_id`, `expand_field`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1934866046518681601, 1932624550906085377, '[-1],[1932624550906085377],', '填报', 'tianbao', 1888796731468734466, 100.00, 1, NULL, 10, '/mid/fill/submit', '/mid/fill/submit', 'icon-default', NULL, '/mid/fill/data', 'N', NULL, NULL, NULL, 0, 'N', '2025-06-17 14:49:48', 1339550467939639299, NULL, NULL);
INSERT INTO `sys_menu_options` (`menu_option_id`, `app_id`, `menu_id`, `option_name`, `option_code`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1935156269999841282, 1671406745336016898, 1874718206353985537, '流程图', 'liuchengtu', '2025-06-18 10:03:03', 1339550467939639299, NULL, NULL);
INSERT INTO `sys_menu_options` (`menu_option_id`, `app_id`, `menu_id`, `option_name`, `option_code`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1935156356884848642, 1671406745336016898, 1874718206353985537, 'Excel表格', 'excel', '2025-06-18 10:03:24', 1339550467939639299, NULL, NULL);