IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_BANKLOG_H')
 CREATE TABLE T_BEI_BANKLOG_H (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(80) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(5) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FBANKLOGTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FTIME DATETIME,
FACCOUNTBANK VARCHAR(30) DEFAULT ' ' NOT NULL,
FSOURCEBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FEXECUTORID BIGINT DEFAULT 0 NOT NULL,
FISEXCEPTION VARCHAR(30) DEFAULT ' ' NOT NULL,
FSOURCEID VARCHAR(100) DEFAULT ' ' NOT NULL,
FEXCEPTIONMSG NCLOB,
FSENDINFO NCLOB,
FSENDINFO_TAG NCLOB,
FRECEIVEINFO NCLOB,
FRECEIVEINFO_TAG NCLOB,
FSENDEXCEPTIONINFO NCLOB,
FSENDEXCEPTIONINFO_TAG NCLOB,
FRECEIVEEXCEPTIONINFO NCLOB,
FRECEIVEEXCEPTIONINFO_TAG NCLOB,
FBIZEXCEPTIONINFO NCLOB,
FBIZEXCEPTIONINFO_TAG NCLOB,
FBANKINTERFACEID VARCHAR(100) DEFAULT ' ' NOT NULL,
FPAYEEACNT VARCHAR(100) DEFAULT ' ' NOT NULL,
FBANKINTERFACE VARCHAR(100) DEFAULT ' ' NOT NULL,
FSOURCEBILLNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FTRANSTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLEDATE DATETIME,
FDISABLEDATE DATETIME,
FCOMPANYID BIGINT DEFAULT 0 NOT NULL,
FOPENORGID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCOMMENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSRCBIZID BIGINT DEFAULT 0 NOT NULL,
FBANKPAYSTATE VARCHAR(30) DEFAULT ' ' NOT NULL
);


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