-- 1.事件定义:采购订单(pur_order)的催办，协同采购订单(scp_order)的执行进度反馈

--单头 

DELETE FROM t_evt_event WHERE FID = 1383473971839899648;
INSERT INTO t_evt_event(FID,FMODIFYDATE,FTYPE,FSCENE,FCREATEDATE,FOPERATION,FDESCRIPTION,FENTITY,FOPERNUMBER,FSTATUS,FNUMBER,FNAME,FMODIFIER,FSOURCE,FCREATER) VALUES (1383473971839899648,{ts'2022-07-18  00:00:00'},'cosmic','operate',{ts'2022-03-24  00:00:00'},'催办',' ','pur_order','urge','1','pur_order.urge',' ',1210069609236019200,'eae607fb000143ac',13466739); 

DELETE FROM t_evt_event WHERE FID = 1383473082446125056;
INSERT INTO t_evt_event(FID,FMODIFYDATE,FTYPE,FSCENE,FCREATEDATE,FOPERATION,FDESCRIPTION,FENTITY,FOPERNUMBER,FSTATUS,FNUMBER,FNAME,FMODIFIER,FSOURCE,FCREATER) VALUES (1383473082446125056,{ts'2022-03-24  00:00:00'},'cosmic','operate',{ts'2022-03-24  00:00:00'},'执行进度反馈',' ','scp_order','execsche','1','scp_order.execsche',' ',13466739,'eae607fb000152ac',13466739); 

--多语言

DELETE FROM t_evt_event_l WHERE FID = 1383473971839899648 AND flocaleid = 'zh_CN';
INSERT INTO t_evt_event_l (fid, fpkid, flocaleid, foperation, fdescription, fname) VALUES (1383473971839899648, '2AY2556S=1Z+', 'zh_CN', ' ', ' ', '协同采购订单.催办');
DELETE FROM t_evt_event_l WHERE FID = 1383473082446125056 AND flocaleid = 'zh_CN';
INSERT INTO t_evt_event_l (fid, fpkid, flocaleid, foperation, fdescription, fname) VALUES (1383473082446125056, '2AY2+OF6/BVP', 'zh_CN', ' ', ' ', '采购订单.执行进度反馈');

delete from t_evt_eventconfig where fentryid = 1386971186298159104;
delete from t_evt_eventconfig where fentryid = 1386971186298159105;
DELETE FROM t_evt_eventconfig WHERE FENTRYID = 1467497864631708672;
INSERT INTO t_evt_eventconfig(FID,FCONFIGDESCRIPTION,FCONFIGTYPE,FISTRANSFER,FENTRYID,FSEQ,FCONFIGNUMBER,FISCUSTOM,FCONFIGNAME) VALUES (1383473971839899648,'返回结果类型为:实体','{"description":"返回结果类型为:实体","entityid":"bd_supplier","type":"DynamicObject","ismulti":false}','1',1467497864631708672,1,'supplier','0','供应商'); 
DELETE FROM t_evt_eventconfig WHERE FENTRYID = 1467497864631708674;
INSERT INTO t_evt_eventconfig(FID,FCONFIGDESCRIPTION,FCONFIGTYPE,FISTRANSFER,FENTRYID,FSEQ,FCONFIGNUMBER,FISCUSTOM,FCONFIGNAME) VALUES (1383473971839899648,'返回结果类型为:实体','{"description":"返回结果类型为:实体","entityid":"scp_bizperson","type":"DynamicObject","ismulti":false}','1',1467497864631708674,2,'contacter','0','供应商联系人'); 

DELETE FROM t_evt_eventconfig WHERE FENTRYID = 1383473082446125057;
INSERT INTO t_evt_eventconfig(FID,FCONFIGDESCRIPTION,FCONFIGTYPE,FISTRANSFER,FENTRYID,FSEQ,FCONFIGNUMBER,FISCUSTOM,FCONFIGNAME) VALUES (1383473082446125056,'返回结果类型为:实体','{"description":"返回结果类型为:实体","entityid":"pur_bizperson","type":"DynamicObject","ismulti":false}','1',1383473082446125057,1,'person','0','联系人'); 

-- 2.事件订阅:采购订单(pur_order)的催办，协同采购订单(scp_order)的执行进度反馈
--单头 
DELETE FROM t_evt_subscription WHERE FID = 1386971623218806784;

