--------------------------------------------
----          租赁合同批量保存API          ----
--------------------------------------------

-- 主表
DELETE FROM t_open_apiservice WHERE FID = 1236161240766647296;
INSERT INTO t_open_apiservice(FAPISERVICETYPE,FCUSTOMMETHOD,FOPERATION,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 ('0',' ','batchsave',1236161240766647296,'0','name,createorg,modifytime',' ',{ts'2018-08-08'},'1',NULL,NULL,'fa_lease_contract','0',1236161240766647296,NULL,NULL,'C',' ','fa_lease_contract_batchsave',NULL,NULL,1,' ',{ts'2018-08-08'},'83bfebc800001aac','/sys/fa_lease_contract/batchsave','1',1);

-- 多语言表
DELETE FROM t_open_apiservice_l WHERE FID = 1236161240766647296;
INSERT INTO t_open_apiservice_l
(fpkid, fid, flocaleid, fdiscription, fname)
VALUES('1VUADTEBUG1/', 1236161240766647296, 'zh_CN', '租赁合同批量保存', '租赁合同批量保存');
INSERT INTO t_open_apiservice_l
(fpkid, fid, flocaleid, fdiscription, fname)
VALUES('1VUADTEBUG10', 1236161240766647296, 'zh_TW', '租賃合同批量保存', '租賃合同批量保存');

-- 请求头
DELETE FROM t_open_apiheaderentry WHERE FENTRYID = 1239889899293940736;
INSERT INTO t_open_apiheaderentry(FID,FHEADERNAME,FENTRYID,FSEQ,FHEADERVALUE,FHEADERDES) VALUES (1236161240766647296,'Content-Type',1239889899293940736,1,'application/json','内容格式');
DELETE FROM t_open_apiheaderentry WHERE FENTRYID = 1239889899293940737;
INSERT INTO t_open_apiheaderentry(FID,FHEADERNAME,FENTRYID,FSEQ,FHEADERVALUE,FHEADERDES) VALUES (1236161240766647296,'accesstoken',1239889899293940737,2,'获取的accesstoken值','请求令牌');

-- 请求体
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236161504756141056;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Array',0,'租赁合同集合',' ',1236161504756141056,1,'datas');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236175265671976960;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236163679595039744,'出租方.编码','SUP000001',1236175265671976960,10,'number');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236177488225274880;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236166147104086016,'资产类别.编码','F01',1236177488225274880,12,'number');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236177923568867328;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236166147129251840,'存放地点.编码','101',1236177923568867328,15,'number');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236178285612796928;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236166147137637376,'计量单位.编码','pcs',1236178285612796928,17,'number');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523030714368;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','int',1236166964582321152,'行号','1',1236180523030714368,26,'seq');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523039099904;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Object',1236166964582321152,'付款项目','"rule_payitem":{"number":"pay001"}',1236180523039099904,27,'rule_payitem');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236181262100630528;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236180523039099904,'付款项目.编码','pay001',1236181262100630528,28,'number');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523055880192;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236166964582321152,'频率（每月：A；每两个月：B；每三个月：C；每六个月：D；每十二个月：E；一次性：F）','A',1236180523055880192,29,'frequency');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523064265728;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236166964582321152,'受益期_起','2021-04-01',1236180523064265728,30,'rule_startdate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523072657408;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236166964582321152,'受益期_止','2023-07-31',1236180523072657408,31,'rule_enddate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523081042944;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','int',1236166964582321152,'第几天支付（每个付款频率所对应受益期的第几天支付，可以录入负数）','1',1236180523081042944,32,'relativepaydate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523081046016;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236166964582321152,'发票类型（专用发票：A；普通发票：B）','A',1236180523081046016,33,'rule_invoicetype');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523089431552;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Boolean',1236166964582321152,'可抵扣','true',1236180523089431552,34,'rule_deductible');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523097823232;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'0','Double',1236166964582321152,'税率(%)','5',1236180523097823232,35,'rule_taxrate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523106208768;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Double',1236166964582321152,'含税金额','10000',1236180523106208768,36,'amount');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236180523114600448;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'0','Double',1236166964582321152,'税额','476.19',1236180523114600448,37,'rule_tax');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166964590712832;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'0','Double',1236161504756141056,'年折现率(%)','4.7',1236166964590712832,25,'discountrate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166964582321152;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Array',1236161504756141056,'付款规则分录',' ',1236166964582321152,23,'payruleentryentity');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236163015829654528;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Object',1236161504756141056,'资产组织','"assetunit":{"number":"Org-00027"}',1236163015829654528,3,'assetunit');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236172795830897664;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236163015829654528,'资产组织.编码','Org-00027',1236172795830897664,4,'number');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236163487093263360;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Object',1236161504756141056,'核算组织','"org":{"number":"Org-00027"}',1236163487093263360,5,'org');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236174205804907520;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236163487093263360,'核算组织.编码','Org-00027',1236174205804907520,6,'number');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236163679578262528;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'0','String',1236161504756141056,'合同号，如果没有配置编码规则，调用方必须传入合同号','ZLHT-F01-0001',1236163679578262528,7,'number');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236163679586654208;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236161504756141056,'合同名称','xxx场地租赁合同',1236163679586654208,8,'name');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236163679595039744;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Object',1236161504756141056,'出租方','"leaser":{"number":"SUP000001"}',1236163679595039744,9,'leaser');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166147104086016;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Object',1236161504756141056,'资产类别','"assetcat":{"number":"F01"}',1236166147104086016,11,'assetcat');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166147120860160;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236161504756141056,'资产名称','xxx场地',1236166147120860160,13,'assetname');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166147129251840;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Object',1236161504756141056,'存放地点','"storeplace":{"number":"101"}',1236166147129251840,14,'storeplace');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166147137637376;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Object',1236161504756141056,'计量单位','"unit":{"number":"pcs"}',1236166147137637376,16,'unit');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166964540381184;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','Double',1236161504756141056,'数量','1',1236166964540381184,18,'assetamount');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166964548766720;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'0','String',1236161504756141056,'合同签订日','2021-03-01',1236166964548766720,19,'contrsigndate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166964557158400;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236161504756141056,'起租日','2021-04-01',1236166964557158400,20,'leasestartdate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166964565543936;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'1','String',1236161504756141056,'租赁结束日','2023-07-31',1236166964565543936,21,'leaseenddate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1236166964573935616;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'0','String',1236161504756141056,'免租期开始日','2021-03-01',1236166964573935616,22,'freeleasestartdate');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1239887555298761728;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'0','Long',1236161504756141056,'合同id，填写的话代表是更新合同，新增合同不需要填',' ',1239887555298761728,2,'id');
DELETE FROM t_open_apibodyentry WHERE FENTRYID = 1239888454783949824;
INSERT INTO t_open_apibodyentry(FID,FMUST,FPARAMTYPE,FPARENTENTRYID,FBODYPARAMDES,FEXAMPLE,FENTRYID,FSEQ,FPARAMNAME) VALUES (1236161240766647296,'0','Long',1236166964582321152,'付款规则分录行id，填写的话代表是更新数据，不填的话，会当做新增的一行分录保存',' ',1239888454783949824,24,'id');

