/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_POLICY' AND KSQL_COL_NAME ='FFZJGFTBL') 
 ALTER TABLE T_TCCIT_POLICY ADD (FFZJGFTBL DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_POLICY' AND KSQL_COL_NAME ='FZJGFTBL') 
 ALTER TABLE T_TCCIT_POLICY ADD (FZJGFTBL DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_POLICY' AND KSQL_COL_NAME ='FCZJZFPBL') 
 ALTER TABLE T_TCCIT_POLICY ADD (FCZJZFPBL DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_RULE_ACCHILD') 
 CREATE TABLE T_TCCIT_RULE_ACCHILD (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FCHILDID BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_RULE_YJCHILD') 
 CREATE TABLE T_TCCIT_RULE_YJCHILD (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FCHILDID BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_YJ_ASSETS_ACCDET') 
 CREATE TABLE T_TCCIT_YJ_ASSETS_ACCDET (
FID BIGINT DEFAULT 0 NOT NULL,
FTAXACCOUNTSERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FBIZNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FTABLE BIGINT DEFAULT 0 NOT NULL,
FAMOUNTFIELD BIGINT DEFAULT 0 NOT NULL,
FTABLETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FDATATYPE BIGINT DEFAULT 0 NOT NULL,
FDATADIRECTION VARCHAR(50) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFETCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFILTERCONDITION VARCHAR(255) DEFAULT ' ' NOT NULL,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FITEMNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FABSOLUTE CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_YJ_ASSETS_SUMMARY') 
 CREATE TABLE T_TCCIT_YJ_ASSETS_SUMMARY (
FID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FBQAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBJAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL
);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_table.sql **/
