/*预置小K第一个接口 查询待报销的出差申请单*/
DELETE FROM T_OPEN_APISERVICE WHERE FID = 870247854222947328;
INSERT INTO T_OPEN_APISERVICE(FAPISERVICETYPE,FCUSTOMMETHOD,FOPERATION,FISKSQL,FMASTERID,FCONTENTTYPE,FSELECTPARAM,FMUSTPARAM,FCREATETIME,FENABLE,FREQTYPE,FDISABLERID,FBIZOBJECT,FALLOWGUEST,FID,FDISABLEDATE,FURL,FSTATUS,FFILTERPARAM,FNUMBER,FREPTYPE,FMESSAGETYPE,FMODIFIERID,FPLUGIN,FMODIFYTIME,FAPPID,FURLFORMAT,FHTTPMETHOD,FCREATORID) VALUES ('1',' ',' ','0',870247854222947328,'0',' ',' ',{ts'2018-08-08 18:08:08'},'1',0,NULL,' ','0',870247854222947328,NULL,' ','C',' ','AIGetTripReqBillBySingleTrip',0,NULL,1,'[{"FPK":"","Type":0,"Description":"查询待报销的出差申请单","RowKey":0,"ClassName":"kd.fi.er.business.ai.AIGetTripReqBillBySingleTripApiPlugin","DisplayName":"查询待报销的出差申请单","Enabled":true,"BizAppId":"","Inherit":false}]',{ts'2018-08-08 18:08:08'},'10MYBGBYHXDU','/ai/do','1',1);
DELETE FROM T_OPEN_APISERVICE_L WHERE FID = 870247854222947328;
INSERT INTO T_OPEN_APISERVICE_L (FPKID, FID, FLOCALEID, FDISCRIPTION, FNAME) VALUES ('0PW917BC3TEQ', 870247854222947328, 'zh_CN', '获取个人的满足下推差旅报销单条件的出差申请单', '费用-获取待报销出差申请单（预置）');
INSERT INTO T_OPEN_APISERVICE_L (FPKID, FID, FLOCALEID, FDISCRIPTION, FNAME) VALUES ('0PW917BC3TER', 870247854222947328, 'zh_TW', '獲取個人的滿足下推差旅報銷單條件的出差申請單', '費用-獲取待報銷出差申請單（預置）');
DELETE FROM t_open_apiservice_aicmd WHERE FENTRYID = 870247854432662528;
INSERT INTO t_open_apiservice_aicmd(FID,FAINUMBER,FENTRYID,FSEQ) VALUES (870247854222947328,'AIGetTripReqBillBySingleTrip',870247854432662528,1);
DELETE FROM T_OPEN_APISERVICE_AICMD_L where FENTRYID = 870247854432662528;
INSERT INTO T_OPEN_APISERVICE_AICMD_L (FPKID, FENTRYID, FLOCALEID, FAINAME, FAIDESCRIPTION) VALUES ('0PW917BC3TES', 870247854432662528, 'zh_CN', '查询待报销的出差申请单', '查询满足下推条件的出差申请单');
INSERT INTO T_OPEN_APISERVICE_AICMD_L (FPKID, FENTRYID, FLOCALEID, FAINAME, FAIDESCRIPTION) VALUES ('0PW917BC3TET', 870247854432662528, 'zh_TW', '查询待报销出的差申请单', '查询满足下推条件的出差申请单');
/*预置小K第二个接口 出差申请单下推生成差旅报销单*/
DELETE FROM T_OPEN_APISERVICE WHERE FID = 1286063132963247104;
INSERT INTO T_OPEN_APISERVICE(FAPISERVICETYPE,FCUSTOMMETHOD,FOPERATION,FISKSQL,FMASTERID,FCONTENTTYPE,FSELECTPARAM,FMUSTPARAM,FCREATETIME,FENABLE,FREQTYPE,FDISABLERID,FBIZOBJECT,FALLOWGUEST,FID,FDISABLEDATE,FURL,FSTATUS,FFILTERPARAM,FNUMBER,FREPTYPE,FMESSAGETYPE,FMODIFIERID,FPLUGIN,FMODIFYTIME,FAPPID,FURLFORMAT,FHTTPMETHOD,FCREATORID) VALUES ('1',' ',' ','0',1286063132963247104,'0',NULL,NULL,{ts'2018-08-08  00:00:00'},'1',0,NULL,' ','0',1286063132963247104,NULL,' ','C',NULL,'AICreateTripReimburse',0,NULL,1,'[{"FPK":"","Type":0,"Description":"出差申请下推差旅报销单","RowKey":0,"ClassName":"kd.fi.er.business.ai.AICreateTripReimburseApiPlugin","DisplayName":"AICreateTripReimburseApiPlugin","Enabled":true,"BizAppId":"","Inherit":false}]',{ts'2018-08-08 18:08:08'},'10MYBGBYHXDU','/ai/do','1',1);
DELETE FROM T_OPEN_APISERVICE_L WHERE FID = 1286063132963247104;
INSERT INTO T_OPEN_APISERVICE_L (FPKID, FID, FLOCALEID, FDISCRIPTION, FNAME) VALUES ('2/ZDC0MM81N5', 1286063132963247104, 'zh_CN', ' ', '费用-出差申请下推差旅报销单（预置）');
INSERT INTO T_OPEN_APISERVICE_L (FPKID, FID, FLOCALEID, FDISCRIPTION, FNAME) VALUES ('2/ZDC0MM81N6', 1286063132963247104, 'zh_TW', ' ', '費用-出差申請下推差旅報銷單（預置）');
DELETE FROM t_open_apiservice_aicmd WHERE FENTRYID = 1286063133063910400;
INSERT INTO t_open_apiservice_aicmd(FID,FAINUMBER,FENTRYID,FSEQ) VALUES (1286063132963247104,'AICreateTripReimburse',1286063133063910400,1);
DELETE FROM T_OPEN_APISERVICE_AICMD_L where FENTRYID = 1286063133063910400;
INSERT INTO T_OPEN_APISERVICE_AICMD_L (FPKID, FENTRYID, FLOCALEID, FAINAME, FAIDESCRIPTION) VALUES ('2/ZDC0MM81N8', 1286063133063910400, 'zh_CN', '出差申请下推差旅报销单', '出差申请下推差旅报销单');
INSERT INTO T_OPEN_APISERVICE_AICMD_L (FPKID, FENTRYID, FLOCALEID, FAINAME, FAIDESCRIPTION) VALUES ('2/ZDC0MM81N9', 1286063133063910400, 'zh_TW', '出差申請下推差旅報銷單', '出差申請下推差旅報銷單');
/*预置小K第三个接口 差旅报销单导入发票*/
DELETE FROM T_OPEN_APISERVICE WHERE FID = 1315351747291764736;
INSERT INTO T_OPEN_APISERVICE(FAPISERVICETYPE,FCUSTOMMETHOD,FOPERATION,FISKSQL,FMASTERID,FCONTENTTYPE,FSELECTPARAM,FMUSTPARAM,FCREATETIME,FENABLE,FREQTYPE,FDISABLERID,FBIZOBJECT,FALLOWGUEST,FID,FDISABLEDATE,FURL,FSTATUS,FFILTERPARAM,FNUMBER,FREPTYPE,FMESSAGETYPE,FMODIFIERID,FPLUGIN,FMODIFYTIME,FAPPID,FURLFORMAT,FHTTPMETHOD,FCREATORID) VALUES ('1',' ',' ','0',1315351747291764736,'0',NULL,NULL,{ts'2018-08-08  00:00:00'},'1',0,NULL,' ','0',1315351747291764736,NULL,' ','C',NULL,'AITripReimImportInvoice',0,NULL,1,'[{"FPK":"","Type":0,"Description":"差旅报销导入发票","RowKey":0,"ClassName":"kd.fi.er.business.ai.AITripReimImportInvoiceApiPlugin","DisplayName":"差旅报销导入发票","Enabled":true,"BizAppId":"","Inherit":false}]',{ts'2018-08-08  00:00:00'},'10MYBGBYHXDU','/ai/do','1',1);
DELETE FROM T_OPEN_APISERVICE_L WHERE FID = 1315351747291764736;
INSERT INTO T_OPEN_APISERVICE_L (FPKID, FID, FLOCALEID, FDISCRIPTION, FNAME) VALUES ('23JPTP/SP4SH', 1315351747291764736, 'zh_CN', '根据发票流水号自动生成明细', '费用-差旅报销单导入发票（预置）');
INSERT INTO T_OPEN_APISERVICE_L (FPKID, FID, FLOCALEID, FDISCRIPTION, FNAME) VALUES ('23JPTP/SP4SI', 1315351747291764736, 'zh_TW', '根據發票流水號自動生成明細', '費用-差旅報銷單導入發票（預置）');
DELETE FROM t_open_apiservice_aicmd WHERE FENTRYID = 1315360654718177280;
INSERT INTO t_open_apiservice_aicmd(FID,FAINUMBER,FENTRYID,FSEQ) VALUES (1315351747291764736,'AITripReimImportInvoice',1315360654718177280,1);
DELETE FROM T_OPEN_APISERVICE_AICMD_L where FENTRYID = 1315360654718177280;
INSERT INTO T_OPEN_APISERVICE_AICMD_L (FPKID, FENTRYID, FLOCALEID, FAINAME, FAIDESCRIPTION) VALUES ('23JRGKO7WW5=', 1315360654718177280, 'zh_CN', '差旅报销单导入发票', '导入发票后生成明细');
INSERT INTO T_OPEN_APISERVICE_AICMD_L (FPKID, FENTRYID, FLOCALEID, FAINAME, FAIDESCRIPTION) VALUES ('23JRGKO7WW5A', 1315360654718177280, 'zh_TW', '差旅報銷單導入發票', '导入发票后生成明细');