-- 返回参数
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236195252184845312;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'data','1','Array',0,1236195252184845312,1,' ',' ');
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236195404203202560;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'dindex','1','int',1236195252184845312,1236195404203202560,2,'0',' ');
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236196990472195072;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'number','1','String',1236195252184845312,1236196990472195072,3,'ZLHT-F01-0001',' ');
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236197113004595200;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'orgnumber','1','String',1236195252184845312,1236197113004595200,4,'Org-00027',' ');
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236197463547743232;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'success','1','Boolean',1236195252184845312,1236197463547743232,5,'true',' ');
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236197600735041536;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'id','1','Long',1236195252184845312,1236197600735041536,6,'1236194235921766400',' ');
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236198250105572352;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'success','1','Boolean',0,1236198250105572352,7,'true',' ');
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236198427524634624;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'errorCode','1','String',0,1236198427524634624,8,'success',' ');
DELETE FROM t_open_apirespentry WHERE FENTRYID = 1236198526526983168;
INSERT INTO t_open_apirespentry(FID,FRESPPARAMNAME,FRESPPARAMMUST,FRESPPARAMTYPE,FPARENTENTRYID,FENTRYID,FSEQ,FRESPEXAMPLE,FRESPDES) VALUES (1236161240766647296,'message','1','String',0,1236198526526983168,9,' ',' ');