-- 协作活动模板预置数据

DELETE FROM t_hpdi_payrollactgtpl WHERE FID = 1010;
-- INSERT INTO t_hpdi_payrollactgtpl(FID,FALIAS,FISSYSPRESET,FDISABLEDATE,FSIMPLENAME,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FINDEX,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FCREATORID,FDISABLERID) VALUES (1010,'入职模板','1',NULL,' ',' ',1010,'C','1010_S','入职模板',0,{ts'2020-05-01  00:00:00'},1158705950345960448,'1',{ts'2021-07-09  00:00:00'},1,0); 
DELETE FROM t_hpdi_payrollactgtpl WHERE FID = 1196229581254727680;
-- INSERT INTO t_hpdi_payrollactgtpl(FID,FALIAS,FISSYSPRESET,FDISABLEDATE,FSIMPLENAME,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FINDEX,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FCREATORID,FDISABLERID) VALUES (1196229581254727680,'离职模板','1',NULL,' ',' ',1196229581254727680,'C','1020_S','离职模板',0,{ts'2021-07-09  00:00:00'},1150721201652407296,'1',{ts'2022-02-19  00:00:00'},1158705950345960448,0); 

DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '0R9UY3SYUZ72';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1010,'入职模板','0R9UY3SYUZ72','zh_CN',' ',' ','入职模板'); 
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '0R9UY3SYUZ73';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1010,'入職模板','0R9UY3SYUZ73','zh_TW',' ',' ','入職模板'); 
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '1QY/BGY4YH6Q';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1196229581254727680,'离职模板','1QY/BGY4YH6Q','zh_CN',' ',' ','离职模板'); 
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '1QY/BGY4YH6R';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1196229581254727680,'離職模板','1QY/BGY4YH6R','zh_TW',' ',' ','離職模板'); 


DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 881641583504668672;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1010,'1',881641583504668672,1,1,1010); 
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 1196229581254727681;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1196229581254727680,'1',1196229581254727681,1,1,1010); 
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 881641583504668674;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1010,'0',881641583504668674,2,2,1194240056647333888); 
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 1196229581254727682;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1196229581254727680,' ',1196229581254727682,2,2,1194240056647333888); 



-- 2022-4-7新增协作活动模板


DELETE FROM t_hpdi_payrollactgtpl WHERE FID = 1010;
INSERT INTO t_hpdi_payrollactgtpl(FID,FALIAS,FISSYSPRESET,FDISABLEDATE,FSIMPLENAME,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FINDEX,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FCREATORID,FDISABLERID) VALUES (1010,'人员协作模板','1',NULL,' ','用于员工发生入职、转正、调动、外派、兼职、离职后，需要同步计薪人员、维护人员薪资档案等协作场景',1010,'C','1010_S','人员协作模板',0,{ts'2020-05-01  00:00:00'},1158705950345960448,'1',{ts'2021-07-09  00:00:00'},1,0);

DELETE FROM t_hpdi_payrollactgtpl WHERE FID = 1196229581254727680;
-- INSERT INTO t_hpdi_payrollactgtpl(FID,FALIAS,FISSYSPRESET,FDISABLEDATE,FSIMPLENAME,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FINDEX,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FCREATORID,FDISABLERID) VALUES (1196229581254727680,'离职模板','1',NULL,' ',' ',1196229581254727680,'C','1040_S','离职模板',0,{ts'2021-07-09  00:00:00'},1150721201652407296,'1',{ts'2022-02-19  00:00:00'},1158705950345960448,0);
DELETE FROM t_hpdi_payrollactgtpl WHERE FID = 1393448912555172864;
-- INSERT INTO t_hpdi_payrollactgtpl(FID,FALIAS,FISSYSPRESET,FDISABLEDATE,FSIMPLENAME,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FINDEX,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FCREATORID,FDISABLERID) VALUES (1393448912555172864,'转正模板','1',NULL,' ',' ',1393448912555172864,'C','1020_S','转正模板',0,{ts'2022-04-07  00:00:00'},1150721201652407296,'1',{ts'2022-04-07  00:00:00'},1150721201652407296,0);
DELETE FROM t_hpdi_payrollactgtpl WHERE FID = 1393449246958748672;
-- INSERT INTO t_hpdi_payrollactgtpl(FID,FALIAS,FISSYSPRESET,FDISABLEDATE,FSIMPLENAME,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FINDEX,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FCREATORID,FDISABLERID) VALUES (1393449246958748672,'调动模板','1',NULL,' ',' ',1393449246958748672,'C','1030_S','调动模板',0,{ts'2022-04-07  00:00:00'},1150721201652407296,'1',{ts'2022-04-07  00:00:00'},1150721201652407296,0);


DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '0R9UY3SYUZ72';
INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1010,'人员协作模板','0R9UY3SYUZ72','zh_CN',' ',' ','人员协作模板');
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '0R9UY3SYUZ73';
--INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1010,'人员协作模板','0R9UY3SYUZ73','zh_TW',' ',' ','人员协作模板');

DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '1QY/BGY4YH6Q';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1196229581254727680,'离职模板','1QY/BGY4YH6Q','zh_CN',' ',' ','离职模板');
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '1QY/BGY4YH6R';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1196229581254727680,'離職模板','1QY/BGY4YH6R','zh_TW',' ',' ','離職模板');
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '2C4VYCWR4FUE';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1393448912555172864,'转正模板','2C4VYCWR4FUE','zh_CN',' ',' ','转正模板');
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '2C4VYCWR4FUF';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1393448912555172864,'轉正模板','2C4VYCWR4FUF','zh_TW',' ',' ','轉正模板');
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '2C4W+TXJEIXR';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1393449246958748672,'调动模板','2C4W+TXJEIXR','zh_CN',' ',' ','调动模板');
DELETE FROM t_hpdi_payrollactgtpl_l WHERE FPKID = '2C4W+TXJEIXS';
-- INSERT INTO t_hpdi_payrollactgtpl_l(FID,FALIAS,FPKID,FLOCALEID,FSIMPLENAME,FDESCRIPTION,FNAME) VALUES (1393449246958748672,'調動模板','2C4W+TXJEIXS','zh_TW',' ',' ','調動模板');


DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 881641583504668672;
INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1010,'1',881641583504668672,1,1,1010);
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 881641583504668674;
INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1010,'0',881641583504668674,2,2,1194240056647333888);

DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 1196229581254727681;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1196229581254727680,'1',1196229581254727681,1,1,1010);
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 1196229581254727682;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1196229581254727680,' ',1196229581254727682,2,2,1194240056647333888);
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 1393448912605504512;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1393448912555172864,'1',1393448912605504512,1,1,1010);
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 1393448912605504513;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1393448912555172864,' ',1393448912605504513,2,2,1194240056647333888);
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 1393449246958748673;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1393449246958748672,'1',1393449246958748673,1,1,1010);
DELETE FROM t_hpdi_payrollactgtplent WHERE FENTRYID = 1393449246958748674;
-- INSERT INTO t_hpdi_payrollactgtplent(FID,FISMUSTEXECUTE,FENTRYID,FSEQ,FEXECUTESEQ,FPAYROLLACTID) VALUES (1393449246958748672,' ',1393449246958748674,2,2,1194240056647333888);

-- 更新协作规则旧数据的模板为1010
update t_hpdi_payrollactg t set fpayrollactgtplid  = 1010 where t.fpayrollactgtplid in (1196229581254727680,1393448912555172864,1393449246958748672);