/*修改预置API的sql*/
update T_OPEN_APISERVICE set FPLUGIN='[{"Type":0,"_Type_":"Plugin","RowKey":1,"ClassName":"kd.fi.er.business.ai.GetTripStdByTypeApiPlugin","Enabled":true,"rowKey":null}]' where fid='861474585680422912';
update T_OPEN_APISERVICE set FPLUGIN='[{"Type":0,"_Type_":"Plugin","RowKey":1,"ClassName":"kd.fi.er.business.ai.GetTripStdTypeApiPlugin","Enabled":true,"rowKey":null}]' where fid='861471923387791360';
update T_OPEN_APISERVICE set FPLUGIN='[{"Type":0,"_Type_":"Plugin","ClassName":"kd.fi.er.business.ai.TripReqBillSaveApiPlugin","Enabled":true,"rowKey":null}]' where fid='494078627621655552';
update T_OPEN_APISERVICE set FPLUGIN='[{"Type":0,"_Type_":"Plugin","ClassName":"kd.fi.er.business.ai.TripReqBillSubmitApiPlugin","Enabled":true,"rowKey":null}]' where fid='494079768572997632';
update T_OPEN_APISERVICE set FPLUGIN='[{"Type":0,"_Type_":"Plugin","ClassName":"kd.fi.er.business.ai.TripTypeGetApiPlugin","Enabled":true,"rowKey":null}]' where fid='621448264989815808';

