/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_COORDINATION') 
 CREATE TABLE T_POM_COORDINATION (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS VARCHAR(50) 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,
FPREENDDATE DATETIME,
FRECIPIENT BIGINT DEFAULT 0 NOT NULL,
FRECIPITRADE BIGINT DEFAULT 0 NOT NULL,
FFINISHER BIGINT DEFAULT 0 NOT NULL,
FCERTIFIER BIGINT DEFAULT 0 NOT NULL,
FPICKER BIGINT DEFAULT 0 NOT NULL,
FPICKDATE DATETIME,
FPROVIDPART CHAR(1) DEFAULT '0' NOT NULL,
FMACHININGDOC VARCHAR(50) DEFAULT ' ' NOT NULL,
FMACHININGUNIT BIGINT DEFAULT 0 NOT NULL,
FMACHININGQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMACHNIPARTNO BIGINT DEFAULT 0 NOT NULL,
FCOMPAREDOC VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQUIREFINALSTATUS NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREQUIREFINALSTATUS_TAG NCLOB,
FHEATPARTNO BIGINT DEFAULT 0 NOT NULL,
FHEATPARTUNIT BIGINT DEFAULT 0 NOT NULL,
FHEATPARTQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRAWMATERIALNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FRAWMATERIALNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FHEATGRN VARCHAR(50) DEFAULT ' ' NOT NULL,
FRAWMATERIALTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FDOCUMENT VARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIALNO BIGINT DEFAULT 0 NOT NULL,
FSURFACEGRN VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPRAYPARTDOC VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPRAYPARTUNIT BIGINT DEFAULT 0 NOT NULL,
FSPRAYPARTQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSPRAYPARTNO BIGINT DEFAULT 0 NOT NULL,
FSPRAYPARTDOWN CHAR(1) DEFAULT '0' NOT NULL,
FSPRAYPARTDOWNNO BIGINT DEFAULT 0 NOT NULL,
FSPRAYPARTDOWNGRN VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPRAYPARTFACE CHAR(1) DEFAULT '0' NOT NULL,
FSPRAYPARTDOWNTYPE1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPRAYPARTFACEGRN VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPRAYPARTFACENO BIGINT DEFAULT 0 NOT NULL,
FSPRAYPARTDOWNNAME1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FWORKPLACE VARCHAR(50) DEFAULT ' ' NOT NULL,
FWORKTEAM VARCHAR(50) DEFAULT ' ' NOT NULL,
FWORKREQUIRE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FWORKREQUIRE_TAG NCLOB,
FWORKTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FWORKREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FWORKREMARK_TAG NCLOB,
FWORKPRESS CHAR(1) DEFAULT '0' NOT NULL,
FBILLTYPE BIGINT DEFAULT 0 NOT NULL,
FBUSINESSSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FJOBNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FISAIRPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FAIRREGISTNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTNO BIGINT DEFAULT 0 NOT NULL,
FAIRTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FAPPLY BIGINT DEFAULT 0 NOT NULL,
FAPPLYTRADE BIGINT DEFAULT 0 NOT NULL,
FPROVIDER BIGINT DEFAULT 0 NOT NULL,
FENDDATE DATETIME,
FPROVIDDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_POM_SURFACE') 
 CREATE TABLE T_POM_SURFACE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSURFACEMNO BIGINT DEFAULT 0 NOT NULL,
FSURFACEMUNIT BIGINT DEFAULT 0 NOT NULL,
FSURFACEMQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSURFACETYPE VARCHAR(50) DEFAULT ' ' NOT NULL
);



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