# 流程监控报表导入说明
本文档主要描述如何在AFCenter上导入流程监控报表功能,不包含报表开发及报表应用相关功能说明,具体相关文档需要参考AFCenter对应其他的文档即可。
附件包如下:
# 导入构件包
登录AFCenter,打开开发中心
选择一个报表应用,打开该应用
在报表应用的ide中点击导入构件包afc_lowcode_project_contribution_AFCENTER.zip
打开配置的Idata报表应用,并登录
打开看板管理页面
选择元数据导入
选择idata元数据压缩包,然后按照步骤指引进行导入
在AFCenter中执行初始化脚本
INSERT INTO afc_menu (ID, NAME, CODE, RES_ID, DESCRIPTION, SORT_NO, IS_LEAF, TREE_LEVEL, SEQ, PARENT_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED, OPEN_TYPE, MENU_ICON, MENU_TYPE, BUSINESS_OBJ_ID, IS_NEW_WINDOW_OPEN) VALUES ('270', '流程统计分析', 'process_statistical_analysis', null, null, 3, '0', null, null, 'root', 'sys_tenant', '2023-02-14 15:22:15', null, 'admin', null, null, null, 'gongsijieshao', null, null, '');
INSERT INTO afc_menu (ID, NAME, CODE, RES_ID, DESCRIPTION, SORT_NO, IS_LEAF, TREE_LEVEL, SEQ, PARENT_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED, OPEN_TYPE, MENU_ICON, MENU_TYPE, BUSINESS_OBJ_ID, IS_NEW_WINDOW_OPEN) VALUES ('271', '工作量', 'process_workload', '650', null, 3, '1', null, null, '270', 'sys_tenant', '2023-02-14 15:26:33', null, 'admin', null, null, null, 'dingdan', null, null, '');
INSERT INTO afc_menu (ID, NAME, CODE, RES_ID, DESCRIPTION, SORT_NO, IS_LEAF, TREE_LEVEL, SEQ, PARENT_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED, OPEN_TYPE, MENU_ICON, MENU_TYPE, BUSINESS_OBJ_ID, IS_NEW_WINDOW_OPEN) VALUES ('272', '流程执行时间', 'process_exe_time', '652', null, 3, '1', null, null, '270', 'sys_tenant', '2023-02-14 15:27:14', null, 'admin', null, null, null, 'shuju_3', null, null, '');
INSERT INTO afc_menu (ID, NAME, CODE, RES_ID, DESCRIPTION, SORT_NO, IS_LEAF, TREE_LEVEL, SEQ, PARENT_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED, OPEN_TYPE, MENU_ICON, MENU_TYPE, BUSINESS_OBJ_ID, IS_NEW_WINDOW_OPEN) VALUES ('273', '活动执行时间', 'process_active_time', '651', null, 3, '1', null, null, '270', 'sys_tenant', '2023-02-14 15:28:00', null, 'admin', null, null, null, 'jiaojuan', null, null, '');
INSERT INTO afc_menu (ID, NAME, CODE, RES_ID, DESCRIPTION, SORT_NO, IS_LEAF, TREE_LEVEL, SEQ, PARENT_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED, OPEN_TYPE, MENU_ICON, MENU_TYPE, BUSINESS_OBJ_ID, IS_NEW_WINDOW_OPEN) VALUES ('274', '实例规模', 'process_instance', '653', null, 3, '1', null, null, '270', 'sys_tenant', '2023-02-14 15:28:34', null, 'admin', null, null, null, 'jingbao', null, null, '');
INSERT INTO afc_menu (ID, NAME, CODE, RES_ID, DESCRIPTION, SORT_NO, IS_LEAF, TREE_LEVEL, SEQ, PARENT_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED, OPEN_TYPE, MENU_ICON, MENU_TYPE, BUSINESS_OBJ_ID, IS_NEW_WINDOW_OPEN) VALUES ('275', '退回', 'process_rollback', '654', null, 3, '1', null, null, '270', 'sys_tenant', '2023-02-14 15:29:10', null, 'admin', null, null, null, 'xiangji_2', null, null, '');
INSERT INTO afc_menu (ID, NAME, CODE, RES_ID, DESCRIPTION, SORT_NO, IS_LEAF, TREE_LEVEL, SEQ, PARENT_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED, OPEN_TYPE, MENU_ICON, MENU_TYPE, BUSINESS_OBJ_ID, IS_NEW_WINDOW_OPEN) VALUES ('276', '超时', 'process_timeout', '655', null, 3, '1', null, null, '270', 'sys_tenant', '2023-02-14 15:30:00', null, 'admin', null, null, null, 'naozhong1', null, null, '');
INSERT INTO afc_menu (ID, NAME, CODE, RES_ID, DESCRIPTION, SORT_NO, IS_LEAF, TREE_LEVEL, SEQ, PARENT_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED, OPEN_TYPE, MENU_ICON, MENU_TYPE, BUSINESS_OBJ_ID, IS_NEW_WINDOW_OPEN, APP_ID) VALUES ('277', '数据汇总', 'bfp_data_summary', '656', null, 10, '1', null, null, '270', 'sys_tenant', '2023-02-16 14:29:39', null, 'admin', null, null, null, 'tongji', null, null, '', null);
INSERT INTO afc_res_group (ID, NAME, CODE, TYPES, RES_TYPE, DESCRIPTION, APP_ID, BUSINESS_OBJ_ID, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, SORT_NO, IS_FIXED) VALUES ('141', '流程统计分析', 'process_statistical_analysis', null, null, null, '1', null, 'sys_tenant', '2023-02-14 15:23:25', null, 'admin', null, 1, null);
INSERT INTO afc_resource (ID, NAME, CODE, TYPES, APP_ID, RES_GROUP_ID, SUB_TYPE, DESCRIPTION, BUSINESS_OBJ_ID, CONTENT, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED) VALUES ('650', '工作量', 'board_230208220353339', 'url', '1', '141', null, null, null, '{"openType":"lowReport","mark":null,"url":null,"params":null,"microUrl":null,"microMark":null,"isLowOrHigh":"high","resourceCode":null,"formStatus":null,"resourceType":null,"viewType":null,"appCode":"AFCENTER","query":null,"processDefName":null,"biId":230208220353339,"biType":"freelayout","bicode":"board_230208220353339"}', 'sys_tenant', '2023-02-14 15:23:45', null, 'admin', null, null);
INSERT INTO afc_resource (ID, NAME, CODE, TYPES, APP_ID, RES_GROUP_ID, SUB_TYPE, DESCRIPTION, BUSINESS_OBJ_ID, CONTENT, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED) VALUES ('651', '活动执行时间', 'board_230213222525591', 'url', '1', '141', null, null, null, '{"openType":"lowReport","mark":null,"url":null,"params":null,"microUrl":null,"microMark":null,"isLowOrHigh":"high","resourceCode":null,"formStatus":null,"resourceType":null,"viewType":null,"appCode":"AFCENTER","query":null,"processDefName":null,"biId":230213222525591,"biType":"freelayout","bicode":"board_230213222525591"}', 'sys_tenant', '2023-02-14 15:24:02', null, 'admin', null, null);
INSERT INTO afc_resource (ID, NAME, CODE, TYPES, APP_ID, RES_GROUP_ID, SUB_TYPE, DESCRIPTION, BUSINESS_OBJ_ID, CONTENT, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED) VALUES ('652', '流程执行时间', 'board_230213184257717', 'url', '1', '141', null, null, null, '{"openType":"lowReport","mark":null,"url":null,"params":null,"microUrl":null,"microMark":null,"isLowOrHigh":"high","resourceCode":null,"formStatus":null,"resourceType":null,"viewType":null,"appCode":"AFCENTER","query":null,"processDefName":null,"biId":230213184257717,"biType":"freelayout","bicode":"board_230213184257717"}', 'sys_tenant', '2023-02-14 15:24:14', null, 'admin', null, null);
INSERT INTO afc_resource (ID, NAME, CODE, TYPES, APP_ID, RES_GROUP_ID, SUB_TYPE, DESCRIPTION, BUSINESS_OBJ_ID, CONTENT, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED) VALUES ('653', '超时', 'board_230214222637281', 'url', '1', '141', null, null, null, '{"openType":"lowReport","mark":null,"url":null,"params":null,"microUrl":null,"microMark":null,"isLowOrHigh":"high","resourceCode":null,"formStatus":null,"resourceType":null,"viewType":null,"appCode":"AFCENTER","query":null,"processDefName":null,"biId":230214222637281,"biType":"freelayout","bicode":"board_230214222637281"}', 'sys_tenant', '2023-02-14 15:24:31', null, 'admin', null, null);
INSERT INTO afc_resource (ID, NAME, CODE, TYPES, APP_ID, RES_GROUP_ID, SUB_TYPE, DESCRIPTION, BUSINESS_OBJ_ID, CONTENT, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED) VALUES ('654', '退回', 'board_230214181948324', 'url', '1', '141', null, null, null, '{"openType":"lowReport","mark":null,"url":null,"params":null,"microUrl":null,"microMark":null,"isLowOrHigh":"high","resourceCode":null,"formStatus":null,"resourceType":null,"viewType":null,"appCode":"AFCENTER","query":null,"processDefName":null,"biId":230214181948324,"biType":"freelayout","bicode":"board_230214181948324"}', 'sys_tenant', '2023-02-14 15:24:41', null, 'admin', null, null);
INSERT INTO afc_resource (ID, NAME, CODE, TYPES, APP_ID, RES_GROUP_ID, SUB_TYPE, DESCRIPTION, BUSINESS_OBJ_ID, CONTENT, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED) VALUES ('655', '实例规模', 'board_230214004921818', 'url', '1', '141', null, null, null, '{"openType":"lowReport","mark":null,"url":null,"params":null,"microUrl":null,"microMark":null,"isLowOrHigh":"high","resourceCode":null,"formStatus":null,"resourceType":null,"viewType":null,"appCode":"AFCENTER","query":null,"processDefName":null,"biId":230214004921818,"biType":"freelayout","bicode":"board_230214004921818"}', 'sys_tenant', '2023-02-14 15:25:02', null, 'admin', null, null);
INSERT INTO afc_resource (ID, NAME, CODE, TYPES, APP_ID, RES_GROUP_ID, SUB_TYPE, DESCRIPTION, BUSINESS_OBJ_ID, CONTENT, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_FIXED) VALUES ('656', '数据汇总', 'bfp_data_summary', 'url', '1', '141', null, null, null, '{"openType":"microApp","mark":"bfp_data_summary","url":null,"params":null,"microUrl":null,"microMark":"bfp","isLowOrHigh":"high","resourceCode":null,"formStatus":null,"resourceType":null,"viewType":null,"appCode":"AFCENTER","query":null,"processDefName":null,"biId":null,"biType":null,"bicode":null}', 'sys_tenant', '2023-02-16 14:27:53', null, 'admin', null, null);
其中涉及afc_menu和afc_resource两张表的菜单数据需要插入,如果发生主键冲突问题,可按照如下方式解决:
afc_res_group表:
- 查看eos_unique_table表,找到name属性值为ResGroup.id的这一项,查看最大code为多少
- 然后修改afc_res_group表的插入语句主键
- 插入完成后更新eos_unique_table表的ResGroup.id的这一项,使其值大于afc_res_group表插入语句的最大值即可
afc_resource表:
- 查看eos_unique_table表,找到name属性值为Resource.id的这一项,查看最大code为多少
- 然后修改afc_resource表的插入语句主键,如果afc_res_group表的流程统计分析这条语句也发生主键冲突,则afc_resource表的插入语句都需要修改PARENT_ID为afc_res_group表的流程统计分析这条语句的id
- 插入完成后更新eos_unique_table表的Resource.id的这一项,使其值大于resource表插入语句的最大值即可
afc_menu表:
查看eos_unique_table表,找到name属性值为Menu.id的这一项,查看最大code为多少
然后修改afc_menu表的插入语句主键,其中第一条流程统计分析的插入语句为主菜单,不需要修改PARENT_ID,其他该表的插入语句都需要修改PARENT_ID为第一条的id
如果afc_resource表的数据也冲突,则按照对应关系修改每条menu表插入语句的RES_ID即可
插入完成后更新eos_unique_table表的Menu.id的这一项,使其值大于menu表插入语句的最大值即可
修改报表对应数据源
进入报表数据源,找到名称为AFCENTER-TEST数据源,选择编辑
按照页面提示,修改完数据源后保存即可
修改数据源并且初始化完菜单数据后,需要在AFCenter中对需要看到这个菜单的角色授予页面权限即可
完成后,即可在AFCenter顶部菜单栏看到流程统计分析标签
← 发起暂存数据到业务表 业务事件 →