
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HPDI_EMPREVISEDET') 
 CREATE TABLE T_HPDI_EMPREVISEDET (
FID BIGINT DEFAULT 0 NOT NULL,
FREVISETYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FREVISEDATE DATETIME,
FREVISENUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FREVISEBOID BIGINT DEFAULT 0 NOT NULL,
FREVISEBEFOREID BIGINT DEFAULT 0 NOT NULL,
FREVISEAFTERID BIGINT DEFAULT 0 NOT NULL,
FPERSONID BIGINT DEFAULT 0 NOT NULL,
FEMPLOYEEID BIGINT DEFAULT 0 NOT NULL,
FDEPEMPID BIGINT DEFAULT 0 NOT NULL,
FEMPPOSORGRELID BIGINT DEFAULT 0 NOT NULL,
FMSGCENTERID BIGINT DEFAULT 0 NOT NULL,
FCMPEMPID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HPDI_EMPREVISELOG') 
 CREATE TABLE T_HPDI_EMPREVISELOG (
FID BIGINT DEFAULT 0 NOT NULL,
FADMINORGID BIGINT DEFAULT 0 NOT NULL,
FMSGTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FMSGCONSUMESTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FERRORMSG NCLOB,
FCOMBOFIELD VARCHAR(2) DEFAULT ' ' NOT NULL,
FMSGCENTERID BIGINT DEFAULT 0 NOT NULL,
FPERSONID BIGINT DEFAULT 0 NOT NULL,
FEMPLOYEEID BIGINT DEFAULT 0 NOT NULL,
FRECEIVETIME DATETIME,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);

