--供应商预置京东

IF NOT EXISTS (SELECT 1 FROM t_bd_supplier WHERE fid = 486095512240421888)
INSERT INTO t_bd_supplier(FADMINORGID,FAPPROVEDATE,FTYPE,FSUPPLIERSTATUS,FPURCHASEDEPTID,FCREATEORGID,FMASTERID,FEMPLOYEE,FENABLEVMI,FLOGO,FSIMPLEPINYIN,FCREATETIME,FBUSINESSTERM,FPURCHASEHOLD,FLINKMAN,FISSUPPCOLLA,FSETTLEMENTTYPEID,FDISABLERID,FSIMPLENAME,FBLOCSUPPLIER,FORGID,FPAYMENTCONDID,FDELIVERSUPPLIERID,FNAME,FREGCAPITAL,FINVOICESUPPLIERID,FMODIFIERID,FINVOICEADDRESS,FPAYHOLD,FTAXTYPE,FRECEIVINGSUPPLIERID,FBIZFUNCTION,FADDRESS,FAPPROVERID,FARTIFICIALPERSON,FPAYMENTUNIT,FTAXRATEID,FMATCHINGRULE,FINVOICEHOLD,FBIZPARTNERID,FCTRLSTRATEGY,FENABLE,FINVOICETYPE,FPAYMENTCURRENCY,FMALLSTATUS,FID,FBILLADDRESS,FINVOICECATEGORY,FPURCHASERID,FDISABLEDATE,FSTATUS,FMALLDATE,FBUSINESSSCOPE,FSETTLEMENTCYID,FNUMBER,FGROUPID,FMODIFYTIME,FCREATORID) VALUES (486095482586692608,{ts'2019-01-01  12:59:59'},'1',880835462149703680,0,55,0,0,'0',' ','jdsc',{ts'2019-01-01  12:59:59'},' ','0',' ','1',0,0,' ',0,55,0,486095512240421888,' ',' ',486095512240421888,871507151628055552,0,'0',' ',486095512240421888,'1,2,3',' ',0,' ',' ',0,' ','0',486095512332696576,'5','0','0',0,'B',486095512240421888,0,0,0,{ts'2019-01-01  12:59:59'},'C',{ts'2020-08-27  10:45:47'},' ',0,'JD',1,{ts'2020-08-03  17:06:45'},0); 


IF NOT EXISTS (SELECT 1 FROM T_BD_Supplier_l WHERE FLOCALEID = 'zh_CN' AND FID = 486095512240421888)
INSERT INTO T_BD_Supplier_l(FID,FREGCAPITAL,FPKID,FLOCALEID,FBUSINESSTERM,FLINKMAN,FSIMPLENAME,FADDRESS,FBUSINESSSCOPE,FNAME,FARTIFICIALPERSON) VALUES (486095512240421888,' ','1===52J3MVCU','zh_CN',' ',' ',' ',' ',' ','京东商城',' '); 


IF NOT EXISTS (SELECT 1 FROM T_BD_Supplier_l WHERE FLOCALEID = 'zh_TW' AND FID = 486095512240421888)
INSERT INTO T_BD_Supplier_l(FID,FREGCAPITAL,FPKID,FLOCALEID,FBUSINESSTERM,FLINKMAN,FSIMPLENAME,FADDRESS,FBUSINESSSCOPE,FNAME,FARTIFICIALPERSON) VALUES (486095512240421888,' ','0OQKOE0LA66Z','zh_TW',' ',' ',' ',' ',' ','京東商城',' '); 

IF NOT EXISTS (SELECT 1 FROM t_bd_suppliergroupdetail WHERE FID = 1038868859387386880)
INSERT INTO t_bd_suppliergroupdetail(FID,FCREATEORGID,FSUPPLIERID,FSTANDARDID,FGROUPID) VALUES (1038868859387386880,100000,486095512240421888,716529547008326656,1); 



