/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HPDI_COLLATASK')
 CREATE TABLE T_HPDI_COLLATASK (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FENABLE VARCHAR(2) DEFAULT '1' NOT NULL,
FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FINDEX INT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FORGMSGRECVCENTERID BIGINT DEFAULT 0 NOT NULL,
FTASKRULEID BIGINT DEFAULT 0 NOT NULL,
FTASKRULEVID BIGINT DEFAULT 0 NOT NULL,
FTASKCREATEMANNER VARCHAR(2) DEFAULT ' ' NOT NULL,
FTASKEXECUTESTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FTASKEXECUTEDATE DATETIME,
FEXECUTEFAILMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FFLOWTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FORGTEAMID BIGINT DEFAULT 0 NOT NULL,
FDUTYWORKROLEID BIGINT DEFAULT 0 NOT NULL,
FCHANGETIME DATETIME,
FSUMVERIFYBILLID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTASKEXECUTENUM INT DEFAULT 0 NOT NULL,
FEXECUTESEQ INT DEFAULT 0 NOT NULL,
FPERSONID BIGINT DEFAULT 0 NOT NULL,
FEMPLOYEEID BIGINT DEFAULT 0 NOT NULL,
FDEPEMPID BIGINT DEFAULT 0 NOT NULL,
FCMPEMPID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HPDI_COLLATASK_L')
 CREATE TABLE T_HPDI_COLLATASK_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HPDI_COLLATASKENT')
 CREATE TABLE T_HPDI_COLLATASKENT (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSTOPEXECAFTERFAIL CHAR(1) DEFAULT '0' NOT NULL,
FTASKEXECUTESTATUSENT VARCHAR(2) DEFAULT ' ' NOT NULL,
FEXECUTEFAILMSGENT NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FTASKEXECUTETIME DATETIME,
FTASKEXECMANNER VARCHAR(10) DEFAULT ' ' NOT NULL,
FTASKEXECUSERID BIGINT DEFAULT 0 NOT NULL,
FISMANUALVERIFY CHAR(1) DEFAULT '0' NOT NULL,
FCOLLARULECLASS VARCHAR(30) DEFAULT ' ' NOT NULL,
FCOLLARULEID BIGINT DEFAULT 0 NOT NULL,
FCOLLARULEVID BIGINT DEFAULT 0 NOT NULL
);

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