DELETE FROM t_evt_subscription WHERE FID = 1467501019444570112;
INSERT INTO t_evt_subscription(FMODIFYDATE,FSERVICENUMBER,FEXECUTORVALUE,FSEQUENCE,FSERVICECONFIG,FEVENT,FERRORNOTIFY,FEVENTNUMBER,FISMODIFIED,FTIMINGSTRATEGY,FID,FISPREINSDATA,FCONDITION,FCREATEDATE,FSTATUS,FISCONCURRENT,FNOTIFYTEXT,FSERVICE,FNAME,FNUMBER,FEXPRESSION,FMODIFIER,FEXECUTOR,FCREATER,FERRORSTRATEGY) VALUES ({ts'2022-07-19  00:00:00'},'sendMsg',' ',0,'{"receivervalue":"[{\"valueshowtext\":\"{\\\"appid\\\":\\\"pur\\\",\\\"class\\\":\\\"kd.scm.pur.common.util.SendMsgToSupContacter\\\"}\",\"type\":\"Plugin\",\"class\":\"{\\\"appid\\\":\\\"pur\\\",\\\"class\\\":\\\"kd.scm.pur.common.util.SendMsgToSupContacter\\\"}\"}]","receiver":"插件：{\"appid\":\"pur\",\"class\":\"kd.scm.pur.common.util.SendMsgToSupContacter\"}","urlvalue":"{\"formId\":\"scp_order\",\"mob_formId\":\"mobsp_purorderview\"}","batch":true,"notifytype":",sms,email,","url":"http://localhost:8080/ierp/integration/yzjShareOpen.do?formId=scp_order&mb_formId=mobsp_purorderview&pkId=0&accountId=1150088256818250752&src=wf","content":"{\"title\":{\"zh_CN\":\"【订单催办通知】\"},\"content\":{\"zh_CN\":\"您有新的催办任务，请及时反馈采购订单执行进度。\\n供应商：{model.supplier.name}\\n订单编号：{billno}\"}}"}',1383473971839899648,' ','pur_order.urge','1',' ',1467501019444570112,'0',' ',{ts'2022-07-18  00:00:00'},'1','1',' ',920966216397414400,'协同采购订单.催办.发送消息','pur_order.urge.sendMsg',' ',1210069609236019200,' ',1210069609236019200,'retry'); 


DELETE FROM t_evt_subscription WHERE FID = 1383881509928441856;
INSERT INTO t_evt_subscription(FMODIFYDATE,FSERVICENUMBER,FEXECUTORVALUE,FSEQUENCE,FSERVICECONFIG,FEVENT,FERRORNOTIFY,FEVENTNUMBER,FISMODIFIED,FTIMINGSTRATEGY,FID,FISPREINSDATA,FCONDITION,FCREATEDATE,FSTATUS,FISCONCURRENT,FNOTIFYTEXT,FSERVICE,FNAME,FNUMBER,FEXPRESSION,FMODIFIER,FEXECUTOR,FCREATER,FERRORSTRATEGY) VALUES ({ts'2022-07-19  00:00:00'},'sendMsg',' ',0,'{"receivervalue":"[{\"valueshowtext\":\"采购订单.联系人.对应人员\",\"type\":\"entity\",\"value\":\"model.person.user\",\"required\":false}]","receiver":"实体：采购订单.联系人.对应人员","urlvalue":"{\"formId\":\"pur_order\",\"mob_formId\":\"pur_order_m_list\"}","batch":true,"notifytype":",sms,email,","url":"http://localhost:8080/ierp/integration/yzjShareOpen.do?formId=pur_order&mb_formId=pur_order_m_list&pkId=0&accountId=1150088256818250752&src=wf","content":"{\"title\":{\"zh_CN\":\"【订单执行进度反馈通知】\"},\"content\":{\"zh_CN\":\"您有采购订单供应商已反馈新的执行进度。\\n供应商：{model.supplier.name}\\n订单编号：{billno}\"}}"}',1383473082446125056,' ','scp_order.execsche','1',' ',1383881509928441856,'0',' ',{ts'2022-03-25  00:00:00'},'1','1',' ',920966216397414400,'采购订单.执行进度反馈.发送消息','scp_order.execsche.sendMsg',' ',1210069609236019200,' ',13466739,'ignore'); 


--多语言
DELETE FROM t_evt_subscription_l WHERE FID = 1386971623218806784 AND flocaleid = 'zh_CN';

DELETE FROM t_evt_subscription_l WHERE FID = 1467501019444570112 AND flocaleid = 'zh_CN';
INSERT INTO t_evt_subscription_l(FID,FPKID,FLOCALEID,FNOTIFYTEXT,FNAME) VALUES (1467501019444570112,'2L8N8TY234J=','zh_CN',' ','协同采购订单.催办.发送消息'); 
DELETE FROM t_evt_subscription_l WHERE FID = 1383881509928441856 AND flocaleid = 'zh_CN';
INSERT INTO t_evt_subscription_l (fid, fpkid, flocaleid, fnotifytext, fname) VALUES (1383881509928441856, '2B+0=WDL+1GA', 'zh_CN', ' ', '采购订单.执行进度反馈.发送消息');