-- 带组织基础资料要加管控策略 私有
-- zhaohui_zeng 2020-03-26
-- 算法注册配置

DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_algoregister';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_algoregister') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (855667071537953792, ' ', 'mrp_algoregister', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-03-26 17:26:11'}, 1, {ts'2020-03-26 17:26:11'}, '0', null, '0MBBBZ1L5IAW', 855667071537953792, ' ');


-- 带组织基础资料要加管控策略 私有
-- zhaohui_zeng 2020-03-26
-- 业务方案配置

DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_businessplan';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_businessplan') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (855701910592994304, ' ', 'mrp_businessplan', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-03-26 17:26:11'}, 1, {ts'2020-03-26 17:26:11'}, '0', null, '0MBBBZ1L5IAW', 855701910592994304, ' ');

-- 带组织基础资料要加管控策略 私有
-- zhaohui_zeng 2020-04-07
-- 供应资源优先级

DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_supplyrespriority';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_supplyrespriority')
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (864366251978486784, ' ', 'mrp_supplyrespriority', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-03-26 17:26:11'}, 1, {ts'2020-03-26 17:26:11'}, '0', null, '0MBBBZ1L5IAW', 864366251978486784, ' ');


--供应网络定义 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_definitionsupply';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_definitionsupply') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (874032421362788352, ' ', 'mrp_definitionsupply', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-20 22:38:11'}, 1, {ts'2020-04-20 22:38:11'}, 0, null, '0MBBBZ1L5IAW', 874032421362788352, ' ');

--需求消耗方案 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_demandplan';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_demandplan') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (874034784374895616, ' ', 'mrp_demandplan', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-20 22:38:11'}, 1, {ts'2020-04-20 22:38:11'}, 0, null, '0MBBBZ1L5IAW', 874034784374895616, ' ');

--需求消耗记录 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_demandrecord';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_demandrecord') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (874034949664027648, ' ', 'mrp_demandrecord', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-20 22:38:11'}, 1, {ts'2020-04-20 22:38:11'}, 0, null, '0MBBBZ1L5IAW', 874034949664027648, ' ');

--资源注册配置 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_resourceregister_cf';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_resourceregister_cf') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (873700921484264448, ' ', 'mrp_resourceregister_cf', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-22 11:38:11'}, 1, {ts'2020-04-22 11:38:11'}, 0, null, '0MBBBZ1L5IAW', 873700921484264448, ' ');

--单据字段映射 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_billfieldtransfer';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_billfieldtransfer') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (874529613957578752, ' ', 'mrp_billfieldtransfer', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-22 11:38:11'}, 1, {ts'2020-04-22 11:38:11'}, 0, null, '0MBBBZ1L5IAW', 874529613957578752, ' ');

--库存供应策略 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_stocksupply_policy';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_stocksupply_policy') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (875079591985729536, ' ', 'mrp_stocksupply_policy', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-22 11:38:11'}, 1, {ts'2020-04-22 11:38:11'}, 0, null, '0MBBBZ1L5IAW', 875079591985729536, ' ');

--制造策略 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_manustrategy';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_manustrategy') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (875081171468342272, ' ', 'mrp_manustrategy', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-22 11:38:11'}, 1, {ts'2020-04-22 11:38:11'}, 0, null, '0MBBBZ1L5IAW', 875081171468342272, ' ');

--制造策略组 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_manustrategy_group';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_manustrategy_group') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (875081465287725056, ' ', 'mrp_manustrategy_group', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-22 11:38:11'}, 1, {ts'2020-04-22 11:38:11'}, 0, null, '0MBBBZ1L5IAW', 875081465287725056, ' ');

--计划组 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_demandgroup';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_demandgroup') 
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (875083754639511552, ' ', 'mrp_demandgroup', 914427355726916608, '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-22 11:38:11'}, 1, {ts'2020-04-22 11:38:11'}, 0, null, '0MBBBZ1L5IAW', 875083754639511552, ' ');

-- 带组织基础资料要加管控策略 私有
-- zhaohui_zeng 2020-04-29
-- 计划方案定义

DELETE FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_planprogram';
IF NOT EXISTS (SELECT 1 FROM T_BD_DefaultCtrlStrategy WHERE FBASEDATAID = 'mrp_planprogram')
insert into T_BD_DefaultCtrlStrategy (FID, FNUMBER, FBASEDATAID, FCTRLVIEW, FDATATYPE, FDEFAULTMANAGESTRATEGY, FDEFAULTCTRLSTRATEGY, FISSYSTEM, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FAPPSYSTEMID, FMASTERID, FPLUGIN)
values (878737140593299456, ' ', 'mrp_planprogram', '914427355726916608', '2', '1', '7', '0', '1', 'A', 1, {ts'2020-04-22 11:38:11'}, 1, {ts'2020-04-22 11:38:11'}, '0', null, '0MBBBZ1L5IAW', 878737140593299456, ' ');

--计算方案配置 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FID = 920232803554119680;
INSERT INTO T_BD_DefaultCtrlStrategy(FID,FCTRLVIEW,FDEFAULTMANAGESTRATEGY,FDATATYPE,FDISABLEDATE,FMASTERID,FSTATUS,FAPPSYSTEMID,FNUMBER,FDEFAULTCTRLSTRATEGY,FBASEDATAID,FCREATETIME,FENABLE,FMODIFIERID,FPLUGIN,FMODIFYTIME,FCREATORID,FISSYSTEM,FDISABLERID) VALUES (920232803554119680,914427355726916608,'1','2',NULL,920232803554119680,'A','0MBBBZ1L5IAW',' ','7','mrp_calplanconfig',{ts'2020-06-23  16:17:58'},'1',1,' ',{ts'2020-06-23  16:18:18'},1,'0',0); 

--优先级类型定义 私有
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FID = 924529715103054848;
INSERT INTO T_BD_DefaultCtrlStrategy(FID,FCTRLVIEW,FDEFAULTMANAGESTRATEGY,FDATATYPE,FDISABLEDATE,FMASTERID,FSTATUS,FAPPSYSTEMID,FNUMBER,FDEFAULTCTRLSTRATEGY,FBASEDATAID,FCREATETIME,FENABLE,FMODIFIERID,FPLUGIN,FMODIFYTIME,FCREATORID,FISSYSTEM,FDISABLERID) VALUES (924529715103054848,914427355726916608,'1','2',NULL,924529715103054848,'A','0MBBBZ1L5IAW',' ','7','mrp_priority_type',{ts'2020-06-29  14:35:07'},'1',1,' ',{ts'2020-06-29  14:35:30'},1,'0',0); 
