-- 将带有实体为hrcs_rolequery且权限项为新增的管理员组自动刷上实体为hrcs_rolequery且权限项为修改的管理员组已分配的权限
INSERT INTO T_PERM_ADMINGROUPFUNPERM SELECT (a.FID - 500000000000000000), a.FUSERGROUPID, a.FAPPID, a.FENTITYNUM, '4715a0df000000ac' FROM T_PERM_ADMINGROUPFUNPERM as a WHERE a.FENTITYNUM = 'hrcs_rolequery' AND a.FPERMITEMID = '47156aff000000ac' AND NOT EXISTS (SELECT b.fid from T_PERM_ADMINGROUPFUNPERM as b WHERE b.FID = a.FID - 500000000000000000);