/*预置小K第四个接口 差旅报销单提交*/

delete from T_OPEN_APISERVICE where fid = 1320225734102366208;
delete from T_OPEN_APISERVICE_l where fid = 1320225734102366208;
delete from t_open_apiservice_aicmd where fid = 1320225734102366208;
delete from T_OPEN_APISERVICE_AICMD_L where fentryid = 1320225734144309248;
INSERT INTO t_open_apiservice (fid, fnumber, fcreatorid, fcreatetime, fmodifierid, fmodifytime, fenable, fdisablerid, fdisabledate, fmessagetype, fbizobject, fappid, fstatus, furlformat, furl, fhttpmethod, fcontenttype, freqtype, freptype, fplugin, fapiservicetype, foperation, fcustommethod, fmasterid, fallowguest, fisksql, fselectparam, ffilterparam, fmustparam) VALUES (1320225734102366208, 'AITripSubmit', 1, {ts'2021-12-27 13:26:46'}, 1, {ts'2021-12-27 13:32:51'}, '1', null, null, null, ' ', '10MYBGBYHXDU', 'C', '/ai/do', ' ', '1', '0', 0, 0, '[{"FPK":"","Type":0,"Description":"差旅报销单提交","RowKey":0,"ClassName":"kd.fi.er.business.ai.AITripReimburseSubmitApiPlugin","DisplayName":"差旅报销单提交","Enabled":true,"BizAppId":"","Inherit":false}]', '1', ' ', ' ', 1320225734102366208, '0', '0', ' ', ' ', ' ');
INSERT INTO t_open_apiservice_l (fpkid, fid, flocaleid, fname, fdiscription) VALUES ('2451HAYXUL7=', 1320225734102366208, 'zh_CN', '费用-差旅报销单提交（预置）', ' ');
INSERT INTO t_open_apiservice_l (fpkid, fid, flocaleid, fname, fdiscription) VALUES ('2451HAYXUL7A', 1320225734102366208, 'zh_TW', '費用-差旅報銷單提交（預置）', ' ');
INSERT INTO t_open_apiservice_aicmd (fid, fentryid, fseq, fainumber) VALUES (1320225734102366208, 1320225734144309248, 1, 'AITripSubmit');
INSERT INTO t_open_apiservice_aicmd_l (fpkid, fentryid, flocaleid, fainame, faidescription) VALUES ('2451HAYXUL7B', 1320225734144309248, 'zh_CN', '差旅报销单提交', '差旅报销单提交');
INSERT INTO t_open_apiservice_aicmd_l (fpkid, fentryid, flocaleid, fainame, faidescription) VALUES ('2451HAYXUL7C', 1320225734144309248, 'zh_TW', '差旅報銷單提交', '差旅報銷單提交');
