/* 费用预提单  单据类型  start */
DELETE FROM T_BAS_BILLTYPE WHERE FID = 1115210418617662464;
INSERT INTO T_BAS_BILLTYPE(FID,FISSYSPRESET,FDOCUMENTSTATUS,FDEFWNREPORTTEMPLATE,FISDEFAULT,FDEFPRINTTEMPLATE,FCONTROLPRINTCOUNT,FMASTERID,FSTATUS,FBILLFORMID,FMAXPRINTCOUNT,FBILLCODERULEID,FBILLINITSETTING,FNUMBER,FCREATETIME,FLAYOUTSOLUTION,FPARASETTINGXML,FMODIFIERID,FENABLE,FMODIFYTIME,FPRINTAFTERAUDIT,FCREATORID) VALUES (1115210418617662464,'0','0',NULL,'1',' ','0',1115210418617662464,'C','er_withholdingbill',1,' ',' ','er_withholdingbill_BT_S',{ts'2018-08-08 18:08:08'},'18YFYCMXCXDX',NULL,1,'1',{ts'2018-08-08 18:08:08'},'0',1);

DELETE FROM T_BAS_BILLTYPE WHERE FID = 1115211290990826496;
INSERT INTO T_BAS_BILLTYPE(FID,FISSYSPRESET,FDOCUMENTSTATUS,FDEFWNREPORTTEMPLATE,FISDEFAULT,FDEFPRINTTEMPLATE,FCONTROLPRINTCOUNT,FMASTERID,FSTATUS,FBILLFORMID,FMAXPRINTCOUNT,FBILLCODERULEID,FBILLINITSETTING,FNUMBER,FCREATETIME,FLAYOUTSOLUTION,FPARASETTINGXML,FMODIFIERID,FENABLE,FMODIFYTIME,FPRINTAFTERAUDIT,FCREATORID) VALUES (1115211290990826496,'0','0',NULL,'0',' ','0',1115211290990826496,'C','er_withholdingbill',1,' ',' ','er_withholdingbill_BT_S1',{ts'2018-08-08 18:08:08'},'1I4FITD1G=T1',NULL,1073721412688433152,'1',{ts'2018-08-08 18:08:08'},'0',1);

/* 单据类型 多语言 */
DELETE FROM T_BAS_BILLTYPE_L WHERE FPKID = '1GZV981JHQMF';
INSERT INTO T_BAS_BILLTYPE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1115210418617662464,'1GZV981JHQMF','zh_CN','费用预提','费用预提');
DELETE FROM T_BAS_BILLTYPE_L WHERE FPKID = '1GZV981JHQMG';
INSERT INTO T_BAS_BILLTYPE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1115210418617662464,'1GZV981JHQMG','zh_TW','費用預提','費用預提');

DELETE FROM T_BAS_BILLTYPE_L WHERE FPKID = '1GZVEL+0H1/Z';
INSERT INTO T_BAS_BILLTYPE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1115211290990826496,'1GZVEL+0H1/Z','zh_CN','冲销预提','冲销预提');
DELETE FROM T_BAS_BILLTYPE_L WHERE FPKID = '1GZVEL+0H1/Y';
INSERT INTO T_BAS_BILLTYPE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1115211290990826496,'1GZVEL+0H1/Y','zh_TW','衝銷預提','衝銷預提');

/* 费用预提单  单据类型  end */


/* 费用预提单 费用类型  start */
DELETE FROM t_er_billtype WHERE FID = 1115216212251429888;
INSERT INTO T_ER_BILLTYPE (FID, FSTATUS, FNUMBER, FCREATORID, FCREATETIME, FENABLE, FCREATEORGID, FORGID, FMODIFIERID, FMODIFYTIME, FCTRLSTRATEGY, FMASTERID, FBILLNUMBER, FISPRESET, FNAME) VALUES(1115216212251429888, 'C', 'er_withholdingbill', 1, TIMESTAMP '2018-08-08 18:08:08', '1', 0, 0, 13466739, TIMESTAMP '2018-08-08 18:08:08', ' ', 1115216212251429888, 'er_withholdingbill', '1', '费用预提单');

/* 费用预提单 费用类型 多语言 */
DELETE FROM t_er_billtype_l WHERE FPKID = '1GZWBFKD9GRH';
INSERT INTO t_er_billtype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1115216212251429888,'1GZWBFKD9GRH','zh_CN','费用预提单');
/* 费用预提单 费用类型  end */


/* 费用预提单 编号规则 规则分录 end */

/*   ------------------------------------------------------------ */

