/**Begin D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_TLXNEEDPLAN') 
 CREATE TABLE T_MSPLAN_TLXNEEDPLAN (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(80) DEFAULT ' ' NOT NULL,
FBILLSTATUS VARCHAR(5) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FORGID BIGINT DEFAULT 0 NOT NULL,
FCLOSEDATE DATETIME,
FCLOSEOR BIGINT DEFAULT 0 NOT NULL,
FMODEL BIGINT DEFAULT 0 NOT NULL,
FCHECKTYPE BIGINT DEFAULT 0 NOT NULL,
FCUSTOMER BIGINT DEFAULT 0 NOT NULL,
FBILLTYPE BIGINT DEFAULT 0 NOT NULL,
FPROJECT BIGINT DEFAULT 0 NOT NULL,
FDATASOURCE VARCHAR(5) DEFAULT ' ' NOT NULL,
FWORKSTATUS VARCHAR(5) DEFAULT ' ' NOT NULL,
FWORKCENTER BIGINT DEFAULT 0 NOT NULL,
FECNSTATUS VARCHAR(5) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MSPLAN_TLXNEEDPLANENTRY') 
 CREATE TABLE T_MSPLAN_TLXNEEDPLANENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSTART VARCHAR(100) DEFAULT ' ' NOT NULL,
FEND VARCHAR(100) DEFAULT ' ' NOT NULL,
FRESOURCE BIGINT DEFAULT 0 NOT NULL,
FSTIME DATETIME,
FFTIME DATETIME,
FQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FUNIT BIGINT DEFAULT 0 NOT NULL,
FKEY CHAR(1) DEFAULT '1' NOT NULL,
FCHOOSE CHAR(1) DEFAULT '0' NOT NULL,
FSTARTTASKID BIGINT DEFAULT 0 NOT NULL,
FENDTASKID BIGINT DEFAULT 0 NOT NULL,
FUSELEVEL VARCHAR(5) DEFAULT ' ' NOT NULL,
FCARDNO BIGINT DEFAULT 0 NOT NULL,
FTOOLTYPE BIGINT DEFAULT 0 NOT NULL,
FSUPPLYMODE VARCHAR(10) DEFAULT ' ' NOT NULL,
FREPLACEGROUP VARCHAR(100) DEFAULT ' ' NOT NULL,
FREPLACEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSHORTQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRESULT VARCHAR(5) DEFAULT ' ' NOT NULL,
FSUPPYID BIGINT DEFAULT 0 NOT NULL,
FSUPPYIDTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FUSETIME DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCHECKGBILL VARCHAR(200) DEFAULT ' ' NOT NULL,
FCHECKGBILLID BIGINT DEFAULT 0 NOT NULL,
FTOOLSUB BIGINT DEFAULT 0 NOT NULL,
FRESOURCETD BIGINT DEFAULT 0 NOT NULL,
FSRCBILLENTRYID BIGINT DEFAULT 0 NOT NULL,
FSOURCEBILLNUMBER VARCHAR(100) DEFAULT ' ' NOT NULL,
FSRCBILLID BIGINT DEFAULT 0 NOT NULL,
FSOURCEENTRYSEQ BIGINT DEFAULT 0 NOT NULL,
FSOURCEBILLTYPE VARCHAR(100) DEFAULT ' ' NOT NULL
);



/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_table.sql **/
