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 ('dqms-458', '产品信息', 'productsInfo', null, null, null, 'dqms-66', null, 'sys_tenant', '2022-12-20 14:05:58', null, 'admin', null, 10, null);

delete from afc_resource where id = 'dqms-1886';
delete from afc_menu where id = 'dqms-371';

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 ('dqms-82', '产品信息', 'productsInfo', 'dqms-223', null, 10, '1', 0, null, 'dqms-442', 'sys_tenant', '2023-01-12 17:27:26', null, 'admin', null, null, null, 'jiandu', null, null, null);

DELETE FROM afc_api_token WHERE TOKEN = 'c0101b6109e8478784ceb8897159fe2b';
INSERT INTO afc_api_token (ID, TOKEN, USER_ID, CREATE_TIME, EXPIRE_TIME, REMARK) VALUES ('1', 'c0101b6109e8478784ceb8897159fe2b', '1', '2024-01-25 20:19:02','2030-12-31 23:59:59' , null);

delete from afc_resource where id = 'dqms-281';
delete from afc_resource where id = 'dqms-283';
delete from afc_resource where id = 'dqms-284';
delete from afc_resource where id = 'dqms-286';
delete from afc_resource where id = 'dqms-287';
delete from afc_resource where id = 'dqms-288';
delete from afc_resource where id = 'dqms-289';
delete from afc_resource where id = 'dqms-292';
delete from afc_resource where id = 'dqms-293';
delete from afc_resource where id = 'dqms-294';
delete from afc_resource where id = 'dqms-295';
delete from afc_resource where id = 'dqms-296';
delete from afc_resource where id = 'dqms-313';
delete from afc_resource where id = 'dqms-361';
delete from afc_resource where id = 'dqms-362';
delete from afc_resource where id = 'dqms-363';
delete from afc_resource where id = 'dqms-364';
delete from afc_resource where id = 'dqms-370';
delete from afc_resource where id = 'dqms-371';
delete from afc_resource where id = 'dqms-372';

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 ('dqms-373', '质量分析报告 - 下载pdf', null, 'function', 'dqms-66', 'dqms-455', null, null, null, null, 'sys_tenant', '2023-04-15 00:14:46', 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 ('dqms-374', '质量分析报告 - 下载word', null, 'function', 'dqms-66', 'dqms-455', null, null, null, null, 'sys_tenant', '2023-04-15 00:14:46', 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 ('dqms-375', '质量分析报告 - 导出excel', null, 'function', 'dqms-66', 'dqms-455', null, null, null, null, 'sys_tenant', '2023-04-15 00:14:46', 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 ('dqms-223', '产品信息', 'productsInfo', 'url', 'dqms-66', 'dqms-458', null, null, null, '{"openType":"microApp","mark":"products-info/info","url":null,"params":null,"microUrl":null,"microMark":"quality","isLowOrHigh":"high","resourceCode":null,"formStatus":null,"resourceType":null,"viewType":null,"appCode":"quality","query":null,"processDefName":null,"biId":null,"biType":null,"bicode":null}', 'sys_tenant', '2022-12-20 14:09:21','2022-12-20 14:15:46', 'admin','admin', null);

delete from afc_r_res_role where id = 'dqms-3354';
delete from afc_r_res_role where id = 'dqms-3930';
delete from afc_r_res_role where id = 'dqms-1117';
delete from afc_r_res_role where id = 'dqms-1119';
delete from afc_r_res_role where id = 'dqms-1120';
delete from afc_r_res_role where id = 'dqms-1121';
delete from afc_r_res_role where id = 'dqms-1122';
delete from afc_r_res_role where id = 'dqms-1123';
delete from afc_r_res_role where id = 'dqms-1124';
delete from afc_r_res_role where id = 'dqms-1127';
delete from afc_r_res_role where id = 'dqms-1128';
delete from afc_r_res_role where id = 'dqms-1129';
delete from afc_r_res_role where id = 'dqms-1130';
delete from afc_r_res_role where id = 'dqms-1131';
delete from afc_r_res_role where id = 'dqms-1144';

INSERT INTO afc_r_res_role (ID, RES_ID, RES_TYPE, ROLE_ID, ROLE_TYPE, BUSINESS_OBJ_ID, BUSINESS_OBJ_INST_ID, TENANT_ID, IS_FIXED) VALUES ('dqms-1199', 'dqms-373', 'function', 'dqms-92', 'platform', null, null, 'sys_tenant', null);
INSERT INTO afc_r_res_role (ID, RES_ID, RES_TYPE, ROLE_ID, ROLE_TYPE, BUSINESS_OBJ_ID, BUSINESS_OBJ_INST_ID, TENANT_ID, IS_FIXED) VALUES ('dqms-1200', 'dqms-374', 'function', 'dqms-92', 'platform', null, null, 'sys_tenant', null);
INSERT INTO afc_r_res_role (ID, RES_ID, RES_TYPE, ROLE_ID, ROLE_TYPE, BUSINESS_OBJ_ID, BUSINESS_OBJ_INST_ID, TENANT_ID, IS_FIXED) VALUES ('dqms-1201', 'dqms-375', 'function', 'dqms-92', 'platform', null, null, 'sys_tenant', null);
INSERT INTO AFC_R_RES_ROLE (ID, RES_ID, RES_TYPE, ROLE_ID, ROLE_TYPE, BUSINESS_OBJ_ID, BUSINESS_OBJ_INST_ID, TENANT_ID, IS_FIXED) VALUES ('dqms-425', 'dqms-223', 'url', 'dqms-92', 'platform', null, null, 'sys_tenant', null);
INSERT INTO AFC_R_RES_ROLE (ID, RES_ID, RES_TYPE, ROLE_ID, ROLE_TYPE, BUSINESS_OBJ_ID, BUSINESS_OBJ_INST_ID, TENANT_ID, IS_FIXED) VALUES ('dqms-1202', 'dqms-300', 'function', 'dqms-92', 'platform', null, null, 'sys_tenant', null);

UPDATE afc_role SET CODE = 'dqms-admin'  WHERE ID = 'dqms-92';