/* 编号规则 start */
/* 费用预提 */
DELETE FROM t_cr_coderule WHERE FID = '1HVGH6=N=/I=';
INSERT INTO t_cr_coderule(FEXAMPLE,FAPPMODE,FISADDVIEW,FISAPPCONDITION,FMASTERID,FISUNIQUE,FRULETYPE,FISMODIFIABLE,FCREATETIME,FBIZOBJECTID,FENABLE,FISUPDATERECOVER,FISAPPORG,FISSERIALNUMBER,FDISABLERID,FISCHECKCODE,FID,FSPLITSIGN,FCTRLMODE,FDISABLEDATE,FISLOG,FSTATUS,FNUMBER,FEXAMPLELENGTH,FISFAST,FMODIFIERID,FISNONBREAK,FMODIFYTIME,FCREATORID) VALUES (' ','2','1','1','1HVGH6=N=/I=','0',NULL,'0',{ts'2018-08-08 18:08:08'},'er_withholdingbill','1','0','0','1',NULL,'0','1HVGH6=N=/I=','-','1',NULL,'0','C','1HVGEZNJU4BB',' ','0',0,'0',{ts'2018-08-08 18:08:08'},0);

/* 冲销预提 */
DELETE FROM t_cr_coderule WHERE FID = '1HVGLIYYW5XM';
INSERT INTO t_cr_coderule(FEXAMPLE,FAPPMODE,FISADDVIEW,FISAPPCONDITION,FMASTERID,FISUNIQUE,FRULETYPE,FISMODIFIABLE,FCREATETIME,FBIZOBJECTID,FENABLE,FISUPDATERECOVER,FISAPPORG,FISSERIALNUMBER,FDISABLERID,FISCHECKCODE,FID,FSPLITSIGN,FCTRLMODE,FDISABLEDATE,FISLOG,FSTATUS,FNUMBER,FEXAMPLELENGTH,FISFAST,FMODIFIERID,FISNONBREAK,FMODIFYTIME,FCREATORID) VALUES (' ','2','1','1','1HVGLIYYW5XM','0',NULL,'0',{ts'2018-08-08 18:08:08'},'er_withholdingbill','1','0','0','1',NULL,'0','1HVGLIYYW5XM','-','1',NULL,'0','C','1HVGJ5ARZF4J',' ','0',0,'0',{ts'2018-08-08 18:08:08'},0);

/* 编号规则 end */

/* 编号规则 多语言 start */
DELETE FROM t_cr_coderule_l WHERE FPKID = '1HVGH6=QXG1A';
INSERT INTO t_cr_coderule_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1HVGH6=N=/I=','1HVGH6=QXG1A','zh_CN','费用预提');

DELETE FROM t_cr_coderule_l WHERE FPKID = '1HVGLIYYW795';
INSERT INTO t_cr_coderule_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1HVGLIYYW5XM','1HVGLIYYW795','zh_CN','冲销预提');
DELETE FROM t_cr_coderule_l WHERE FPKID = '1HVGLIYYW794';
INSERT INTO t_cr_coderule_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1HVGLIYYW5XM','1HVGLIYYW794','zh_TW','衝銷預提');

/* 编号规则 多语言 end */

