/* 用户直接授权 */
update t_perm_userpermdetail set FENTITYTYPEID = 'perm_busirole' WHERE FENTITYTYPEID = 'perm_bizrole';
/* 角色的权限 */
update t_perm_rolepermdetial set FENTITYTYPEID = 'perm_busirole' WHERE FENTITYTYPEID = 'perm_bizrole';
/* 禁用权限*/
update t_perm_disfunperm set FENTITYTYPEID = 'perm_busirole' WHERE FENTITYTYPEID = 'perm_bizrole';
/* 业务角色补充授权*/
update t_perm_bizroleperm set FENTITYTYPEID = 'perm_busirole' WHERE FENTITYTYPEID = 'perm_bizrole';
/* 业务角色禁用权限*/
update t_perm_bizroledisperm set FENTITYTYPEID = 'perm_busirole' WHERE FENTITYTYPEID = 'perm_bizrole';
/* 管理员功能权限-业务角色*/
update t_perm_adminschemedetail set FENTITYNUM = 'perm_busirole' WHERE FENTITYNUM = 'perm_bizrole';




/* 业务角色 - 引入模板 */
DELETE FROM t_bas_importtemplate WHERE FID = 1195624378293862400;
INSERT INTO t_bas_importtemplate (fid, fcreatetime, fmodifytime, fmodifierid, fnumber, fbizobject, fstatus, fcreatorid, fenable, fcomment, fmasterid, ftemplatetype, fenableimport, fname, fapplyscope)
VALUES(1195624378293862400, {ts'2021-07-08 15:31:18'}, {ts'2021-07-08 17:09:23'}, 13466739, 'perm_busirole_IMPT_S', 'perm_busirole', 'C', 13466739, '1', ' ', 1195624378293862400, 'IMPT', '1', '业务角色引入模板', '0');

DELETE FROM t_bas_importtemplate_l WHERE FID = 1195624378293862400;
INSERT INTO t_bas_importtemplate_l(fpkid, fid, flocaleid, fname, fcomment)VALUES('1QV39CWTI/PF', 1195624378293862400, 'zh_TW', '業務角色引入模板', ' ');
INSERT INTO t_bas_importtemplate_l(fpkid, fid, flocaleid, fname, fcomment)VALUES('1QV39CWTI/PG', 1195624378293862400, 'zh_CN', '业务角色引入模板', ' ');

DELETE FROM t_bas_importtemplateentry WHERE FID = 1195624378293862400;
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875622855680, 0, 1, 'perm_busirole', NULL, '0', ' ', '0', '0', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875748683776, 1195637875673186304, 10, 'rolef7', NULL, '0', ' ', '0', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875757073408, 1195637875673186304, 11, 'orgf7', NULL, '0', ' ', '0', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875773850624, 1195637875673186304, 13, 'modifier', NULL, '0', ' ', '0', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875807404032, 1195637875673186304, 16, 'disabler', NULL, '0', ' ', '0', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875824181248, 1195637875673186304, 18, 'creator', NULL, '0', ' ', '0', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876000343040, 1195637875966788608, 21, 'role_visible', NULL, '1', ' ', '1', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876218446848, 1195637876193281024, 31, 'permitem', NULL, '0', ' ', '1', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876226834432, 1195637876193281024, 32, 'entitytype', NULL, '0', ' ', '1', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876235224064, 1195637876193281024, 33, 'bizapp', NULL, '0', ' ', '1', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876344274944, 1195637876319109120, 36, 'permitemforbid', NULL, '0', ' ', '1', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876352664576, 1195637876319109120, 37, 'entitytypeforbid', NULL, '0', ' ', '1', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876361052160, 1195637876319109120, 38, 'bizappforbid', NULL, '0', ' ', '1', '1', 'number', 'name');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875673186304, 1195637875622855680, 2, 'billhead', NULL, '0', ' ', '0', '0', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875681575936, 1195637875673186304, 3, 'id', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875698352128, 1195637875673186304, 4, 'number', NULL, '1', ' ', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875706741760, 1195637875673186304, 5, 'name', NULL, '1', ' ', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875715129344, 1195637875673186304, 6, 'usertype', NULL, '1', ' ', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875715130368, 1195637875673186304, 7, 'status', NULL, '1', ' ', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875731906560, 1195637875673186304, 8, 'enable', NULL, '1', ' ', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875740296192, 1195637875673186304, 9, 'datachangeflag', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875765460992, 1195637875673186304, 12, 'description', NULL, '0', ' ', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875790626816, 1195637875673186304, 14, 'createtime', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875799016448, 1195637875673186304, 15, 'modifytime', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875824182272, 1195637875673186304, 17, 'disabledate', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875966788608, 1195637875622855680, 19, 'role_entry', NULL, '0', ' ', '0', '0', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637875983564800, 1195637875966788608, 20, 'role_entry.id', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876008730624, 1195637875966788608, 22, 'isenable_visible', NULL, '1', ' ', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876059063296, 1195637875622855680, 23, 'org_entry', NULL, '0', ' ', '0', '0', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876075839488, 1195637876059063296, 24, 'org_entry.id', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876109394944, 1195637876059063296, 27, 'isincludesuborg_visible', NULL, '1', ' ', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876193281024, 1195637875622855680, 29, 'bizroleperm', NULL, '0', ' ', '0', '0', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876201668608, 1195637876193281024, 30, 'bizroleperm.id', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876319109120, 1195637875622855680, 34, 'bizroledisperm', NULL, '0', ' ', '0', '0', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876335887360, 1195637876319109120, 35, 'bizroledisperm.id', NULL, '0', ' ', '0', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876117782528, 1195637876059063296, 28, 'dimentitynum', NULL, '1', '填入编码 bos_org：组织  bcm_model：体系   mdr_customer：渠道', '1', '1', ' ', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876084229120, 1195637876059063296, 25, 'dim_num', NULL, '1', ' ', '1', '1', 'number', ' ');
INSERT INTO t_bas_importtemplateentry
(fid, fentryid, fparententryid, fseq, ffieldkey, ffieldname, fmustinput, fdescription, fisimport, fisfield, fimportprop, fexportprop)
VALUES(1195624378293862400, 1195637876092616704, 1195637876059063296, 26, 'dim_name', NULL, '0', ' ', '0', '1', ' ', ' ');
