-- 银行账户 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/MKL+IK+Q79+%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/MKL+IK+Q79+%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT31JO0ZTS' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/MKL+IK+Q79+%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/MKL+IK+Q79+%' and fbizappid = '83bfebc8000037ac');

-- 账户用图 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/TSLZ=PM9G+Y%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/TSLZ=PM9G+Y%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT31JO0ZTS' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/TSLZ=PM9G+Y%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/TSLZ=PM9G+Y%' and fbizappid = '83bfebc8000037ac');

-- 网银子账户 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%0AG9P4QNL3TM%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%0AG9P4QNL3TM%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT31JO0ZTS' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%0AG9P4QNL3TM%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%0AG9P4QNL3TM%' and fbizappid = '83bfebc8000037ac');

-- 个人银行卡 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/WCGJZYDM0T4%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/WCGJZYDM0T4%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT31JO0ZTS' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/WCGJZYDM0T4%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/WCGJZYDM0T4%' and fbizappid = '83bfebc8000037ac');

--===============================================
-- 银行类别公共资源库 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/NJML0T0/FP1%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/NJML0T0/FP1%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT09W78IJV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/NJML0T0/FP1%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/NJML0T0/FP1%' and fbizappid = '83bfebc8000037ac');

-- 银行类别
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/N2V1J8WPKHJ%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/N2V1J8WPKHJ%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT09W78IJV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/N2V1J8WPKHJ%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/N2V1J8WPKHJ%' and fbizappid = '83bfebc8000037ac');

-- 合作金融机构 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/N2LLWH1N9X2%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/N2LLWH1N9X2%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT09W78IJV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/N2LLWH1N9X2%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/N2LLWH1N9X2%' and fbizappid = '83bfebc8000037ac');

-- 金融机构操作日志 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/N3+5=VNZ/A/%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/N3+5=VNZ/A/%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT09W78IJV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/N3+5=VNZ/A/%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/N3+5=VNZ/A/%' and fbizappid = '83bfebc8000037ac');

--金融机构类别 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/N3P1R0T1TGI%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/N3P1R0T1TGI%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT09W78IJV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/N3P1R0T1TGI%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/N3P1R0T1TGI%' and fbizappid = '83bfebc8000037ac');

-- 金融机构树 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/OTQST4GB7KS%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/OTQST4GB7KS%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT09W78IJV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/OTQST4GB7KS%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/OTQST4GB7KS%' and fbizappid = '83bfebc8000037ac');

-- 资源引入 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/NU5U4JCG=9A%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/NU5U4JCG=9A%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT09W78IJV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/NU5U4JCG=9A1%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/NU5U4JCG=9A%' and fbizappid = '83bfebc8000037ac');

-- 资源引入树 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/NN=UZDQX3WQ%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/NN=UZDQX3WQ%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT09W78IJV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%/NN=UZDQX3WQ%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%/NN=UZDQX3WQ%' and fbizappid = '83bfebc8000037ac');

--==========================================

-- 行名行号 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%7e73779400000aac%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%7e73779400000aac%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT4HQBKTPV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%7e73779400000aac%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%7e73779400000aac' and fbizappid = '83bfebc8000037ac');

-- 异常行名行号 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%2LA/V=IMS58X%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%2LA/V=IMS58X%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT4HQBKTPV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%2LA/V=IMS58X%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%2LA/V=IMS58X' and fbizappid = '83bfebc8000037ac');

-- 异常行名行号消息提示 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%37/JWTPKZGWI%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%37/JWTPKZGWI%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT4HQBKTPV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%37/JWTPKZGWI%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%37/JWTPKZGWI' and fbizappid = '83bfebc8000037ac');

-- 消息提示 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%2LAF4792=JQJ%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%2LAF4792=JQJ%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT4HQBKTPV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%2LAF4792=JQJ%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%2LAF4792=JQJ' and fbizappid = '83bfebc8000037ac');

-- 行名行号单据参数 迁移
-- 迁移应用
UPDATE t_meta_bizunitrelform uf set fbizappid = (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%1I44J474T5AC%' and fbizappid = '83bfebc8000037ac')
and EXISTS (SELECT top 1 fid from t_meta_bizapp where finheritpath like '0efa1992000000ac%' order by finheritpath DESC) 
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%1I44J474T5AC%' and fbizappid = '83bfebc8000037ac');

-- 功能分组 
UPDATE t_meta_bizunitrelform set fbizunitid = '3IJT4HQBKTPV' 
where fformid in(SELECT fid from t_meta_entitydesign where finheritpath like '%1I44J474T5AC%' and fbizappid = '83bfebc8000037ac')
and EXISTS(SELECT fid from t_meta_entitydesign where finheritpath like '%1I44J474T5AC' and fbizappid = '83bfebc8000037ac');