/* 编号规则 分录（实际规则） start */
DELETE FROM T_CR_CODERULEENTRY WHERE FENTRYID = '1HVGH6A3E2GV';
INSERT INTO T_CR_CODERULEENTRY(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1HVGH6=N=/I=',1,'1',' ','0','1HVGH6A3E2GV',1,'1','1',0,8,'1','FYYT',' ','1',' ','0',' ');
DELETE FROM T_CR_CODERULEENTRY WHERE FENTRYID = '1HVGH6A3E2GW';
INSERT INTO T_CR_CODERULEENTRY(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1HVGH6=N=/I=',1,'9','-','0','1HVGH6A3E2GW',1,'1',' ',1,8,'1','yyyyMMdd',' ','1',' ','1',' ');
DELETE FROM T_CR_CODERULEENTRY WHERE FENTRYID = '1HVGH6A3E2GX';
INSERT INTO T_CR_CODERULEENTRY(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1HVGH6=N=/I=',1,'16','-','0','1HVGH6A3E2GX',1,'1',' ',2,6,'1',' ',' ','1',' ','1',' ');

DELETE FROM T_CR_CODERULEENTRY WHERE FENTRYID = '1HVGLIZE/8W6';
INSERT INTO T_CR_CODERULEENTRY(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1HVGLIYYW5XM',1,'1',' ','0','1HVGLIZE/8W6',1,'1','1',0,8,'1','CXYT',' ','1',' ','0',' ');
DELETE FROM T_CR_CODERULEENTRY WHERE FENTRYID = '1HVGLIZE/8W7';
INSERT INTO T_CR_CODERULEENTRY(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1HVGLIYYW5XM',1,'9','-','0','1HVGLIZE/8W7',1,'1',' ',1,8,'1','yyyyMMdd',' ','1',' ','1',' ');
DELETE FROM T_CR_CODERULEENTRY WHERE FENTRYID = '1HVGLIZE/8W8';
INSERT INTO T_CR_CODERULEENTRY(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1HVGLIYYW5XM',1,'16','-','0','1HVGLIZE/8W8',1,'1',' ',2,6,'1',' ',' ','1',' ','1',' ');

/* 编号规则 分录（实际规则） end */

/* 编号规则 适用条件属性 start */
DELETE FROM T_CR_APPCONDPRO WHERE FID = '1HUQTZJ03705';
INSERT INTO T_CR_APPCONDPRO(FID,FBIZOBJECTID,FNUMBER) VALUES ('1HUQTZJ03705','er_withholdingbill','iswriteoff');
/* 编号规则 适用条件属性 end */

/* 编号规则  适用条件属性 多语言 start*/
DELETE FROM T_CR_APPCONDPRO_L WHERE FPKID = '1HUQTZJ038CO';
INSERT INTO T_CR_APPCONDPRO_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('1HUQTZJ03705','1HUQTZJ038CO','zh_CN','是否冲销','是否冲销');
DELETE FROM T_CR_APPCONDPRO_L WHERE FPKID = '1HUQTZJ038CP';
INSERT INTO T_CR_APPCONDPRO_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('1HUQTZJ03705','1HUQTZJ038CP','zh_TW','是否衝銷','是否衝銷');
/* 编号规则  适用属性 多语言 end*/

/* 编号规则 适用条件属性值 start */
DELETE FROM t_cr_appcondprovalue WHERE FID = '1HVGEG6WE4EQ';
INSERT INTO t_cr_appcondprovalue(FID,FAPPCONDPROID,FVALUE) VALUES ('1HVGEG6WE4EQ','1HUQTZJ03705','false');
DELETE FROM t_cr_appcondprovalue WHERE FID = '1HVGD669=AXR';
INSERT INTO t_cr_appcondprovalue(FID,FAPPCONDPROID,FVALUE) VALUES ('1HVGD669=AXR','1HUQTZJ03705','true');
/* 编号规则 适用条件属性值 end */

/* 编号规则 适用条件属性值 多语言 start */
DELETE FROM T_CR_APPCONDPROVALUE_L WHERE FPKID = '1HVGEG6WE5S8';
INSERT INTO T_CR_APPCONDPROVALUE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('1HVGEG6WE4EQ','1HVGEG6WE5S8','zh_CN',' ','否');
DELETE FROM T_CR_APPCONDPROVALUE_L WHERE FPKID = '1HVGEG6WE5S9';
INSERT INTO T_CR_APPCONDPROVALUE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('1HVGEG6WE4EQ','1HVGEG6WE5S9','zh_TW',' ','否');

DELETE FROM T_CR_APPCONDPROVALUE_L WHERE FPKID = '1HVGD669=C99';
INSERT INTO T_CR_APPCONDPROVALUE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('1HVGD669=AXR','1HVGD669=C99','zh_CN',' ','是');
DELETE FROM T_CR_APPCONDPROVALUE_L WHERE FPKID = '1HVGD669=C9=';
INSERT INTO T_CR_APPCONDPROVALUE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('1HVGD669=AXR','1HVGD669=C9=','zh_TW',' ','是');

/* 编号规则 适用条件属性值 多语言 end */

/* 编号规则 适用条件属性 基础资料 start */
DELETE FROM T_CR_AppCondition WHERE FENTRYID = '1HVGHM+CW/40';
INSERT INTO T_CR_AppCondition(FID,FPROPERTY,FENTRYID,FSEQ,FPROPERTYVALUE) VALUES ('1HVGH6=N=/I=','1HUQTZJ03705','1HVGHM+CW/40',1,'1HVGEG6WE4EQ');

DELETE FROM T_CR_AppCondition WHERE FENTRYID = '1HVGLZW8YYC6';
INSERT INTO T_CR_AppCondition(FID,FPROPERTY,FENTRYID,FSEQ,FPROPERTYVALUE) VALUES ('1HVGLIYYW5XM','1HUQTZJ03705','1HVGLZW8YYC6',1,'1HVGD669=AXR');
/* 编号规则 适用条件属性 基础资料 end */


/* 特殊数据权限 */
DELETE FROM t_perm_operationrule WHERE FID = '1I4=DQUM/3JQ';
INSERT INTO t_perm_operationrule(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('1I4=DQUM/3JQ','view','{"filterRow":[{"id":"1I4=C+7EB3PP","leftBracket":"","compareType":"103","fieldName":"creator.number","rightBracket":"","logic":"1","value":[{"id":"1I4=C+7EBA3I","value":""}],"baseDataIds":[]},{"id":"1I4=C+7HZIX7","leftBracket":"","compareType":"103","fieldName":"applier.number","rightBracket":"","logic":"0","value":[{"id":"1I4=C+7HZQA0","value":""}],"baseDataIds":[]}],"forList":false}','1','view','0','1GARA29DA8+R',' ','0','er_withholdingbill','查询本人数据');
DELETE FROM t_perm_operationrule_l WHERE FPKID = '1I4=DQUM/=ZJ';
INSERT INTO t_perm_operationrule_l(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('1I4=DQUM/3JQ','1I4=DQUM/=ZJ','zh_CN',' ','查询本人数据');

DELETE FROM t_perm_operationruleobj WHERE FID = '1I4=E38JQJV7';
INSERT INTO t_perm_operationruleobj(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('1I4=E38JQJV7','1I4=DQUM/3JQ','1GARA29DA8+R',0,'1','er_withholdingbill');
