/*使通用角色和角色组的名称及描述在多语言情况下缺省显示中文 */
update T_PERM_ROLE t1 set fname = (select fname from T_PERM_ROLE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_ROLE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');
update T_PERM_ROLE t1 set fremark = (select fremark from T_PERM_ROLE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_ROLE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');
update T_PERM_ROLEGROUP t1 set fname = (select fname from T_PERM_ROLEGROUP_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_ROLEGROUP_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');
update T_PERM_ROLEGROUP t1 set fdescription = (select fdescription from T_PERM_ROLEGROUP_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_ROLEGROUP_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*使管理员方案的名称及描述在多语言情况下缺省显示中文 */
update T_PERM_ADMINSCHEME t1 set fname = (select fname from T_PERM_ADMINSCHEME_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_ADMINSCHEME_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');
update T_PERM_ADMINSCHEME t1 set fdescription = (select fdescription from T_PERM_ADMINSCHEME_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_ADMINSCHEME_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*使管理员类型的名称及描述在多语言情况下缺省显示中文 */
update T_PERM_ADMINTYPE t1 set fname = (select fname from T_PERM_ADMINTYPE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_ADMINTYPE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');
update T_PERM_ADMINTYPE t1 set fdescription = (select fdescription from T_PERM_ADMINTYPE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_ADMINTYPE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*使业务角色的名称及描述在多语言情况下缺省显示中文 */
update T_PERM_BIZROLE t1 set fname = (select fname from T_PERM_BIZROLE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_BIZROLE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');
update T_PERM_BIZROLE t1 set fdescription = (select fdescription from T_PERM_BIZROLE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_BIZROLE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*使权限控制类型的名称在多语言情况下缺省显示中文 */
update T_PERM_CTRLTYPE t1 set fname = (select fname from T_PERM_CTRLTYPE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_CTRLTYPE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*使数据规则方案的名称及描述在多语言情况下缺省显示中文 */
update T_PERM_DATARULE t1 set fname = (select fname from T_PERM_DATARULE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_DATARULE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');
update T_PERM_DATARULE t1 set fdescription = (select fdescription from T_PERM_DATARULE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_DATARULE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*使多实体数据规则的名称在多语言情况下缺省显示中文 */
update T_PERM_DATARULES t1 set fname = (select fname from T_PERM_DATARULES_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_DATARULES_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*使特殊操作权限的名称及描述在多语言情况下缺省显示中文 */
update T_PERM_OPERATIONRULE t1 set fname = (select fname from T_PERM_OPERATIONRULE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_OPERATIONRULE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');
update T_PERM_OPERATIONRULE t1 set fdescription = (select fdescription from T_PERM_OPERATIONRULE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_OPERATIONRULE_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*使权限项的名称在多语言情况下缺省显示中文 */
update T_PERM_PERMITEM t1 set fname = (select min(fname) from T_PERM_PERMITEM_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN') where exists (select 1 from T_PERM_PERMITEM_l t2 where t1.fid = t2.fid and t2.flocaleid = 'zh_CN');


/*处理错误历史数据 */
DELETE FROM T_PERM_PERMITEM_L WHERE FID = '0SXDLK3BNGGM';
INSERT INTO T_PERM_PERMITEM_L (FPKID, FID, FLOCALEID, FNAME) VALUES ('0SXDLK3BNFTC', '0SXDLK3BNGGM', 'zh_CN', '生成代发单');
INSERT INTO T_PERM_PERMITEM_L (FPKID, FID, FLOCALEID, FNAME) VALUES ('0SXDLK3BNFTD', '0SXDLK3BNGGM', 'zh_TW', '生成代發單');