/**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_PREFERENTIAL_ITEM' AND KSQL_COL_NAME ='FRULEPURPOSE') 
 ALTER TABLE T_TCCIT_PREFERENTIAL_ITEM ADD (FRULEPURPOSE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_DEPRECIATE_RULE' AND KSQL_COL_NAME ='FRULEPURPOSE') 
 ALTER TABLE T_TCCIT_DEPRECIATE_RULE ADD (FRULEPURPOSE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_PROFITS_ITEMS' AND KSQL_COL_NAME ='FRULEPURPOSE') 
 ALTER TABLE T_TCCIT_PROFITS_ITEMS ADD (FRULEPURPOSE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_OTHER_RULE' AND KSQL_COL_NAME ='FRULEPURPOSE') 
 ALTER TABLE T_TCCIT_OTHER_RULE ADD (FRULEPURPOSE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_ADJ_DETAIL_SJJT') 
 CREATE TABLE T_TCCIT_ADJ_DETAIL_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FENTRYTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FTITLENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEMNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEMNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FADJUSTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTOTALAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_ASS_ACCE_TOT_SJJT') 
 CREATE TABLE T_TCCIT_ASS_ACCE_TOT_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FEWBLXH VARCHAR(50) DEFAULT ' ' NOT NULL,
FEWBLNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FTAXLIMIT VARCHAR(50) DEFAULT ' ' NOT NULL,
FZCYZ DECIMAL(23,10) DEFAULT 0 NOT NULL,
FZZZJJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAZSSYBGDJSDZJJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FXSJSZJYHJSDZJJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBNTOTALZZDEPRE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBNTOTALSFDEPRE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBNTOTALJSDEPRE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_CALC_DET_SJJT') 
 CREATE TABLE T_TCCIT_CALC_DET_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FITEMNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEMTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMYPKID BIGINT DEFAULT 0 NOT NULL,
FMYPARENTID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FISSMALL CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_DEP_DETAIL_SJJT') 
 CREATE TABLE T_TCCIT_DEP_DETAIL_SJJT (
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_FDC_ACC_SJJT') 
 CREATE TABLE T_TCCIT_FDC_ACC_SJJT (
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,
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,
FENTRYTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEMNUMBER 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_FDC_MLE_SUM_SJJT') 
 CREATE TABLE T_TCCIT_FDC_MLE_SUM_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FSERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FITEMNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FBQSRJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMLL DECIMAL(23,10) DEFAULT 0 NOT NULL,
FYJBQMLE DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_FDC_NSTZ_SUM_SJJ') 
 CREATE TABLE T_TCCIT_FDC_NSTZ_SUM_SJJ (
FID BIGINT DEFAULT 0 NOT NULL,
FSERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FITEMNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FBQJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBNLJJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSQBNLJJE DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_INCRED_ACC_SJJT') 
 CREATE TABLE T_TCCIT_INCRED_ACC_SJJT (
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
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_INCRED_SUM_SJJT') 
 CREATE TABLE T_TCCIT_INCRED_SUM_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FSERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FDISCOUNTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FREDUCTRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINCREDINCOME DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINCREDPRESENT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINCREDTOTAL DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_JMSD_MIDD_AP_SJJT') 
 CREATE TABLE T_TCCIT_JMSD_MIDD_AP_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FITEMNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FPARENTCODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEMNAME VARCHAR(200) DEFAULT ' ' NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FITEM BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_NONTAX_ACC_SJJT') 
 CREATE TABLE T_TCCIT_NONTAX_ACC_SJJT (
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
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_NONTAX_SUM_M_SJJT') 
 CREATE TABLE T_TCCIT_NONTAX_SUM_M_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FSEQ VARCHAR(50) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FRULENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FNONTAXTOTAL DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDISCOUNTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEM BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_NONTAX_SUM_SJJT') 
 CREATE TABLE T_TCCIT_NONTAX_SUM_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FSERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FDISCOUNTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FNONTAXINCOME DECIMAL(23,10) DEFAULT 0 NOT NULL,
FNONTAXPRESENT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FNONTAXTOTAL DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_PROFIT_SUM_SJJT') 
 CREATE TABLE T_TCCIT_PROFIT_SUM_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FBQFSE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBQLJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSQFSE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSQLJE DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_TECH_ACC_SJJ') 
 CREATE TABLE T_TCCIT_TECH_ACC_SJJ (
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,
FDATADIRECTION VARCHAR(50) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFETCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFILTERCONDITION VARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_TECH_SUM_SJJT') 
 CREATE TABLE T_TCCIT_TECH_SUM_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FSERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FITEMTYPEID BIGINT DEFAULT 0 NOT NULL,
FDISCOUNTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FINCREDPRESENT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINCREDTOTAL DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_TREDUCED_ACC_SJJT') 
 CREATE TABLE T_TCCIT_TREDUCED_ACC_SJJT (
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
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_TREDUCED_SUM_SJJT') 
 CREATE TABLE T_TCCIT_TREDUCED_SUM_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FSERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FDISCOUNTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FTREDUCEDINCOME DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTREDUCEDPERCENT BIGINT DEFAULT 0 NOT NULL,
FTREDUCEDPRESENT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTREDUCEDTOTAL DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_YJ_ASS_ACC_SJJT') 
 CREATE TABLE T_TCCIT_YJ_ASS_ACC_SJJT (
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_ASS_SUM_SJJT') 
 CREATE TABLE T_TCCIT_YJ_ASS_SUM_SJJT (
FID BIGINT DEFAULT 0 NOT NULL,
FSERIALNO VARCHAR(50) DEFAULT ' ' 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
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_YJ_PRO_ACC_SJJT') 
 CREATE TABLE T_TCCIT_YJ_PRO_ACC_SJJT (
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
);



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