-- 事件定义 物料审核、物料保存
IF NOT EXISTS (SELECT 1 FROM t_evt_event WHERE FID = 1332452002008976384)
INSERT INTO t_evt_event(FID,FMODIFYDATE,FTYPE,FSCENE,FCREATEDATE,FOPERATION,FDESCRIPTION,FENTITY,FOPERNUMBER,FSTATUS,FNUMBER,FNAME,FMODIFIER,FSOURCE,FCREATER) VALUES (1332452002008976384,{ts'2022-01-13  00:00:00'},'cosmic','operate',{ts'2022-01-13  00:00:00'},'审核',' ','bd_material','audit','1','bd_material.audit',' ',13466739,'0efa1992000000ac',13466739); 
IF NOT EXISTS (SELECT 1 FROM t_evt_event WHERE FID = 1341873682452105216)
INSERT INTO t_evt_event(FID,FMODIFYDATE,FTYPE,FSCENE,FCREATEDATE,FOPERATION,FDESCRIPTION,FENTITY,FOPERNUMBER,FSTATUS,FNUMBER,FNAME,FMODIFIER,FSOURCE,FCREATER) VALUES (1341873682452105216,{ts'2022-01-26  00:00:00'},'cosmic','operate',{ts'2022-01-26  00:00:00'},'保存',' ','bd_material','save','1','bd_material.save',' ',13466739,'0efa1992000000ac',13466739); 

IF NOT EXISTS (SELECT 1  FROM t_evt_event_l WHERE FPKID = '26TSAJWO=Z93')
INSERT INTO t_evt_event_l(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1341873682452105216,'26TSAJWO=Z93','zh_CN',' ','物料.保存'); 
IF NOT EXISTS (SELECT 1  FROM t_evt_event_l WHERE FPKID = '25NMXYJ0QDT4')
INSERT INTO t_evt_event_l(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1332452002008976384,'25NMXYJ0QDT4','zh_CN',' ','物料.审核'); 

-- 事件订阅 物料保存（快速修改）、物料审核时同步修改BOM组件的物料配置方式
DELETE FROM t_evt_subscription WHERE FID = 1622558880745676800;
INSERT INTO t_evt_subscription(FID,FMODIFYDATE,FCONDITION,FSERVICENUMBER,FCREATEDATE,FSEQUENCE,FISCONCURRENT,FSTATUS,FNOTIFYTEXT,FSERVICE,FNUMBER,FNAME,FSERVICECONFIG,FEXPRESSION,FMODIFIER,FEVENT,FERRORNOTIFY,FEVENTNUMBER,FTIMINGSTRATEGY,FERRORSTRATEGY,FCREATER) VALUES (1622558880745676800,{ts'2023-02-17  00:00:00'},' ','executePlugin',{ts'2023-02-17  00:00:00'},0,'1','1',' ',904236026388547584,'bd_material.save.executeSaveSynBOMPlugin','物料.保存.执行插件','{"scriptid":"","type":"class","value":"{\"appid\":\"fmm\",\"class\":\"kd.mmc.fmm.business.event.MaterialAuditConfigPropSynBomEvent\"}"}',' ',1600618438999408640,1341873682452105216,' ','bd_material.save',' ','retry',1600618438999408640); 
DELETE FROM t_evt_subscription WHERE FID = 1622531435023852544;
INSERT INTO t_evt_subscription(FID,FMODIFYDATE,FCONDITION,FSERVICENUMBER,FCREATEDATE,FSEQUENCE,FISCONCURRENT,FSTATUS,FNOTIFYTEXT,FSERVICE,FNUMBER,FNAME,FSERVICECONFIG,FEXPRESSION,FMODIFIER,FEVENT,FERRORNOTIFY,FEVENTNUMBER,FTIMINGSTRATEGY,FERRORSTRATEGY,FCREATER) VALUES (1622531435023852544,{ts'2023-02-17  00:00:00'},' ','executePlugin',{ts'2023-02-17  00:00:00'},0,'1','1',' ',904236026388547584,'bd_material.audit.executeAuditSynBOMPlugin','物料.审核.执行插件','{"scriptid":"","type":"class","value":"{\"appid\":\"fmm\",\"class\":\"kd.mmc.fmm.business.event.MaterialAuditConfigPropSynBomEvent\"}"}',' ',1600618438999408640,1332452002008976384,' ','bd_material.audit',' ','retry',1600618438999408640); 

DELETE FROM t_evt_subscription_l WHERE FPKID = '32=D/TGFTPBM';
INSERT INTO t_evt_subscription_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1622531435023852544,'32=D/TGFTPBM','zh_CN','物料.审核.执行插件'); 
DELETE FROM t_evt_subscription_l WHERE FPKID = '32=I4TB4J4+B';
INSERT INTO t_evt_subscription_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1622558880745676800,'32=I4TB4J4+B','zh_CN','物料.保存.执行插件'); 



