-- 存货类别预置数据
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY WHERE FID = 1474911538065180672) INSERT INTO T_BD_MATERIALCATEGORY(FID,FREMARK,FISPRESET,FENABLE,FNAME,FNUMBER,FMASTERID) VALUES (1474911538065180672,' ','1','1','辅料','CHJZFL02-SYS',1474911538065180672);
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY WHERE FID = 1477417939924682752) INSERT INTO T_BD_MATERIALCATEGORY(FID,FREMARK,FISPRESET,FENABLE,FNAME,FNUMBER,FMASTERID) VALUES (1477417939924682752,' ','1','1','自制半成品','CHJZFL03-SYS',1477417939924682752);
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY WHERE FID = 1477418081650215936) INSERT INTO T_BD_MATERIALCATEGORY(FID,FREMARK,FISPRESET,FENABLE,FNAME,FNUMBER,FMASTERID) VALUES (1477418081650215936,' ','1','1','委外半成品','CHJZFL04-SYS',1477418081650215936);
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY WHERE FID = 1477418197832435712) INSERT INTO T_BD_MATERIALCATEGORY(FID,FREMARK,FISPRESET,FENABLE,FNAME,FNUMBER,FMASTERID) VALUES (1477418197832435712,' ','1','1','产成品','CHJZFL05-SYS',1477418197832435712);
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY WHERE FID = 1477418329785240576) INSERT INTO T_BD_MATERIALCATEGORY(FID,FREMARK,FISPRESET,FENABLE,FNAME,FNUMBER,FMASTERID) VALUES (1477418329785240576,' ','1','1','库存商品','CHJZFL06-SY',1477418329785240576);
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY WHERE FID = 1477418432193366016) INSERT INTO T_BD_MATERIALCATEGORY(FID,FREMARK,FISPRESET,FENABLE,FNAME,FNUMBER,FMASTERID) VALUES (1477418432193366016,' ','1','1','资产','CHJZFL07-SYS',1477418432193366016);
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY WHERE FID = 1477418522815499264) INSERT INTO T_BD_MATERIALCATEGORY(FID,FREMARK,FISPRESET,FENABLE,FNAME,FNUMBER,FMASTERID) VALUES (1477418522815499264,' ','1','1','费用','CHJZFL08-SYS',1477418522815499264);
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY WHERE FID = 1477417827609611264) INSERT INTO T_BD_MATERIALCATEGORY(FID,FREMARK,FISPRESET,FENABLE,FNAME,FNUMBER,FMASTERID) VALUES (1477417827609611264,' ','1','1','原材料','CHJZFL01-SYS',1477417827609611264);
-- 存货类别预置数据
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2M54W4HMRHWM') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1474911538065180672,' ','2M54W4HMRHWM','zh_CN','辅料');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2M54W4HMRHWN') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1474911538065180672,' ','2M54W4HMRHWN','zh_TW','輔料');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG55ESA4=KD') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477417827609611264,' ','2MG55ESA4=KD','zh_CN','原材料');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG55ESA4=KE') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477417827609611264,' ','2MG55ESA4=KE','zh_TW','原材料');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG568P51CFT') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477417939924682752,' ','2MG568P51CFT','zh_CN','自制半成品');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG568P51CFU') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477417939924682752,' ','2MG568P51CFU','zh_TW','自製半成品');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG579ZZV2CN') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418081650215936,' ','2MG579ZZV2CN','zh_CN','委外半成品');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG579ZZV2CO') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418081650215936,' ','2MG579ZZV2CO','zh_TW','委外半成品');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG584+OCK1G') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418197832435712,' ','2MG584+OCK1G','zh_CN','产成品');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG584+OCK1H') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418197832435712,' ','2MG584+OCK1H','zh_TW','產成品');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG592H5UKJW') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418329785240576,' ','2MG592H5UKJW','zh_CN','库存商品');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG592H5UKJX') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418329785240576,' ','2MG592H5UKJX','zh_TW','庫存商品');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG59UL7E=YN') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418432193366016,' ','2MG59UL7E=YN','zh_CN','资产');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG59UL7E=YO') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418432193366016,' ','2MG59UL7E=YO','zh_TW','資產');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG5=HBMENAD') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418522815499264,' ','2MG5=HBMENAD','zh_CN','费用');
IF NOT EXISTS (SELECT 1 FROM T_BD_MATERIALCATEGORY_l WHERE FPKID = '2MG5=HBMENAE') INSERT INTO T_BD_MATERIALCATEGORY_l(FID,FREMARK,FPKID,FLOCALEID,FNAME) VALUES (1477418522815499264,' ','2MG5=HBMENAE','zh_TW','費用');

-- 基础资料管控策略
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FID = 1474913730679540736) INSERT INTO T_BD_DefaultCtrlStrategy(FID,FCTRLVIEW,FDEFAULTMANAGESTRATEGY,FDATATYPE,FDISABLEDATE,FMASTERID,FAPPSYSTEMID,FSTATUS,FNUMBER,FDEFAULTCTRLSTRATEGY,FBASEDATAID,FCREATETIME,FENABLE,FMODIFIERID,FPLUGIN,FMODIFYTIME,FCREATORID,FISSYSTEM,FDISABLERID) VALUES (1474913730679540736,10,'1','2',NULL,1474913730679540736,'0efa1992000000ac','A',' ','5','bd_materialcalinfo',{ts'2018-08-08 18:08:08'},'1',0,' ',NULL,1,'0',0);