--供应商预置苏宁
IF NOT EXISTS (SELECT 1 FROM t_bd_supplier WHERE fid = 968563370657601536)
INSERT INTO T_BD_Supplier(FADMINORGID,FAPPROVEDATE,FTYPE,FSUPPLIERSTATUS,FPURCHASEDEPTID,FCREATEORGID,FMASTERID,FEMPLOYEE,FENABLEVMI,FLOGO,FSIMPLEPINYIN,FCREATETIME,FBUSINESSTERM,FPURCHASEHOLD,FLINKMAN,FISSUPPCOLLA,FSETTLEMENTTYPEID,FDISABLERID,FSIMPLENAME,FBLOCSUPPLIER,FORGID,FPAYMENTCONDID,FDELIVERSUPPLIERID,FNAME,FREGCAPITAL,FINVOICESUPPLIERID,FMODIFIERID,FINVOICEADDRESS,FPAYHOLD,FTAXTYPE,FRECEIVINGSUPPLIERID,FBIZFUNCTION,FADDRESS,FAPPROVERID,FARTIFICIALPERSON,FPAYMENTUNIT,FTAXRATEID,FMATCHINGRULE,FINVOICEHOLD,FBIZPARTNERID,FCTRLSTRATEGY,FENABLE,FINVOICETYPE,FPAYMENTCURRENCY,FMALLSTATUS,FID,FBILLADDRESS,FINVOICECATEGORY,FPURCHASERID,FDISABLEDATE,FSTATUS,FMALLDATE,FBUSINESSSCOPE,FSETTLEMENTCYID,FNUMBER,FGROUPID,FMODIFYTIME,FCREATORID) VALUES (0,NULL,'1',880835462149703680,0,100000,968563370657601536,0,'0',' ','snyg',{ts'2020-08-29  08:42:07'},' ','0',' ','1',0,0,' ',0,100000,0,968563370657601536,' ',' ',968563370657601536,13466739,0,'0',' ',968563370657601536,',1,2,3,',' ',NULL,' ','1',0,' ','0',968563372075276288,'5','1',' ',0,'B',968563370657601536,0,0,0,NULL,'C',{ts'2020-10-16  11:15:11'},' ',0,'SN',1,{ts'2020-08-29  08:42:31'},13466739); 

IF NOT EXISTS (SELECT 1 FROM T_BD_Supplier_l WHERE FLOCALEID = 'zh_CN' AND FID = 968563370657601536)
INSERT INTO T_BD_Supplier_l(FID,FREGCAPITAL,FPKID,FLOCALEID,FBUSINESSTERM,FLINKMAN,FSIMPLENAME,FADDRESS,FBUSINESSSCOPE,FNAME,FARTIFICIALPERSON) VALUES (968563370657601536,' ','1/Z9WPCF8O4R','zh_CN',' ',' ',' ',' ',' ','苏宁易购',' '); 

IF NOT EXISTS (SELECT 1 FROM T_BD_Supplier_l WHERE FLOCALEID = 'zh_TW' AND FID = 968563370657601536)
INSERT INTO T_BD_Supplier_l(FID,FREGCAPITAL,FPKID,FLOCALEID,FBUSINESSTERM,FLINKMAN,FSIMPLENAME,FADDRESS,FBUSINESSSCOPE,FNAME,FARTIFICIALPERSON) VALUES (968563370657601536,' ','1/Z9WPCF8O4S','zh_TW',' ',' ',' ',' ',' ','蘇寧易購',' '); 

IF NOT EXISTS (SELECT 1 FROM t_bd_suppliergroupdetail WHERE FID = 1038479713061836800)
INSERT INTO t_bd_suppliergroupdetail(FID,FCREATEORGID,FSUPPLIERID,FSTANDARDID,FGROUPID) VALUES (1038479713061836800,100000,968563370657601536,716529547008326656,1); 

--设置供应商状态
update t_bd_supplier set fsupplierstatus = 880835462149703680 where fid = 486095512240421888;
update t_bd_supplier set fsupplierstatus = 880835462149703680 where fid = 968563370657601536;