--删除错误的关系
DELETE FROM t_pbd_linkbillnode WHERE FID = '3TROA+WOFE75';
DELETE FROM t_pbd_linkbillnode WHERE FID = '3TROBU=6AYJK';
DELETE FROM t_pbd_linkbillnode WHERE FID = '3TRMHI5PLA65';

DELETE FROM t_pbd_linkbillnode WHERE FID = '3W==KB1LM9I/';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3W==KB1LM9I/','src_project','src_decision','项目启动到定标','{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_project","targetEntity":"src_decision","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','23E83F50',{ts'2024-01-31  00:00:00'},1874856739002856448,'3DNB1TJBXL99','0DUM2+6E41IA',{ts'2024-02-01  00:00:00'},'1',1); 
DELETE FROM t_pbd_linkbillnode WHERE FID = '3O92L=B5SRL3';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3O92L=B5SRL3','src_demand','src_project','项目立项到项目启动','{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_demand","targetEntity":"src_project","originLinkFiledKey":"id","targetLinkFiledKey":"source"}','0BF157D6',{ts'2023-11-02  00:00:00'},1874856739002856448,'3DNB1TJBXL99','0DUM2+6E41IA',{ts'2024-02-01  00:00:00'},'1',1); 
DELETE FROM t_pbd_linkbillnode WHERE FID = '3TRNYBBJ+4+0';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3TRNYBBJ+4+0','src_project','src_bidpublish','项目启动到发标','{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_project","targetEntity":"src_bidpublish","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','B53DB245',{ts'2024-01-03  00:00:00'},1874856739002856448,'3DNB1TJBXL99','0DUM2+6E41IA',{ts'2024-02-01  00:00:00'},'1',1); 
DELETE FROM t_pbd_linkbillnode WHERE FID = '3TROEN1ZXZ0H';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3TROEN1ZXZ0H','src_decision','src_contract','定标到签约','{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_decision","targetEntity":"src_contract","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','0447C6FD',{ts'2024-01-03  00:00:00'},1874856739002856448,'3DNB1TJBXL99','0DUM2+6E41IA',{ts'2024-02-01  00:00:00'},'1',1); 
DELETE FROM t_pbd_linkbillnode WHERE FID = '3TRO+VYB3J4N';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3TRO+VYB3J4N','src_bidpublish','src_decision','发标到定标','{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_bidpublish","targetEntity":"src_decision","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','75AB70A1',{ts'2024-01-03  00:00:00'},1874856739002856448,'3DNB1TJBXL99','0DUM2+6E41IA',{ts'2024-02-01  00:00:00'},'1',1); 
DELETE FROM t_pbd_linkbillnode WHERE FID = '3W9MMD4B5Y=1';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3W9MMD4B5Y=1','src_apply','src_demand','寻源申请到项目立项','{"@class":"kd.scm.common.helper.businesstracking.domain.BillBotpRelationParam","executeSourceEntity":"src_apply","executeTargetEntity":"src_demand"}','061A27BC',{ts'2024-01-31  00:00:00'},1,'3DNB6+0FIY5L','0DUM2+6E41IA',{ts'2024-01-31  00:00:00'},'1',1); 
DELETE FROM t_pbd_linkbillnode WHERE FID = '3W9Q44MCTJ+=';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3W9Q44MCTJ+=','src_contract','conm_purcontract','签约到采购合同','{"@class":"kd.scm.common.helper.businesstracking.domain.BillBotpRelationParam","executeSourceEntity":"src_contract","executeTargetEntity":"conm_purcontract"}','982A4CA1',{ts'2024-01-31  00:00:00'},1,'3DNB6+0FIY5L','0DUM2+6E41IA',{ts'2024-01-31  00:00:00'},'1',1); 
DELETE FROM t_pbd_linkbillnode WHERE FID = '3W9MQTTX+DY0';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3W9MQTTX+DY0','src_apply','src_project','寻源申请到项目启动','{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_apply","targetEntity":"src_project","originLinkFiledKey":"id","targetLinkFiledKey":"srcapply"}','626D5C58',{ts'2024-01-31  00:00:00'},1,'3DNB1TJBXL99','0DUM2+6E41IA',{ts'2024-01-31  00:00:00'},'1',1); 
DELETE FROM t_pbd_linkbillnode WHERE FID = '3O92R3LA0J89';
INSERT INTO t_pbd_linkbillnode(FID,FSOURCEENTITYID,FTARGETENTITYID,FNODEDESC,FNAME,FNUMBER,FCREATETIME,FMODIFIERID,FDEFINELINKID,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID) VALUES ('3O92R3LA0J89','src_project','src_contract','项目启动到签约','{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_project","targetEntity":"src_contract","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','AB56DBC8',{ts'2023-11-02  00:00:00'},1874856739002856448,'3DNB1TJBXL99','0DUM2+6E41IA',{ts'2024-02-01  00:00:00'},'1',1); 


DELETE FROM t_pbd_executetracking WHERE FID = '3ENNCZ4U8YUD';
INSERT INTO t_pbd_executetracking(FID,FCREATETIME,FISENTRYDIM,FMODIFIERID,FENABLE,FBIZAPPID,FMODIFYTIME,FPRESET,FCREATORID,FNAME,FNUMBER) VALUES ('3ENNCZ4U8YUD',{ts'2023-07-17  00:00:00'},'0',1874856739002856448,'1','0DUM2+6E41IA',{ts'2024-02-01  00:00:00'},'1',1,'预置寻源管理单据关系图','BRS-E053CD3C'); 

DELETE FROM t_pbd_trackingentry WHERE FENTRYID = '3TRQRT21PLJK';
INSERT INTO t_pbd_trackingentry(FID,FENTRYID,FSOURCEENTITYID,FSEQ) VALUES ('3ENNCZ4U8YUD','3TRQRT21PLJK','pm_purapplybill',1); 
DELETE FROM t_pbd_trackingentry WHERE FENTRYID = '3TRJCFAKFP+B';
INSERT INTO t_pbd_trackingentry(FID,FENTRYID,FSOURCEENTITYID,FSEQ) VALUES ('3ENNCZ4U8YUD','3TRJCFAKFP+B','src_project',4); 
DELETE FROM t_pbd_trackingentry WHERE FENTRYID = '3TRO477GSSL9';
INSERT INTO t_pbd_trackingentry(FID,FENTRYID,FSOURCEENTITYID,FSEQ) VALUES ('3ENNCZ4U8YUD','3TRO477GSSL9','src_bidpublish',5); 
DELETE FROM t_pbd_trackingentry WHERE FENTRYID = '3TROF6JHA780';
INSERT INTO t_pbd_trackingentry(FID,FENTRYID,FSOURCEENTITYID,FSEQ) VALUES ('3ENNCZ4U8YUD','3TROF6JHA780','src_decision',6); 
DELETE FROM t_pbd_trackingentry WHERE FENTRYID = '3TRJCFAKFP+C';
INSERT INTO t_pbd_trackingentry(FID,FENTRYID,FSOURCEENTITYID,FSEQ) VALUES ('3ENNCZ4U8YUD','3TRJCFAKFP+C','src_contract',7); 
DELETE FROM t_pbd_trackingentry WHERE FENTRYID = '3TS/L6I9MAXA';
INSERT INTO t_pbd_trackingentry(FID,FENTRYID,FSOURCEENTITYID,FSEQ) VALUES ('3ENNCZ4U8YUD','3TS/L6I9MAXA','pm_purorderbill',8); 
DELETE FROM t_pbd_trackingentry WHERE FENTRYID = '3W9MJ1C86R3O';
INSERT INTO t_pbd_trackingentry(FID,FENTRYID,FSOURCEENTITYID,FSEQ) VALUES ('3ENNCZ4U8YUD','3W9MJ1C86R3O','src_apply',2); 
DELETE FROM t_pbd_trackingentry WHERE FENTRYID = '3ENNCZ4U8W4C';
INSERT INTO t_pbd_trackingentry(FID,FENTRYID,FSOURCEENTITYID,FSEQ) VALUES ('3ENNCZ4U8YUD','3ENNCZ4U8W4C','src_demand',3); 

--删除之前预制的分录数据，使用下面最新的
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRJ=TS8R0QC';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRJCFAKDNJ2';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRO1JCH/09V';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRO477GWZIA';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TROF6JH70A+';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRMII+IMIOX';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TROHT7ARU/R';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TROHT7ARU/S';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRQRT21LEMI';
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRQV1T00WNX';


DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3W9MVMT24/HG';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3W9MVMT24/HG','3DNB1TJBXL99','3W9MJ1C86R3O',2,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_apply","targetEntity":"src_project","originLinkFiledKey":"id","targetLinkFiledKey":"srcapply"}','src_project'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3W9MVMT24/HF';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3W9MVMT24/HF','3DNB6+0FIY5L','3W9MJ1C86R3O',1,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillBotpRelationParam","executeSourceEntity":"src_apply","executeTargetEntity":"src_demand"}','src_demand'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3W9Q84HY5WPO';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3W9Q84HY5WPO','3DNB6+0FIY5L','3TRJCFAKFP+C',1,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillBotpRelationParam","executeSourceEntity":"src_contract","executeTargetEntity":"conm_purcontract"}','conm_purcontract'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3W==LTKMLVVT';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3W==LTKMLVVT','3DNB1TJBXL99','3TRJCFAKFP+B',2,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_project","targetEntity":"src_decision","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','src_decision'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRJ=TS8R0QC';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3TRJ=TS8R0QC','3DNB1TJBXL99','3ENNCZ4U8W4C',1,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_demand","targetEntity":"src_project","originLinkFiledKey":"id","targetLinkFiledKey":"source"}','src_project'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRO477GWZIA';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3TRO477GWZIA','3DNB1TJBXL99','3TRO477GSSL9',1,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_bidpublish","targetEntity":"src_decision","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','src_decision'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRQRT21LEMI';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3TRQRT21LEMI','3DNB6+0FIY5L','3TRQRT21PLJK',1,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillBotpRelationParam","executeSourceEntity":"pm_purapplybill","executeTargetEntity":"pm_purorderbill"}','pm_purorderbill'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRQV1T00WNX';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3TRQV1T00WNX','3DNB6+0FIY5L','3TRQRT21PLJK',2,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillBotpRelationParam","executeSourceEntity":"pm_purapplybill","executeTargetEntity":"src_demand"}','src_demand'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRO1JCH/09V';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3TRO1JCH/09V','3DNB1TJBXL99','3TRJCFAKFP+B',1,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_project","targetEntity":"src_bidpublish","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','src_bidpublish'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TRJCFAKDNJ2';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3TRJCFAKDNJ2','3DNB1TJBXL99','3TRJCFAKFP+B',3,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_project","targetEntity":"src_contract","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','src_contract'); 
DELETE FROM t_pbd_trackingdetail WHERE FDETAILID = '3TROF6JH70A+';
INSERT INTO t_pbd_trackingdetail(FDETAILID,FDEFINELINKID,FENTRYID,FSEQ,FEXECUTELINKCONFIG,FTARGETENTITYID) VALUES ('3TROF6JH70A+','3DNB1TJBXL99','3TROF6JHA780',1,'{"@class":"kd.scm.common.helper.businesstracking.domain.BillLinkRelationParam","sourceEntity":"src_decision","targetEntity":"src_contract","originLinkFiledKey":"id","targetLinkFiledKey":"projectf7"}','src_contract'); 


