-- 电子回单联查方案配置   资金收付单据类型
/**Begin D:\PDM_UPGRADE\PDM1\BEI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_RECEIPTQUERYSCHEME') 
 CREATE TABLE T_BEI_RECEIPTQUERYSCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(30) DEFAULT 'C' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FENABLEDATE DATETIME,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMMENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSOURCEBILLTYPE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBIZAPP NVARCHAR(255) DEFAULT ' ' NOT NULL,
FQUERYFILTER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFILTERCONDITION NVARCHAR(500) DEFAULT ' ' NOT NULL,
FISTOFUNDBILL CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_RECEIPTQUERYSCHEME_L')
 CREATE TABLE T_BEI_RECEIPTQUERYSCHEME_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FCOMMENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_RECEIPTSCHEME_E')
 CREATE TABLE T_BEI_RECEIPTSCHEME_E (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSOURCEBILLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSOURCEBILLAPP NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTARGETBILLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTARGETBILLAPP NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSOURCEQUERYFIELD NVARCHAR(30) DEFAULT ' ' NOT NULL,
FTARGETQUERYFIELD NVARCHAR(30) DEFAULT ' ' NOT NULL,
FQUERYRULE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FLINKNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_FUNDBILLTYPE') 
 CREATE TABLE T_BEI_FUNDBILLTYPE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(30) DEFAULT 'C' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FENABLEDATE DATETIME,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCOMMENT NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_FUNDBILLTYPE_L') 
 CREATE TABLE T_BEI_FUNDBILLTYPE_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FCOMMENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(100) DEFAULT ' ' NOT NULL
);



/**End D:\PDM_UPGRADE\PDM1\BEI_table.sql **/




