/**Begin C:\Users\rd_qiongyang_liu\Desktop\开发文档集\开发\PDM_UPGRADE\PDMNEW\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_FPMBILLGENRECORD') 
 CREATE TABLE T_FPM_FPMBILLGENRECORD (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FEXECTIME DATETIME,
FEXECRESULT VARCHAR(50) DEFAULT ' ' NOT NULL,
FEXECRESULTDETAIL VARCHAR(50) DEFAULT ' ' NOT NULL,
FTEVIEWDETAIL VARCHAR(50) DEFAULT ' ' NOT NULL,
FOPREATEUSER BIGINT DEFAULT 0 NOT NULL,
FPLANREPORTBILLIDS NCLOB
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_REPORTPREPARATION') 
 CREATE TABLE T_FPM_REPORTPREPARATION (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLEDATE DATETIME,
FDISABLEDATE DATETIME,
FBODYSYSMANAGE BIGINT DEFAULT 0 NOT NULL,
FORGREPORTTYPE BIGINT DEFAULT 0 NOT NULL,
FDECLARESTARTDATE VARCHAR(50) DEFAULT ' ' NOT NULL,
FDECLAREDAYS INT DEFAULT 0 NOT NULL,
FSTOPREPORTDATE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTOPREPORTDAYS INT DEFAULT 0 NOT NULL,
FDEFAULTSTOPREPTIME INT DEFAULT 0 NOT NULL,
FISACCREPORTSUBDEFINE CHAR(1) DEFAULT '0' NOT NULL,
FREPORTSUBLEVEL VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTRLEVELSTOPREPTIME INT DEFAULT 0 NOT NULL,
FCONVEXRATETABLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMBOFIELD VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_REPORTPREPARATION_L') 
 CREATE TABLE T_FPM_REPORTPREPARATION_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMMENT VARCHAR(255) DEFAULT ' ' NOT NULL
);



/**End C:\Users\rd_qiongyang_liu\Desktop\开发文档集\开发\PDM_UPGRADE\PDMNEW\FPM_table.sql **/
