delete from t_lic_group_version_l where fentryid = (select fentryid from t_lic_group_version where fid = 611 and fversion = '7.0'); 
delete from t_lic_group_version where fid = 611 and fversion = '7.0' ; 
delete from t_lic_group where fid = 611 or fnumber = 'PRO_MMC_MRPAP'; 
delete from t_lic_group_l where fid = 611 ; 
insert into t_lic_group (fid,fnumber,ftype,fgroupdes) values (611,'PRO_MMC_MRPAP','2',' '); 
insert into t_lic_group_version (fid,fentryid,fnameversion,fgroupdesversion,fversion) values (611,2042760317183985665,'高级计划',' ','7.0'); 
insert into t_lic_group_l (fpkid,fid,flocaleid,fname) values ('4DXO+H0V3ZOK',611,'GLang','高级计划'); 
insert into t_lic_group_version_l (fpkid,fentryid,flocaleid,fnameversion) values ('4DXO+H0V4+BU',2042760317183985665,'GLang','高级计划'); 
insert into t_lic_group_l (fpkid,fid,flocaleid,fname) values ('4DXO+H0V3ZOL',611,'zh_CN','高级计划'); 
insert into t_lic_group_version_l (fpkid,fentryid,flocaleid,fnameversion) values ('4DXO+H0V4+BV',2042760317183985665,'zh_CN','高级计划'); 
update t_lic_group_version_l set fgroupdesversion = ' ' where flocaleid = 'zh_CN' and fentryid = 2042760317183985665; 
UPDATE t_lic_module SET fname = '高级计划', fgroupid = 611 WHERE fnumber = 'MMC_MRPAP'; 
INSERT INTO t_lic_module (fid, fnumber, fname, fgroupid) SELECT 370, 'MMC_MRPAP', '高级计划', 611 WHERE NOT EXISTS ( SELECT 1 FROM t_lic_module WHERE fnumber = 'MMC_MRPAP' ); 
UPDATE t_lic_module_version SET fnameversion = '高级计划' WHERE fid IN ( SELECT fid FROM t_lic_module WHERE fnumber = 'MMC_MRPAP' ) AND fversion = '7.0'; 
INSERT INTO t_lic_module_version (fid, fentryid, fnameversion, fversion) SELECT lm.fid, 2042760317183984644, '高级计划', '7.0' FROM t_lic_module lm WHERE lm.fnumber = 'MMC_MRPAP' AND NOT EXISTS ( SELECT 1 FROM t_lic_module_version lmv WHERE lm.fid = lmv.fid ); 
UPDATE t_lic_module_l SET fname = '高级计划' WHERE flocaleid = 'GLang' AND fid IN (SELECT fid FROM t_lic_module WHERE fnumber = 'MMC_MRPAP'); 
INSERT INTO t_lic_module_l (fid, fpkid, flocaleid, fname) SELECT m.fid, '4DXO+H0V4+BW', 'GLang', '高级计划' FROM t_lic_module m WHERE m.fnumber = 'MMC_MRPAP' AND NOT EXISTS (SELECT 1 FROM t_lic_module_l ml WHERE ml.fid = m.fid AND ml.flocaleid = 'GLang'); 
UPDATE t_lic_module_version_l SET fnameversion = '高级计划' WHERE flocaleid = 'GLang' AND fentryid IN ( SELECT fentryid FROM t_lic_module_version WHERE fid IN ( SELECT fid FROM t_lic_module WHERE fnumber = 'MMC_MRPAP')); 
INSERT INTO t_lic_module_version_l (fpkid, fentryid, flocaleid, fnameversion) SELECT '4DXO+H0V3ZON', v.fentryid, 'GLang', '高级计划' FROM t_lic_module_version v JOIN t_lic_module m ON v.fid = m.fid LEFT JOIN t_lic_module_version_l lmvl ON v.fentryid = lmvl.fentryid AND lmvl.flocaleid = 'GLang' WHERE m.fnumber = 'MMC_MRPAP' AND lmvl.fentryid IS NULL; 
UPDATE t_lic_module_l SET fname = '高级计划' WHERE flocaleid = 'zh_CN' AND fid IN (SELECT fid FROM t_lic_module WHERE fnumber = 'MMC_MRPAP'); 
INSERT INTO t_lic_module_l (fid, fpkid, flocaleid, fname) SELECT m.fid, '4DXO+H0V4+BX', 'zh_CN', '高级计划' FROM t_lic_module m WHERE m.fnumber = 'MMC_MRPAP' AND NOT EXISTS (SELECT 1 FROM t_lic_module_l ml WHERE ml.fid = m.fid AND ml.flocaleid = 'zh_CN'); 
UPDATE t_lic_module_version_l SET fnameversion = '高级计划' WHERE flocaleid = 'zh_CN' AND fentryid IN ( SELECT fentryid FROM t_lic_module_version WHERE fid IN ( SELECT fid FROM t_lic_module WHERE fnumber = 'MMC_MRPAP')); 
INSERT INTO t_lic_module_version_l (fpkid, fentryid, flocaleid, fnameversion) SELECT '4DXO+H0V3ZOO', v.fentryid, 'zh_CN', '高级计划' FROM t_lic_module_version v JOIN t_lic_module m ON v.fid = m.fid LEFT JOIN t_lic_module_version_l lmvl ON v.fentryid = lmvl.fentryid AND lmvl.flocaleid = 'zh_CN' WHERE m.fnumber = 'MMC_MRPAP' AND lmvl.fentryid IS NULL; 
