-- 计划组预置数据添加
-- jiangsong 2020-04-17

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL WHERE FNUMBER = 'MTS') 
insert into T_MRP_DEMANDMODEL (FID, FNUMBER, FSTATUS, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FCREATEORGID, FORGID, FCTRLSTRATEGY)
values (871699829976228017, 'MTS', 'C', 0, 0, '1', {ts'2020-04-17  17:24:33'}, null, 0, 0, 0, '5');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL WHERE FNUMBER = 'MTO') 
insert into T_MRP_DEMANDMODEL (FID, FNUMBER, FSTATUS, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FCREATEORGID, FORGID, FCTRLSTRATEGY)
values (87169990299906017, 'MTO', 'C', 0, 0, '1', {ts'2020-04-17  17:24:33'}, null, 0, 0, 0, '5');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL WHERE FNUMBER = 'ATO') 
insert into T_MRP_DEMANDMODEL (FID, FNUMBER, FSTATUS, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FCREATEORGID, FORGID, FCTRLSTRATEGY)
values (87169996036875017, 'ATO', 'C', 0, 0, '1', {ts'2020-04-17  17:24:33'}, null, 0, 0, 0, '5');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL WHERE FNUMBER = 'ETO') 
insert into T_MRP_DEMANDMODEL (FID, FNUMBER, FSTATUS, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FCREATEORGID, FORGID, FCTRLSTRATEGY)
values (871700018711519017, 'ETO', 'C', 0, 0, '1', {ts'2020-04-17  17:24:33'}, null, 0, 0, 0, '5');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL_l WHERE FPKID = '0Q17BQNREQXH') 
insert into T_MRP_DEMANDMODEL_l (FPKID, FID, FLOCALEID, FNAME)
values ('0Q17BQNREQXH', 871699829976228017, 'zh_CN', 'MTS');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL_l WHERE FPKID = '0Q17BQNREQXI') 
insert into T_MRP_DEMANDMODEL_l (FPKID, FID, FLOCALEID, FNAME)
values ('0Q17BQNREQXI', 871699829976228017, 'zh_TW', 'MTS');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL_l WHERE FPKID = '0Q17C9E30/TL') 
insert into T_MRP_DEMANDMODEL_l (FPKID, FID, FLOCALEID, FNAME)
values ('0Q17C9E30/TL', 87169990299906017, 'zh_CN', 'MTO');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL_l WHERE FPKID = '0Q17C9E30/TM') 
insert into T_MRP_DEMANDMODEL_l (FPKID, FID, FLOCALEID, FNAME)
values ('0Q17C9E30/TM', 87169990299906017, 'zh_TW', 'MTO');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL_l WHERE FPKID = '0Q17COPZFJ8S') 
insert into T_MRP_DEMANDMODEL_l (FPKID, FID, FLOCALEID, FNAME)
values ('0Q17COPZFJ8S', 87169996036875017, 'zh_CN', 'ATO');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL_l WHERE FPKID = '0Q17COPZFJ8T') 
insert into T_MRP_DEMANDMODEL_l (FPKID, FID, FLOCALEID, FNAME)
values ('0Q17COPZFJ8T', 87169996036875017, 'zh_TW', 'ATO');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL_l WHERE FPKID = '0Q17D3=LH80F') 
insert into T_MRP_DEMANDMODEL_l (FPKID, FID, FLOCALEID, FNAME)
values ('0Q17D3=LH80F', 871700018711519017, 'zh_CN', 'ETO');

IF NOT EXISTS (SELECT 1 FROM T_MRP_DEMANDMODEL_l WHERE FPKID = '0Q17D3=LH80G') 
insert into T_MRP_DEMANDMODEL_l (FPKID, FID, FLOCALEID, FNAME)
values ('0Q17D3=LH80G', 871700018711519017, 'zh_TW', 'ETO');

