-- 仅仅湘雅医院执行！！
use `qc`;
-- 全院
update sys_menu a set a.order_no = a.order_no+1 where a.parent_id = 17 and a.order_no>0;


INSERT INTO `sys_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医师病案首页合格率占比', '17', 'YH-ZKK-BASYHGLYSZB_XQ', '1', '1', '1', '医师病案首页合格率占比');
SET @id =@@identity;
INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @id, NULL);
INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '2021-11-01 13:48:37', '2021-11-01 13:48:37', '243', '243', '1', @id, NULL);


INSERT INTO `sys_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医师病案首页合格率占比报表', '', '/console/homePageLevelStatisticsXY', 'ALL', '医师病案首页合格率占比报表', NULL);
SET @id2 =@@identity;
INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @id2, NULL);
INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '2021-11-01 13:48:37', '2021-11-01 13:48:37', '243', '243', '1', @id2, NULL);

INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`)
 VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @id, @id2, NULL, '医师病案首页合格率占比');


-- 科室
update sys_menu a set a.order_no = a.order_no+1 where a.parent_id = 18 and a.order_no>1;

INSERT INTO `sys_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医师病案首页合格率占比', '18', 'YH-KSZR-BASYHGLYSZB_XQ', '1', '1', '2', '医师病案首页合格率占比-科室');
SET @id3 =@@identity;
INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @id3, NULL);
INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '2021-10-27 11:39:27', '2021-10-27 11:39:27', '13', '13', '2', @id3, NULL);


INSERT INTO `sys_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医师病案首页合格率占比报表', '', '/consoleByDept/homePageLevelStatisticsXYByDept', 'ALL', '医师病案首页合格率占比报表', NULL);
SET @id4 =@@identity;

INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @id4, NULL);
INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '2021-10-27 11:39:27', '2021-10-27 11:39:27', '13', '13', '2', @id4, NULL);


INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @id3, @id4, NULL, '医师病案首页合格率占比科室');




