/******  预置成本中心数据源 ******/
delete from T_BAS_SourceType where fid = 708643427767573504;
INSERT into T_BAS_SourceType(FID,FMasterID,FNumber,FBizObjectID,FEnable,FStatus,FCreatorID,FCreateTime,FModifierID,FModifyTime)
VALUES(708643427767573504, 708643427767573504, 'bos_adminorg', 'bos_adminorg', '1', 'C', 1, {ts'2019-09-09 00:00:00'}, 1, {ts'2019-09-09 00:00:00'});

delete from T_BAS_SourceType_L where fid = 708643427767573504;
INSERT INTO T_BAS_SourceType_L(FPKID,FID,FLocaleID,FName,FDescription)
VALUES('070/ZI8X63J8',708643427767573504,'zh_CN','行政组织', ' ');
INSERT INTO T_BAS_SourceType_L(FPKID,FID,FLocaleID,FName,FDescription)
VALUES('070/ZI8X63J9',708643427767573504,'zh_TW','行政組織', ' ');

/******  预置成本中心 ******/
DELETE FROM t_bas_costcenter WHERE FID = 100000;
INSERT INTO t_bas_costcenter(FID,FORGDUTYID,FMASTERID,FPARENTID,FSTATUS,FNUMBER,FCREATETIME,FISLEAF,FENABLE,FMODIFIERID,FMODIFYTIME,FLEVEL,FLONGNUMBER,FCREATORID) (SELECT FID,1,FID,0,'C',FNUMBER,{ts'2019-09-09  00:00:00'},'1','1',1,{ts'2019-09-09  00:00:00'},1,FNUMBER,1 FROM T_ORG_ORG WHERE FID = 100000); 

DELETE FROM t_bas_costcenter_L WHERE FID = 100000;
INSERT INTO t_bas_costcenter_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FFULLNAME,FNAME) ( SELECT FID,FPKID,FLOCALEID,' ',FNAME,FNAME FROM T_ORG_ORG_L WHERE FID = 100000); 

DELETE FROM t_bas_costcentersource WHERE FID = 100000;
INSERT INTO t_bas_costcentersource(FID,FCOSTCENTERID,FDATAID,FSEQ,FSOURCETYPEID) VALUES (100000,100000,100000,1,708643427767573504); 

update t_bas_costcenter set forgdutyid = (select TOP 1 forgdutyid from t_org_dutyrelation where FORGID = 100000 ORDER BY forgdutyid)  where EXISTS (select forgdutyid from t_org_dutyrelation where FORGID = 100000);