/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SRC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_AFTERCHANGEENTRY') 
 CREATE TABLE T_SRC_AFTERCHANGEENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCENEBILLNO2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FSCENENAME2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEWAY2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FTCATEGORY2 VARCHAR(1000) DEFAULT ' ' NOT NULL,
FDISTRIBUTERULE2 VARCHAR(1000) DEFAULT ' ' NOT NULL,
FISVARY2 CHAR(1) DEFAULT '0' NOT NULL,
FSTATUS2 CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_AFTERCHANGEENTRY_COPY') 
 CREATE TABLE T_SRC_AFTERCHANGEENTRY_COPY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCENEBILLNO2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FSCENENAME2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEWAY2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FTCATEGORY2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FDISTRIBUTERULE2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FISVARY2 CHAR(1) DEFAULT '0' NOT NULL,
FSTATUS2 CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_AMOUNT') 
 CREATE TABLE T_SRC_AMOUNT (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPROJECT1 BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRANK BIGINT DEFAULT 0 NOT NULL,
FCONTRACTTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FTEXTFIELD VARCHAR(50) DEFAULT ' ' NOT NULL,
FBUSINESSSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FAMOUNT2 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT2 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FUPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_AMOUNT_SUB') 
 CREATE TABLE T_SRC_AMOUNT_SUB (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSIGNRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_AMOUNTCHANGE') 
 CREATE TABLE T_SRC_AMOUNTCHANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FMATERIAL2 BIGINT DEFAULT 0 NOT NULL,
FMATERIALNANE1 VARCHAR(100) DEFAULT ' ' NOT NULL,
FCATEGORY2 BIGINT DEFAULT 0 NOT NULL,
FCATEGORY12 BIGINT DEFAULT 8 NOT NULL,
FCONTRACTLINENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FDEMANDNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FTARGETID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYSTATUS112 VARCHAR(30) DEFAULT ' ' NOT NULL,
FCONTRACTNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTRACTNAME VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLY') 
 CREATE TABLE T_SRC_APPLY (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(60) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISSPECIAL CHAR(1) DEFAULT '0' NOT NULL,
FECPNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FPROJECTNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FREQSOURCE VARCHAR(30) DEFAULT ' ' NOT NULL,
FISPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FSPECIALREASON VARCHAR(300) DEFAULT ' ',
FSUPPLIERNOID BIGINT DEFAULT 0 NOT NULL,
FISANNUAL VARCHAR(30) DEFAULT '0' NOT NULL,
FTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCOSTATTRIBUTION BIGINT DEFAULT 0 NOT NULL,
FSERVICEATTRIBUTES VARCHAR(50) DEFAULT ' ' NOT NULL,
FISDECISION CHAR(1) DEFAULT '0' NOT NULL,
FYEARCOMMENT VARCHAR(255) DEFAULT ' ' NOT NULL,
FSUPPLIERNAMETEXT VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQDATETIME DATETIME,
FTITLE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FATTACHURL VARCHAR(500) DEFAULT ' ' NOT NULL,
FBASEDATAFIELD BIGINT DEFAULT 0 NOT NULL,
FREQCLASS VARCHAR(3) DEFAULT 'A' NOT NULL,
FRENTSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FDEPARTMENTID BIGINT DEFAULT 0 NOT NULL,
FDEMANDAFFILIATEID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLYATTACHMENT') 
 CREATE TABLE T_SRC_APPLYATTACHMENT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLYDEPTYEAR') 
 CREATE TABLE T_SRC_APPLYDEPTYEAR (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLYENTRY') 
 CREATE TABLE T_SRC_APPLYENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FTAXPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FARRIVEDATE DATETIME,
FADDRESS NVARCHAR(200) DEFAULT ' ' NOT NULL,
FPURCHASERID BIGINT DEFAULT 0 NOT NULL,
FQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDEMANDSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FREQORGID BIGINT DEFAULT 0 NOT NULL,
FMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALMODEL NVARCHAR(500) DEFAULT ' ' NOT NULL,
FREQDESCRIBE NVARCHAR(500) DEFAULT ' ' NOT NULL,
FAREAID BIGINT DEFAULT 0 NOT NULL,
FSOURSENO VARCHAR(100) DEFAULT ' ' NOT NULL,
FMATERIALNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCATEGORY BIGINT DEFAULT 0 NOT NULL,
FUNIT BIGINT DEFAULT 0 NOT NULL,
FMONTH DATETIME,
FCARUSE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCATEGORYBIG BIGINT DEFAULT 0 NOT NULL,
FCATEGORYMID BIGINT DEFAULT 0 NOT NULL,
FCATEGORYSMALL BIGINT DEFAULT 0 NOT NULL,
FINDICATELD VARCHAR(30) DEFAULT ' ' NOT NULL,
FREQTYPE BIGINT DEFAULT 0 NOT NULL,
FUSE BIGINT DEFAULT 0 NOT NULL,
FBUDGET VARCHAR(50) DEFAULT ' ' NOT NULL,
FACCOUNT VARCHAR(50) DEFAULT ' ' NOT NULL,
FORDERNUB BIGINT DEFAULT 0 NOT NULL,
FIONUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FLINENUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FPRBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIGINSMALLLD BIGINT DEFAULT 0 NOT NULL,
FCONTACTMOBILE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCATEGORYER BIGINT DEFAULT 0 NOT NULL,
FCONTACTNO BIGINT DEFAULT 0 NOT NULL,
FNOTAXPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPROFITCOSTCENTER BIGINT DEFAULT 0 NOT NULL,
FWAREHOUSE BIGINT DEFAULT 0 NOT NULL,
FORIGINPURROWNUM BIGINT DEFAULT 0 NOT NULL,
FORIGINPURBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQQTY2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSEEPROCESS NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPRNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPONUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPOLINE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPURCHASERSLD BIGINT DEFAULT 0 NOT NULL,
FTITLE NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLYENTRY_FJ') 
 CREATE TABLE T_SRC_APPLYENTRY_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLYENTRY_L') 
 CREATE TABLE T_SRC_APPLYENTRY_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FTITLE NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLYPURORG') 
 CREATE TABLE T_SRC_APPLYPURORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLYSUBENTRY') 
 CREATE TABLE T_SRC_APPLYSUBENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSERVICEROWITEM BIGINT DEFAULT 0 NOT NULL,
FLEASESERVICECODE BIGINT DEFAULT 0 NOT NULL,
FCARBODYNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FCARPLATENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FISADJUSTDELIVERY VARCHAR(30) DEFAULT '0' NOT NULL,
FREGISTERDATE DATETIME,
FISSPARECAR VARCHAR(30) DEFAULT '0' NOT NULL,
FADJUSTEDMODEL VARCHAR(50) DEFAULT ' ' NOT NULL,
FADJUSTEDBRAND VARCHAR(50) DEFAULT ' ' NOT NULL,
FENGINENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FDRIVINGLICENSENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FELECTRICPILENO VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_APPLYUSERID') 
 CREATE TABLE T_SRC_APPLYUSERID (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ASSESSCONFIG') 
 CREATE TABLE T_SRC_ASSESSCONFIG (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FINDEXTYPEID BIGINT DEFAULT 0 NOT NULL,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FWEIGHT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTPLNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ASSESSCONFIG_FJ') 
 CREATE TABLE T_SRC_ASSESSCONFIG_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ASSESSSCORER') 
 CREATE TABLE T_SRC_ASSESSSCORER (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ASSESSSUM') 
 CREATE TABLE T_SRC_ASSESSSUM (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCORETASKID BIGINT DEFAULT 0 NOT NULL,
FINPUTSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FNOTE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FINDEXTYPEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ATTACHMENTYEAR') 
 CREATE TABLE T_SRC_ATTACHMENTYEAR (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BEFORECHANGEENTRY') 
 CREATE TABLE T_SRC_BEFORECHANGEENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCENEBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSCENENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEWAY VARCHAR(50) DEFAULT ' ' NOT NULL,
FCATEGORY VARCHAR(1000) DEFAULT ' ' NOT NULL,
FDISTRIBUTERULE VARCHAR(1000) DEFAULT ' ' NOT NULL,
FISVARY VARCHAR(50) DEFAULT '0' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDCHANGE') 
 CREATE TABLE T_SRC_BIDCHANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLDATE DATETIME,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FISSUABNORMAL CHAR(1) DEFAULT '0' NOT NULL,
FISDEMANDPUSH CHAR(1) DEFAULT '0' NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FPURDECISION CHAR(1) DEFAULT ' ' NOT NULL,
FLEVEL BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDCHANGE_CONDITION') 
 CREATE TABLE T_SRC_BIDCHANGE_CONDITION (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCONDITIONID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDCHANGE_HANDLER') 
 CREATE TABLE T_SRC_BIDCHANGE_HANDLER (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FHANDLERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDCHANGE_LOG') 
 CREATE TABLE T_SRC_BIDCHANGE_LOG (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCHGCONTENT NVARCHAR(510) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDCHANGE_ORG') 
 CREATE TABLE T_SRC_BIDCHANGE_ORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDCOMP_MATGROUP') 
 CREATE TABLE T_SRC_BIDCOMP_MATGROUP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDDINGPROJECT') 
 CREATE TABLE T_SRC_BIDDINGPROJECT (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FORIGIN VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDDINGPROJECT_PRO') 
 CREATE TABLE T_SRC_BIDDINGPROJECT_PRO (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPROJECT BIGINT DEFAULT 0 NOT NULL,
FBIDNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATOR BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FPURGROUP BIGINT DEFAULT 0 NOT NULL,
FSOURCENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPURORG NVARCHAR(200) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDDINGPROJECTENTRY') 
 CREATE TABLE T_SRC_BIDDINGPROJECTENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FORIGIN VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDDOC') 
 CREATE TABLE T_SRC_BIDDOC (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISQUICKPUR CHAR(1) DEFAULT '0' NOT NULL,
FMANAGETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FORIGIN VARCHAR(30) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDDOCBILL') 
 CREATE TABLE T_SRC_BIDDOCBILL (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIZPARTNERID BIGINT DEFAULT 0 NOT NULL,
FBILLDATE DATETIME,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FISSPLITDOC CHAR(1) DEFAULT '0' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISADD CHAR(1) DEFAULT '0' NOT NULL,
FTURNS CHAR(1) DEFAULT ' ' NOT NULL,
FDEADLINE DATETIME,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FISNEEDBIDDOC CHAR(1) DEFAULT '0' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSUPPLIERIP VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDDOCENTRY') 
 CREATE TABLE T_SRC_BIDDOCENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FFILETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FFILENAME NVARCHAR(2000) DEFAULT ' ',
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FSRCBILLID VARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FBILLTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FCOMPKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FFILEREQ NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISNEEDBIDDOC CHAR(1) DEFAULT '0' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_BIDDOCENTRY_FJ') 
 CREATE TABLE T_SRC_BIDDOCENTRY_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CATEGORYCHANGE') 
 CREATE TABLE T_SRC_CATEGORYCHANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCATEGORY BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIAL BIGINT DEFAULT 0 NOT NULL,
FMATERIALNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FUNIT BIGINT DEFAULT 0 NOT NULL,
FTAXPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSOURCEENTRYID VARCHAR(50) DEFAULT ' ' NOT NULL,
FBASEDATAFIELD1 BIGINT DEFAULT 0 NOT NULL,
FCATEGORYBEFORE BIGINT DEFAULT 0 NOT NULL,
FAPPLYNO1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FLINENUMBER1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQSOURCE11 VARCHAR(30) DEFAULT ' ' NOT NULL,
FENTRYSTATUS11 VARCHAR(30) DEFAULT ' ' NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CATEGORYCHG') 
 CREATE TABLE T_SRC_CATEGORYCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CATEGORYCHGENTRY') 
 CREATE TABLE T_SRC_CATEGORYCHGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPACKAGENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALNANE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FCATEGORYID1 BIGINT DEFAULT 0 NOT NULL,
FBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CATEGORYDECISION') 
 CREATE TABLE T_SRC_CATEGORYDECISION (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CATEGORYMANY') 
 CREATE TABLE T_SRC_CATEGORYMANY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CERTIFICATENTRY') 
 CREATE TABLE T_SRC_CERTIFICATENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCETIFICATBILLNO BIGINT DEFAULT 0 NOT NULL,
FCATEGORY BIGINT DEFAULT 0 NOT NULL,
FPURORG BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FISSATISFIED VARCHAR(30) DEFAULT '0' NOT NULL,
FIDENTIFIEDTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FREMARK VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CERTIFICATSUBENTRY') 
 CREATE TABLE T_SRC_CERTIFICATSUBENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCATEGORY VARCHAR(50) DEFAULT ' ' NOT NULL,
FISSATISFIED VARCHAR(50) DEFAULT '0' NOT NULL,
FREMARK VARCHAR(50) DEFAULT ' ' NOT NULL,
FIDENTIFIEDTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FPURORG VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHANGECONDITION') 
 CREATE TABLE T_SRC_CHANGECONDITION (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCONDITIONID BIGINT DEFAULT 0 NOT NULL,
FISPASS CHAR(1) DEFAULT '0' NOT NULL,
FISTODECISION CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHANGEENTRY') 
 CREATE TABLE T_SRC_CHANGEENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCATCHANGEBILLNO BIGINT DEFAULT 0 NOT NULL,
FCOMBOFIELD VARCHAR(30) DEFAULT ' ' NOT NULL,
FCHANGERANGE VARCHAR(30) DEFAULT ' ' NOT NULL,
FPURORG BIGINT DEFAULT 0 NOT NULL,
FCATEGORY BIGINT DEFAULT 0 NOT NULL,
FMATERIEL BIGINT DEFAULT 0 NOT NULL,
FCATEGORYSTATUS_OLD VARCHAR(30) DEFAULT ' ' NOT NULL,
FCATEGORYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FDECISION VARCHAR(30) DEFAULT ' ' NOT NULL,
FREMARKDS VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHANGEHANDLER') 
 CREATE TABLE T_SRC_CHANGEHANDLER (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FHANDLERID BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCHGNAMEHANDLER VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHANGELOG') 
 CREATE TABLE T_SRC_CHANGELOG (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FLINENUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYTABLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCHANGEFIELD VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYTABLEDES VARCHAR(50) DEFAULT ' ' NOT NULL,
FCHGCONTENTBEFORELD BIGINT DEFAULT 0 NOT NULL,
FCHGCONTENTAFTERLD BIGINT DEFAULT 0 NOT NULL,
FCHGCONTENT VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNAME1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERS BIGINT DEFAULT 0 NOT NULL,
FAMOUNTBEFORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNTFIELDAFTER DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHANGEPURORGAFTER') 
 CREATE TABLE T_SRC_CHANGEPURORGAFTER (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHANGEPURORGBEFORE') 
 CREATE TABLE T_SRC_CHANGEPURORGBEFORE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHANGETYPE') 
 CREATE TABLE T_SRC_CHANGETYPE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCENCORTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FPLUGINAME VARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHGCONDITION') 
 CREATE TABLE T_SRC_CHGCONDITION (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FPLUGIN NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBIZNODEID BIGINT DEFAULT 0 NOT NULL,
FCHGTYPEID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHGHANDLER') 
 CREATE TABLE T_SRC_CHGHANDLER (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FPLUGIN NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCHGTYPEID BIGINT DEFAULT 0 NOT NULL,
FBIZNODEID BIGINT DEFAULT 0 NOT NULL,
FSOURCETYPEID BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CHGHANDLER_L') 
 CREATE TABLE T_SRC_CHGHANDLER_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,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_COMPARE_SET') 
 CREATE TABLE T_SRC_COMPARE_SET (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPKGSCHEMEID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_COMPAREATTACH') 
 CREATE TABLE T_SRC_COMPAREATTACH (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FFILETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FFILENAME NVARCHAR(512) DEFAULT ' ',
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_COMPAREATTACH_FJ') 
 CREATE TABLE T_SRC_COMPAREATTACH_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_COMPARESUM') 
 CREATE TABLE T_SRC_COMPARESUM (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FINDEXTYPEID BIGINT DEFAULT 0 NOT NULL,
FBIZSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBASETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FBIZAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAVGVALUE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMINVALUE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMAXVALUE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTECSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FOTHSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRANK BIGINT DEFAULT 0 NOT NULL,
FRESULT CHAR(1) DEFAULT ' ' NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FPKGGROUPID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_COMPENTRY') 
 CREATE TABLE T_SRC_COMPENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FWHICHCOMP NVARCHAR(510) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_COMPONENT') 
 CREATE TABLE T_SRC_COMPONENT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FBIZOBJECT VARCHAR(36) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_COMPONENT_L') 
 CREATE TABLE T_SRC_COMPONENT_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
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CONTRACEEND') 
 CREATE TABLE T_SRC_CONTRACEEND (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CONTRACEENDENTRY') 
 CREATE TABLE T_SRC_CONTRACEENDENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FTERMINATEBILLNO BIGINT DEFAULT 0 NOT NULL,
FISAGREE CHAR(1) DEFAULT '0' NOT NULL,
FREMARKS NVARCHAR(100) DEFAULT ' ' NOT NULL,
FTATALAMOUNTWITHTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CONTRACTCONDITION') 
 CREATE TABLE T_SRC_CONTRACTCONDITION (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FISNOTPASS CHAR(1) DEFAULT '0' NOT NULL,
FCONTRACTNO1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTRACTNAME1 VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CONTRACTPURLIST') 
 CREATE TABLE T_SRC_CONTRACTPURLIST (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPURLISTDETAILID BIGINT DEFAULT 0 NOT NULL,
FUNITID BIGINT DEFAULT 0 NOT NULL,
FQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FTAXRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISSIGNING CHAR(1) DEFAULT '0' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_CONTRACTSUPPLIER') 
 CREATE TABLE T_SRC_CONTRACTSUPPLIER (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FISSIGNING CHAR(1) DEFAULT '0' NOT NULL,
FPURORGID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FAGENTID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECFORMCATEGORY') 
 CREATE TABLE T_SRC_DECFORMCATEGORY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECFORMPURDEPT') 
 CREATE TABLE T_SRC_DECFORMPURDEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECFORMPURGROUP') 
 CREATE TABLE T_SRC_DECFORMPURGROUP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECIDE') 
 CREATE TABLE T_SRC_DECIDE (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(60) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FTEMPLATE BIGINT DEFAULT 0 NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FDECISIONAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSURPLUSAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDATETO DATETIME,
FSOURCEBILLNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FREVIEWDATE DATETIME,
FDECIDECONTENT VARCHAR(255) DEFAULT ' ' NOT NULL,
FMEETINGCONTENT VARCHAR(255) DEFAULT ' ' NOT NULL,
FSTAGE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSCOREROPINION VARCHAR(255) DEFAULT ' ' NOT NULL,
FISFINAL CHAR(1) DEFAULT '0' NOT NULL,
FSTARTVETODATE DATETIME,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FNOTIFYCHAIRMANDATE DATETIME,
FISCHANGING VARCHAR(30) DEFAULT '0' NOT NULL,
FISFUNCTION VARCHAR(30) DEFAULT '0' NOT NULL,
FCENCORTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FREASON VARCHAR(255) DEFAULT ' ' NOT NULL,
FINDICATE VARCHAR(30) DEFAULT ' ' NOT NULL,
FPURDEPT BIGINT DEFAULT 0 NOT NULL,
FLEVEL BIGINT DEFAULT 0 NOT NULL,
FDECISIONTYPE BIGINT DEFAULT 0 NOT NULL,
FDECISIONFORM BIGINT DEFAULT 0 NOT NULL,
FISQUALIFY CHAR(1) DEFAULT '0' NOT NULL,
FVERSION BIGINT DEFAULT 0 NOT NULL,
FCURRENCY BIGINT DEFAULT 0 NOT NULL,
FPURCHASER BIGINT DEFAULT 0 NOT NULL,
FPURGROUP BIGINT DEFAULT 0 NOT NULL,
FDECIDETIME DATETIME,
FORGIDS NCLOB DEFAULT ' ',
FREGION BIGINT DEFAULT 0 NOT NULL,
FLASTDECISION BIGINT DEFAULT 0 NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FDEMANDAFFILIATEID BIGINT DEFAULT 0 NOT NULL,
FCOSTATTRIBUTION BIGINT DEFAULT 0 NOT NULL,
FCFMSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTITLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMULILANGTEXTFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECIDE_L') 
 CREATE TABLE T_SRC_DECIDE_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FTITLE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FMULILANGTEXTFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECIDEATTACHMENT') 
 CREATE TABLE T_SRC_DECIDEATTACHMENT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISION_CATEGORY') 
 CREATE TABLE T_SRC_DECISION_CATEGORY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISION_DISPOSE') 
 CREATE TABLE T_SRC_DECISION_DISPOSE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCORER2 BIGINT DEFAULT 0 NOT NULL,
FROLE2 BIGINT DEFAULT 0 NOT NULL,
FDISPOSE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSCORER3 BIGINT DEFAULT 0 NOT NULL,
FSCORER4 BIGINT DEFAULT 0 NOT NULL,
FISFIRSTNOTIFY1 CHAR(1) DEFAULT '0' NOT NULL,
FBENIFITDISPOSE2 VARCHAR(30) DEFAULT ' ' NOT NULL,
FISBENIFIT2 VARCHAR(30) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISION_DUP') 
 CREATE TABLE T_SRC_DECISION_DUP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISION_PURORG') 
 CREATE TABLE T_SRC_DECISION_PURORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONCHANGELOG') 
 CREATE TABLE T_SRC_DECISIONCHANGELOG (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FDECISIONBILLNO BIGINT DEFAULT 0 NOT NULL,
FDECISIONTITLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FDECISIONTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCHANGEVERSION VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUBMITDATE VARCHAR(50) DEFAULT ' ' NOT NULL,
FVALIDDATE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCHANGEREASON VARCHAR(255) DEFAULT ' ' NOT NULL,
FCHANGEREASON_TAG NCLOB DEFAULT ' ',
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FDEPARTMENTID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONCHANGETYPE') 
 CREATE TABLE T_SRC_DECISIONCHANGETYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONCHG') 
 CREATE TABLE T_SRC_DECISIONCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTAXTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISADD CHAR(1) DEFAULT '0' NOT NULL,
FISSRC CHAR(1) DEFAULT '0' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONCHGENTRY') 
 CREATE TABLE T_SRC_DECISIONCHGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FTURNS VARCHAR(30) DEFAULT ' ' NOT NULL,
FISNEW CHAR(1) DEFAULT '0' NOT NULL,
FPACKAGENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIDMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALNANE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FBRAND NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIALMODEL NVARCHAR(100) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDCTRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDCTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FACTPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FREBATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPERCENT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBIZAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDECREASE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRESULT VARCHAR(30) DEFAULT ' ' NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FSRCENTRYID BIGINT DEFAULT 0 NOT NULL,
FCOMPKEY VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FRESULTNEW VARCHAR(30) DEFAULT ' ' NOT NULL,
FORDERRATIONEW DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONDEMAND') 
 CREATE TABLE T_SRC_DECISIONDEMAND (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDEMANDBILLNO BIGINT DEFAULT 0 NOT NULL,
FDEMANDAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNTFIE DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONFORM') 
 CREATE TABLE T_SRC_DECISIONFORM (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONITEM') 
 CREATE TABLE T_SRC_DECISIONITEM (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONLEVEL') 
 CREATE TABLE T_SRC_DECISIONLEVEL (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCATEGORY BIGINT DEFAULT 0 NOT NULL,
FISDEFAULT CHAR(1) DEFAULT '0' NOT NULL,
FSTART DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTHIRDTOSECOND DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSECONDTOFIRST DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPURTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONLEVEL_DEPT') 
 CREATE TABLE T_SRC_DECISIONLEVEL_DEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSCENE') 
 CREATE TABLE T_SRC_DECISIONSCENE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCENENAME_DES VARCHAR(100) DEFAULT ' ' NOT NULL,
FPURTYPE BIGINT DEFAULT 0 NOT NULL,
FWINERQTY BIGINT DEFAULT 0 NOT NULL,
FORDERRULE VARCHAR(1000) DEFAULT ' ' NOT NULL,
FDISCARDRULE VARCHAR(1000) DEFAULT ' ' NOT NULL,
FSKILLPER DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBUSINESSPER DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCOMPREPER DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTALKRULE BIGINT DEFAULT 0 NOT NULL,
FSOLEREASON VARCHAR(100) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FOTHERWINRULE VARCHAR(1000) DEFAULT ' ' NOT NULL,
FRULEASSESS VARCHAR(30) DEFAULT ' ' NOT NULL,
FOTHERRULEASSESS VARCHAR(1000) DEFAULT ' ' NOT NULL,
FAFTERTALKRULE VARCHAR(1000) DEFAULT ' ' NOT NULL,
FISPRICE CHAR(1) DEFAULT '0' NOT NULL,
FRANGE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FQUERYCONDITION VARCHAR(255) DEFAULT ' ' NOT NULL,
FWINRULE2 BIGINT DEFAULT 0 NOT NULL,
FOTHERREASON VARCHAR(255) DEFAULT ' ' NOT NULL,
FBARGAINRULE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSUPPLIERNUM BIGINT DEFAULT 0 NOT NULL,
FWINRULE BIGINT DEFAULT 0 NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBILLNO2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FTITLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FDETAILID VARCHAR(50) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSCENENO_DES VARCHAR(100) DEFAULT ' ' NOT NULL,
FBIZTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSEQ1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK VARCHAR(255) DEFAULT ' ' NOT NULL,
FISFUNCTION CHAR(1) DEFAULT '0' NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FCHASSISTTYPEID BIGINT DEFAULT 0 NOT NULL,
FSCENEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSCENECHASISSTID BIGINT DEFAULT 0 NOT NULL,
FSRCFLOWCONFIG BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSCENEORG') 
 CREATE TABLE T_SRC_DECISIONSCENEORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSCORER') 
 CREATE TABLE T_SRC_DECISIONSCORER (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCONFIRM VARCHAR(30) DEFAULT ' ' NOT NULL,
FAUTHSCORER2 BIGINT DEFAULT 0 NOT NULL,
FDETAIL VARCHAR(50) DEFAULT ' ' NOT NULL,
FISATTEND VARCHAR(30) DEFAULT '0' NOT NULL,
FISBENIFIT VARCHAR(30) DEFAULT '0' NOT NULL,
FISFIRSTNOTIFY CHAR(1) DEFAULT '0' NOT NULL,
FSCORER BIGINT DEFAULT 0 NOT NULL,
FAUTHSCORER BIGINT DEFAULT 0 NOT NULL,
FROLE BIGINT DEFAULT 0 NOT NULL,
FAUTHSCORER3 BIGINT DEFAULT 0 NOT NULL,
FBENIFITDISPOSE VARCHAR(30) DEFAULT ' ' NOT NULL,
FDEPARTMENT VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSUM') 
 CREATE TABLE T_SRC_DECISIONSUM (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FSRCTYPEID BIGINT DEFAULT 0 NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL,
FISMULTIPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FBILLDATE DATETIME,
FCURRENTNODE BIGINT DEFAULT 0 NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUMTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FISPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FISPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FISCATEGORY CHAR(1) DEFAULT '0' NOT NULL,
FISPRICE CHAR(1) DEFAULT '0' NOT NULL,
FSOURCETYPEID BIGINT DEFAULT 0 NOT NULL,
FBUDGETAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORIGIN VARCHAR(30) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBIDNAME NVARCHAR(300) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSUM_L') 
 CREATE TABLE T_SRC_DECISIONSUM_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FBIDNAME NVARCHAR(300) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSUM_PRO') 
 CREATE TABLE T_SRC_DECISIONSUM_PRO (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSUMSIGN') 
 CREATE TABLE T_SRC_DECISIONSUMSIGN (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FCONTRACTID BIGINT DEFAULT 0 NOT NULL,
FSIGNRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSUMSIGN_FJ') 
 CREATE TABLE T_SRC_DECISIONSUMSIGN_FJ (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSUMSUP') 
 CREATE TABLE T_SRC_DECISIONSUMSUP (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRANK BIGINT DEFAULT 0 NOT NULL,
FCONTRACTTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTRACTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBUDGETAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONSUP') 
 CREATE TABLE T_SRC_DECISIONSUP (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYIDTWO BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FREASON NVARCHAR(100) DEFAULT ' ' NOT NULL,
FISINVITE CHAR(1) DEFAULT '0' NOT NULL,
FSUPPLIER BIGINT DEFAULT 0 NOT NULL,
FSOURCE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONTPL') 
 CREATE TABLE T_SRC_DECISIONTPL (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FISDEFAULT CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FSHOWTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FDECISIONTYPE BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONTPL_L') 
 CREATE TABLE T_SRC_DECISIONTPL_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONTPLCATEGORY') 
 CREATE TABLE T_SRC_DECISIONTPLCATEGORY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONTPLENTRY') 
 CREATE TABLE T_SRC_DECISIONTPLENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCOMPONENTID BIGINT DEFAULT 0 NOT NULL,
FNOTE VARCHAR(200) DEFAULT ' ' NOT NULL,
FBIZOBJECT VARCHAR(100) DEFAULT ' ' NOT NULL,
FEXTOBJECT VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONTPLPURDEPT') 
 CREATE TABLE T_SRC_DECISIONTPLPURDEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONTPLPURGROUP') 
 CREATE TABLE T_SRC_DECISIONTPLPURGROUP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECISIONWIN') 
 CREATE TABLE T_SRC_DECISIONWIN (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FORIGIN NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSUMTYPE NVARCHAR(30) DEFAULT '1' NOT NULL,
FISPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FISPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FISCATEGORY CHAR(1) DEFAULT '0' NOT NULL,
FISPRICE CHAR(1) DEFAULT '0' NOT NULL,
FBUDGETAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FSOURCETYPEID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DECLEVDEPT') 
 CREATE TABLE T_SRC_DECLEVDEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMAND') 
 CREATE TABLE T_SRC_DEMAND (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(60) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISSPECIAL CHAR(1) DEFAULT '0' NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FPURDECISION CHAR(1) DEFAULT ' ' NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FNOTREASON VARCHAR(100) DEFAULT ' ' NOT NULL,
FLEVELID BIGINT DEFAULT 0 NOT NULL,
FISPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FPURCHASETYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSURPLUSAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSRCEMOTION VARCHAR(30) DEFAULT ' ' NOT NULL,
FSIGNINGCYCLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FDECISONLEVELLD BIGINT DEFAULT 0 NOT NULL,
FDECISIONTYPEID BIGINT DEFAULT 0 NOT NULL,
FDECISONLEVELHIDE BIGINT DEFAULT 0 NOT NULL,
FTEXTFIELD VARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECT VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPECIAL VARCHAR(50) DEFAULT ' ' NOT NULL,
FCHASSISTTYPE BIGINT DEFAULT 0 NOT NULL,
FISSELLOFF VARCHAR(30) DEFAULT '0' NOT NULL,
FREGIONID BIGINT DEFAULT 0 NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FBUSITYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FBUSIAREA BIGINT DEFAULT 0 NOT NULL,
FPLACE BIGINT DEFAULT 0 NOT NULL,
FSERVICETYPE BIGINT DEFAULT 0 NOT NULL,
FK_BASEDATAFIELD BIGINT DEFAULT 0 NOT NULL,
FDEMANDAFFILIATEID BIGINT DEFAULT 0 NOT NULL,
FCOSTATTRIBUTION BIGINT DEFAULT 0 NOT NULL,
FWITHVATAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTITLE NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMAND_A') 
 CREATE TABLE T_SRC_DEMAND_A (
FID BIGINT DEFAULT 0 NOT NULL,
FDECIDENUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDECISIONID BIGINT DEFAULT 0 NOT NULL,
FDECISIONTYPE BIGINT DEFAULT 0 NOT NULL,
FDECSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FRESULTSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISTEMPPUSH CHAR(1) DEFAULT '0' NOT NULL,
FTEMPREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDECIDELINK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCONCLUSION NVARCHAR(1000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMAND_CHASSTYPE') 
 CREATE TABLE T_SRC_DEMAND_CHASSTYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDAMOUNT') 
 CREATE TABLE T_SRC_DEMANDAMOUNT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCEILING DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFLOOR DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSOURCETYPEID BIGINT DEFAULT 0 NOT NULL,
FFREQUENCYID VARCHAR(30) DEFAULT ' ' NOT NULL,
FPURCHASETYPEID VARCHAR(30) DEFAULT ' ' NOT NULL,
FPURTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDBIZNODE') 
 CREATE TABLE T_SRC_DEMANDBIZNODE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(10) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FBIZOBJECT VARCHAR(36) DEFAULT ' ' NOT NULL,
FEXTOBJECT VARCHAR(36) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FISCHANGENODE CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDCHANGE') 
 CREATE TABLE T_SRC_DEMANDCHANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FBILLNO1 NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLDATE DATETIME,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATE BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROJECTTEMPLATELD BIGINT DEFAULT 0 NOT NULL,
FCHANGERESULT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSERVICESTATES NVARCHAR(30) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNTAFTER DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCHECKBOXFIELD CHAR(1) DEFAULT ' ' NOT NULL,
FCHECKBOXFIELD1 CHAR(1) DEFAULT ' ' NOT NULL,
FAMOUNTFIELD DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPURGROUPLD BIGINT DEFAULT 0 NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FDEPARTMENTID BIGINT DEFAULT 0 NOT NULL,
FORIGINAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDCHG') 
 CREATE TABLE T_SRC_DEMANDCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDCHGENTRY') 
 CREATE TABLE T_SRC_DEMANDCHGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNT1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FPROJECT NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDCOMP') 
 CREATE TABLE T_SRC_DEMANDCOMP (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FBIZNODEID BIGINT DEFAULT 0 NOT NULL,
FBIZOBJECT VARCHAR(36) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDCOMPPURORG') 
 CREATE TABLE T_SRC_DEMANDCOMPPURORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDINFO') 
 CREATE TABLE T_SRC_DEMANDINFO (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDINFO_BODY') 
 CREATE TABLE T_SRC_DEMANDINFO_BODY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDEMANDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FORG BIGINT DEFAULT 0 NOT NULL,
FDEPT BIGINT DEFAULT 0 NOT NULL,
FFREQUENCY BIGINT DEFAULT 0 NOT NULL,
FAREA BIGINT DEFAULT 0 NOT NULL,
FFINDMODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FISSPECIAL VARCHAR(30) DEFAULT '0' NOT NULL,
FREASON VARCHAR(50) DEFAULT ' ' NOT NULL,
FOTHERREASON VARCHAR(50) DEFAULT ' ' NOT NULL,
FCATEGORY BIGINT DEFAULT 0 NOT NULL,
FSMALLCATEGORY VARCHAR(50) DEFAULT ' ' NOT NULL,
FISDIRECT VARCHAR(30) DEFAULT '0' NOT NULL,
FTARGETTYPE BIGINT DEFAULT 0 NOT NULL,
FTEXTFIELD5 VARCHAR(50) DEFAULT ' ' NOT NULL,
FTEXTFIELD6 VARCHAR(50) DEFAULT ' ' NOT NULL,
FOTHERTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUBJECTMATTER VARCHAR(50) DEFAULT ' ' NOT NULL,
FBIDNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FENCLOSURE VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDPURORG') 
 CREATE TABLE T_SRC_DEMANDPURORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDSUMMARY') 
 CREATE TABLE T_SRC_DEMANDSUMMARY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FRFQNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FRFQNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FRFQAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRODESNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYCURRENCY BIGINT DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FENTRYCREATOR VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATETION DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DEMANDTRANSLOG') 
 CREATE TABLE T_SRC_DEMANDTRANSLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FCURRENTUSER BIGINT DEFAULT 0 NOT NULL,
FTARGETUSER BIGINT DEFAULT 0 NOT NULL,
FAPPLYBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FREASON VARCHAR(50) DEFAULT ' ' NOT NULL,
FOPERATIONDATE DATETIME,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FDEPARTMENTID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DIRECTATTACH') 
 CREATE TABLE T_SRC_DIRECTATTACH (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FFILETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FFILENAME NVARCHAR(512) DEFAULT ' ',
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DIRECTATTACH_FJ') 
 CREATE TABLE T_SRC_DIRECTATTACH_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DMDAMOUNT_CATEGORY') 
 CREATE TABLE T_SRC_DMDAMOUNT_CATEGORY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_DMDAMOUNT_DEPT') 
 CREATE TABLE T_SRC_DMDAMOUNT_DEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ENROLLSUPPLIER') 
 CREATE TABLE T_SRC_ENROLLSUPPLIER (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FENROLLPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FENROLLSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FENROLLLINKMAN NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENROLLDUTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENROLLPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENROLLADDRESS NVARCHAR(100) DEFAULT ' ' NOT NULL,
FENROLLREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISSELECT CHAR(1) DEFAULT '0' NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FENROLLNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENROLLEMAIL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FLINKMAN NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDUTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEMAIL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FADDRESS NVARCHAR(100) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPORT') 
 CREATE TABLE T_SRC_EXPORT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY CHAR(1) DEFAULT ' ' NOT NULL,
FSEX CHAR(1) DEFAULT ' ' NOT NULL,
FBIRTHDATE DATETIME,
FIDNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FEVALUATETIME DATETIME,
FQUALIFYTIME DATETIME,
FWORKTIME DATETIME,
FTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FOFFICEPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTELEPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEMAIL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPOLITICALSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPROFICIENTLEVELID BIGINT DEFAULT 0 NOT NULL,
FPROFICIENTTYPEID BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FOFFICE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FJOB NVARCHAR(50) DEFAULT ' ' NOT NULL,
FJOBTITLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FVOCATIONALQUALIFICATION NVARCHAR(50) DEFAULT ' ' NOT NULL,
FWORKINGMAJOR NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FOFFICEADDRESS NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPORT_L') 
 CREATE TABLE T_SRC_EXPORT_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FOFFICE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FJOB NVARCHAR(50) DEFAULT ' ' NOT NULL,
FJOBTITLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FVOCATIONALQUALIFICATION NVARCHAR(50) DEFAULT ' ' NOT NULL,
FWORKINGMAJOR NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FOFFICEADDRESS NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPORTEDUCATION') 
 CREATE TABLE T_SRC_EXPORTEDUCATION (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FMAJOR NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEDUCATIONDEGREE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDATEFROM DATETIME,
FDATETO DATETIME,
FGRADUATESCHOOL NVARCHAR(100) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPORTEXC') 
 CREATE TABLE T_SRC_EXPORTEXC (
FDATAID BIGINT DEFAULT 0 NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPORTPROJECT') 
 CREATE TABLE T_SRC_EXPORTPROJECT (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPARTICIPATETIME DATETIME,
FBIDUNIT NVARCHAR(100) DEFAULT ' ' NOT NULL,
FBIDPROJECT NVARCHAR(100) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPORTTYPE') 
 CREATE TABLE T_SRC_EXPORTTYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPORTUSEREG') 
 CREATE TABLE T_SRC_EXPORTUSEREG (
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FDATAID BIGINT DEFAULT 0 NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FADMINORGID BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY NVARCHAR(10) DEFAULT ' ' NOT NULL,
FISASSIGN CHAR(1) DEFAULT '0' NOT NULL,
FASSIGNORGID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPORTWORK') 
 CREATE TABLE T_SRC_EXPORTWORK (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDATEFROM DATETIME,
FDATETO DATETIME,
FWORKUNIT VARCHAR(100) DEFAULT ' ' NOT NULL,
FDUTY VARCHAR(50) DEFAULT ' ' NOT NULL,
FNOTE VARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_FIELDENTRY') 
 CREATE TABLE T_SRC_FIELDENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FFIELDNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBEFORECHANGE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FAFTERCHANGE NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_FREQUENCY') 
 CREATE TABLE T_SRC_FREQUENCY (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FORIGIN NVARCHAR(30) DEFAULT ' ' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_FREQUENCYENTRY') 
 CREATE TABLE T_SRC_FREQUENCYENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUBMITUSERID BIGINT DEFAULT 0 NOT NULL,
FFREQUENCY BIGINT DEFAULT 0 NOT NULL,
FSUBMITDATE DATETIME,
FCOMPKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FSRCENTRYID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_GETCAT') 
 CREATE TABLE T_SRC_GETCAT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FDECISIONTYPE BIGINT DEFAULT 0 NOT NULL,
FPLUGIN NVARCHAR(100) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_HISTORYENTRY') 
 CREATE TABLE T_SRC_HISTORYENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FVERSION NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCHANGEREASON2 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FVALIDDATE2 NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INCREASEENTRY') 
 CREATE TABLE T_SRC_INCREASEENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCENEBILLNO3 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSCENENAME3 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEWAY3 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCATEGORY3 NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FDISTRIBUTERULE3 NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FSTATUS3 CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INDEX') 
 CREATE TABLE T_SRC_INDEX (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FINDEXCLASSID BIGINT DEFAULT 0 NOT NULL,
FPLUGINNAME VARCHAR(100) DEFAULT ' ' NOT NULL,
FINDEXDIMENSION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FINDEXRULE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FISTHRESHOLD CHAR(1) DEFAULT '0' NOT NULL,
FTHRESHOLD DECIMAL(19,6) DEFAULT 0 NOT NULL,
FPROPERTY NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INDEXCATEGORY') 
 CREATE TABLE T_SRC_INDEXCATEGORY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INDEXCLASS') 
 CREATE TABLE T_SRC_INDEXCLASS (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FLONGNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FLEVEL BIGINT DEFAULT 0 NOT NULL,
FISLEAF CHAR(1) DEFAULT '0' NOT NULL,
FPARENTID BIGINT DEFAULT 0 NOT NULL,
FBASETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FFOCUSPUR INT DEFAULT 0 NOT NULL,
FPARTIALPUR INT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFULLNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INDEXCLASS_L') 
 CREATE TABLE T_SRC_INDEXCLASS_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFULLNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INDEXENTRY') 
 CREATE TABLE T_SRC_INDEXENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FITEM NVARCHAR(255) DEFAULT ' ' NOT NULL,
FITEMVALUE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FVALUEFROM DECIMAL(19,6) DEFAULT 0 NOT NULL,
FVALUETO DECIMAL(19,6) DEFAULT 0 NOT NULL,
FITEMSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INDEXPURDEPT') 
 CREATE TABLE T_SRC_INDEXPURDEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INDEXPURGROUP') 
 CREATE TABLE T_SRC_INDEXPURGROUP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INDEXSUPENTRY') 
 CREATE TABLE T_SRC_INDEXSUPENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INVITECONFIG') 
 CREATE TABLE T_SRC_INVITECONFIG (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FSOURCETYPELD BIGINT DEFAULT 0 NOT NULL,
FPLUGINNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(510) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INVITESUPPLIER') 
 CREATE TABLE T_SRC_INVITESUPPLIER (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FLINKMAN NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFEEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISPAYFEE CHAR(1) DEFAULT '0' NOT NULL,
FISCONFIRM CHAR(1) DEFAULT '0' NOT NULL,
FISTENDER CHAR(1) DEFAULT '0' NOT NULL,
FISDISCARD CHAR(1) DEFAULT '0' NOT NULL,
FISINVITE CHAR(1) DEFAULT '0' NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDUTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEMAIL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FADDRESS NVARCHAR(100) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISQUOTE CHAR(1) DEFAULT '0' NOT NULL,
FISNEGOTIATE CHAR(1) DEFAULT '0' NOT NULL,
FISABANDON CHAR(1) DEFAULT '0' NOT NULL,
FABANDONREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_INVITESUPPLIER_TEMP') 
 CREATE TABLE T_SRC_INVITESUPPLIER_TEMP (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FISINVITE CHAR(1) DEFAULT '0' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSOURCE CHAR(1) DEFAULT ' ' NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FFEEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISPAYFEE CHAR(1) DEFAULT '0' NOT NULL,
FISCONFIRM CHAR(1) DEFAULT '0' NOT NULL,
FISTENDER CHAR(1) DEFAULT '0' NOT NULL,
FISDISCARD CHAR(1) DEFAULT '0' NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FABANDONREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISABANDON CHAR(1) DEFAULT '0' NOT NULL,
FLINKMAN NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FK_SF_TEXTFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSOCIETYCREDITCODE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ITEMSUPENTRY') 
 CREATE TABLE T_SRC_ITEMSUPENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ITEMSUPENTRY_SUP') 
 CREATE TABLE T_SRC_ITEMSUPENTRY_SUP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MANUALSCORE') 
 CREATE TABLE T_SRC_MANUALSCORE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FBIZAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBIZSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MATERIAL') 
 CREATE TABLE T_SRC_MATERIAL (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MATERIALGROUP') 
 CREATE TABLE T_SRC_MATERIALGROUP (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MEMBER') 
 CREATE TABLE T_SRC_MEMBER (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FORIGINID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FRISKINFO NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MEMBERENTRY') 
 CREATE TABLE T_SRC_MEMBERENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBIZROLEID BIGINT DEFAULT 0 NOT NULL,
FBIDDERID BIGINT DEFAULT 0 NOT NULL,
FDUTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDEPTID BIGINT DEFAULT 0 NOT NULL,
FPHONE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FEMAIL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISBENIFIT CHAR(1) DEFAULT '0' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISCLARIFY CHAR(1) DEFAULT '0' NOT NULL,
FTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISNOTIFY CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MONEYCHG') 
 CREATE TABLE T_SRC_MONEYCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISPRICE CHAR(1) DEFAULT '0' NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FISPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FISCATEGORY CHAR(1) DEFAULT '0' NOT NULL,
FISPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MONEYCHGENTRY') 
 CREATE TABLE T_SRC_MONEYCHGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FUPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FAMOUNT1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MONEYCHGSIGN') 
 CREATE TABLE T_SRC_MONEYCHGSIGN (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSIGNSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FSIGNRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MSGNOTICE') 
 CREATE TABLE T_SRC_MSGNOTICE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(20) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FBIZDATAID NVARCHAR(20) DEFAULT ' ' NOT NULL,
FMSGTEMPLATE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLIDEN NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_MULSERVICEMSG') 
 CREATE TABLE T_SRC_MULSERVICEMSG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_NEGOTIATEBILL') 
 CREATE TABLE T_SRC_NEGOTIATEBILL (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FORGID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLDATE DATETIME,
FDEADLINE DATETIME,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBIZPARTNERID BIGINT DEFAULT 0 NOT NULL,
FOPENTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FTURNS VARCHAR(2) DEFAULT ' ' NOT NULL,
FNEGOTIATETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FREPLENISHTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISQUOTEBIDOPEN CHAR(1) DEFAULT '0' NOT NULL,
FISREPLENISH CHAR(1) DEFAULT '0' NOT NULL,
FCONTENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCONTENT_TAG NCLOB,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_NEGOTIATEBILL_ORG') 
 CREATE TABLE T_SRC_NEGOTIATEBILL_ORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_NOTYEARINFO') 
 CREATE TABLE T_SRC_NOTYEARINFO (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FMATERIAL1 BIGINT DEFAULT 0 NOT NULL,
FMATERIALNAME1 NVARCHAR(100) DEFAULT ' ' NOT NULL,
FMATERIALGROUP1 BIGINT DEFAULT 0 NOT NULL,
FCATEGORY2 BIGINT DEFAULT 0 NOT NULL,
FINDICATE1 NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREQORG1 BIGINT DEFAULT 0 NOT NULL,
FREQTYPE1 BIGINT DEFAULT 0 NOT NULL,
FREQQTY2 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FQTY1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FUNIT2 BIGINT DEFAULT 0 NOT NULL,
FTAXPRICE1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT2 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FARRIVEDATE1 DATETIME,
FSUPPLIERNO1 BIGINT DEFAULT 0 NOT NULL,
FPROJECTNO1 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTNAME1 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FAPPLYNO1 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLINENUMBER1 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYSTATUS11 NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREQSOURCE11 NVARCHAR(30) DEFAULT ' ' NOT NULL,
FMATERIALMODEL1 NVARCHAR(500) DEFAULT ' ' NOT NULL,
FCHECKBOXFIELD1 CHAR(1) DEFAULT ' ' NOT NULL,
FYEARSWITCH CHAR(1) DEFAULT ' ' NOT NULL,
FSUPPLIERNAME1 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIAL1CODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSPECIALPURREASON NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSPECIALREASON NVARCHAR(300) DEFAULT ' ',
FREQORGID BIGINT DEFAULT 0 NOT NULL,
FREQDESCRIBE NVARCHAR(500) DEFAULT ' ' NOT NULL,
FCONTRACTNOLD BIGINT DEFAULT 0 NOT NULL,
FCONTRACTLINE BIGINT DEFAULT 0 NOT NULL,
FAPPLYNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIALNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FECPNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTEXTFIELD1 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FK_SF_BUSIAREA BIGINT DEFAULT 0 NOT NULL,
FK_SF_PLACE BIGINT DEFAULT 0 NOT NULL,
FK_SF_COMPANYCODE BIGINT DEFAULT 0 NOT NULL,
FK_SF_CITY BIGINT DEFAULT 0 NOT NULL,
FRFQBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_NUMBERCHANGE') 
 CREATE TABLE T_SRC_NUMBERCHANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FTEXTFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTEXTFIELD1 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNUMLINENUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNUM NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBASEDATAFIELD BIGINT DEFAULT 0 NOT NULL,
FPACKAGENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALNANE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FCATEGORYID1 BIGINT DEFAULT 0 NOT NULL,
FTEXTFIELD5 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDEMANDPROJECTLD BIGINT DEFAULT 0 NOT NULL,
FMATERIAL1ID BIGINT DEFAULT 0 NOT NULL,
FCATEGORYID3 BIGINT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FCHANGENO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYSTATUS111 NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCHECKBOXFIELD2 CHAR(1) DEFAULT ' ' NOT NULL,
FISPASS CHAR(1) DEFAULT '0' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPURLISTENTRYID NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OPENAPPLY') 
 CREATE TABLE T_SRC_OPENAPPLY (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FWINERQTY BIGINT DEFAULT 0 NOT NULL,
FNEWWINERQTY BIGINT DEFAULT 0 NOT NULL,
FTENDER BIGINT DEFAULT 0 NOT NULL,
FSYSNUM BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OPERATELOG') 
 CREATE TABLE T_SRC_OPERATELOG (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FDECISIONBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FVERSION NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSCORER BIGINT DEFAULT 0 NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OPERATELOGENTRY') 
 CREATE TABLE T_SRC_OPERATELOGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FOPERATESTAGE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FDATE DATETIME,
FOPINION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FOPERATETYPE NVARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OPINION') 
 CREATE TABLE T_SRC_OPINION (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(60) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FDECISIONBILLNO NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCOMMITTEE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSCOREROPINION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDECISIONVERSION NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDATE DATETIME,
FROLE BIGINT DEFAULT 0 NOT NULL,
FSTAGE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FOPERATETYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ORDERCHG') 
 CREATE TABLE T_SRC_ORDERCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISPRICE CHAR(1) DEFAULT '0' NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FISPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FISPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FISCATEGORY CHAR(1) DEFAULT '0' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ORDERCHGENTRY') 
 CREATE TABLE T_SRC_ORDERCHGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FUPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ORDERCHGSIGN') 
 CREATE TABLE T_SRC_ORDERCHGSIGN (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSIGNSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FSIGNRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ORGSAFTER') 
 CREATE TABLE T_SRC_ORGSAFTER (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ORGSBEFORE') 
 CREATE TABLE T_SRC_ORGSBEFORE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OUTAREA') 
 CREATE TABLE T_SRC_OUTAREA (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OUTAREA_L') 
 CREATE TABLE T_SRC_OUTAREA_L (
FPKID NVARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OUTPROCESS') 
 CREATE TABLE T_SRC_OUTPROCESS (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OUTPROCESS_L') 
 CREATE TABLE T_SRC_OUTPROCESS_L (
FPKID NVARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OVERTIMERULE') 
 CREATE TABLE T_SRC_OVERTIMERULE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNOTIFYTIME BIGINT DEFAULT 0 NOT NULL,
FABANDON BIGINT DEFAULT 0 NOT NULL,
FREMIND VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OVERTIMERULE_DEPT') 
 CREATE TABLE T_SRC_OVERTIMERULE_DEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OVERTIMERULE_L') 
 CREATE TABLE T_SRC_OVERTIMERULE_L (
FPKID NVARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_OVERTIMERULEDEPT') 
 CREATE TABLE T_SRC_OVERTIMERULEDEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PATTERN') 
 CREATE TABLE T_SRC_PATTERN (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FPROJECTD BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FVALUEFIELD NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSUMTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FRANKTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FAVGTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FVIETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FRATIOTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FRULEASSESS CHAR(1) DEFAULT ' ' NOT NULL,
FCTRLSTRATEGY CHAR(1) DEFAULT ' ' NOT NULL,
FBASESCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FSOURCETYPEID BIGINT DEFAULT 0 NOT NULL,
FWINRULEID BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FCALCRANK VARCHAR(100) DEFAULT ' ' NOT NULL,
FCALCTOTAL VARCHAR(100) DEFAULT ' ' NOT NULL,
FCALCRATIO VARCHAR(100) DEFAULT ' ' NOT NULL,
FCALCANALY VARCHAR(100) DEFAULT ' ' NOT NULL,
FSCOREFORMULA VARCHAR(1) DEFAULT ' ' NOT NULL,
FSCOREPARA DECIMAL(19,6) DEFAULT 0 NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PATTERNENTRY') 
 CREATE TABLE T_SRC_PATTERNENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FWEIGHT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PATTERNSOURCETYPE') 
 CREATE TABLE T_SRC_PATTERNSOURCETYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PAYMENT_ORG') 
 CREATE TABLE T_SRC_PAYMENT_ORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PAYMENTENTRY') 
 CREATE TABLE T_SRC_PAYMENTENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIZPARTNERID BIGINT DEFAULT 0 NOT NULL,
FPAYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPAYAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPAYDATE DATETIME,
FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FREJECTOPINION NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCONFIRMUSERID BIGINT DEFAULT 0 NOT NULL,
FCONFIRMDATE DATETIME,
FCONFIRMOPINION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREJECTUSERID BIGINT DEFAULT 0 NOT NULL,
FREJECTDATE DATETIME,
FRETURNUSERID BIGINT DEFAULT 0 NOT NULL,
FRETURNDATE DATETIME,
FRETURNOPINION NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRETURNAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFEEWAYID BIGINT DEFAULT 0 NOT NULL,
FPACKFEEITEMID BIGINT DEFAULT 0 NOT NULL,
FCFMSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCFMDATE DATETIME,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FFEEITEMID BIGINT DEFAULT 0 NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PAYMENTENTRY_FJ') 
 CREATE TABLE T_SRC_PAYMENTENTRY_FJ (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PKGAMOUNT') 
 CREATE TABLE T_SRC_PKGAMOUNT (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FPKGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPKGTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTURNS VARCHAR(30) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FRANK BIGINT DEFAULT 0 NOT NULL,
FSYSRESULT NVARCHAR(30) DEFAULT ' ' NOT NULL,
FRESULT NVARCHAR(30) DEFAULT ' ' NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PMPAPPLY') 
 CREATE TABLE T_SRC_PMPAPPLY (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FPRESERVICENUM BIGINT DEFAULT 0 NOT NULL,
FAREAPEOPLESUM BIGINT DEFAULT 0 NOT NULL,
FCOMPANYCODE BIGINT DEFAULT 0 NOT NULL,
FREQSUPPLIERNUM BIGINT DEFAULT 0 NOT NULL,
FREQENDDATE DATETIME,
FPURGROUP BIGINT DEFAULT 0 NOT NULL,
FBUSINESSDESC VARCHAR(2000) DEFAULT ' ' NOT NULL,
FPROJECTDESC VARCHAR(2000) DEFAULT ' ' NOT NULL,
FBUSITYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FBUSISTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPREDICTQTY BIGINT DEFAULT 0 NOT NULL,
FMONTHAVGQTY BIGINT DEFAULT 0 NOT NULL,
FCUREMPQTY BIGINT DEFAULT 0 NOT NULL,
FAFTERCALEMPQTY BIGINT DEFAULT 0 NOT NULL,
FCURNOOWNEDEMP BIGINT DEFAULT 0 NOT NULL,
FAFTERCALNOOWNEDEMP BIGINT DEFAULT 0 NOT NULL,
FCUROUTQTY BIGINT DEFAULT 0 NOT NULL,
FAFTERCALOUTQTY BIGINT DEFAULT 0 NOT NULL,
FSETTLEMODEL VARCHAR(30) DEFAULT ' ' NOT NULL,
FSITETYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FBIDPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FREQSTARTDATE DATETIME,
FOTHEROPERPROCE VARCHAR(100) DEFAULT ' ' NOT NULL,
FLABORCOSTPERHOUR DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISPRICECOST VARCHAR(30) DEFAULT '0' NOT NULL,
FPURORG BIGINT DEFAULT 0 NOT NULL,
FOUTAREA BIGINT DEFAULT 0 NOT NULL,
FORIGINBIDPROJECTNUM BIGINT DEFAULT 0 NOT NULL,
FECPNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSERVICETYPE BIGINT DEFAULT 0 NOT NULL,
FAREATYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FK_SF_SOURCESTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPLACE BIGINT DEFAULT 0 NOT NULL,
FBUSIAREA BIGINT DEFAULT 0 NOT NULL,
FECPAPPROVALTIME DATETIME,
FSUBMITECPTIME DATETIME,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PMPAPPLY_L') 
 CREATE TABLE T_SRC_PMPAPPLY_L (
FPKID NVARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PORGAFTER') 
 CREATE TABLE T_SRC_PORGAFTER (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PORGBEFORE') 
 CREATE TABLE T_SRC_PORGBEFORE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PORGBEFOREONE') 
 CREATE TABLE T_SRC_PORGBEFOREONE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRCHANGE') 
 CREATE TABLE T_SRC_PRCHANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSRCPROJECT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCURRENTNODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISPASSED CHAR(1) DEFAULT '0' NOT NULL,
FSRCPROJECTCODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCPROJECTNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCURRENTNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTEXTFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCBIDCHANGENUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFAILREASON NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRELEVELJUDGE') 
 CREATE TABLE T_SRC_PRELEVELJUDGE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FDECISIONTYPEID BIGINT DEFAULT 0 NOT NULL,
FDECISIONLEVELID BIGINT DEFAULT 0 NOT NULL,
FDEPARTMENTID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRELEVELJUDGE_L') 
 CREATE TABLE T_SRC_PRELEVELJUDGE_L (
FPKID NVARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRICECHG') 
 CREATE TABLE T_SRC_PRICECHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTAXTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISADD CHAR(1) DEFAULT '0' NOT NULL,
FISSRC CHAR(1) DEFAULT '0' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRICECHGENTRY') 
 CREATE TABLE T_SRC_PRICECHGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FTURNS NVARCHAR(30) DEFAULT ' ' NOT NULL,
FISNEW CHAR(1) DEFAULT '0' NOT NULL,
FPACKAGENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIDMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALNANE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FBRAND NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIALMODEL NVARCHAR(100) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDCTRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDCTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FACTPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FREBATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPERCENT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBIZAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDECREASE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FSRCENTRYID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMPKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXITEMID BIGINT DEFAULT 0 NOT NULL,
FTAXPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFEERATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRESULT CHAR(1) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRICECONFIRM') 
 CREATE TABLE T_SRC_PRICECONFIRM (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FBIZTYPEID BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBILLDATE DATETIME,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIZPARTNERID BIGINT DEFAULT 0 NOT NULL,
FCFMDATE DATETIME,
FCFMOPINION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCFMID BIGINT DEFAULT 0 NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATE BIGINT DEFAULT 0 NOT NULL,
FCFM BIGINT DEFAULT 0 NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLNAME VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRICECONFIRM_L') 
 CREATE TABLE T_SRC_PRICECONFIRM_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FBILLNAME VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRICECONFIRMCOMP') 
 CREATE TABLE T_SRC_PRICECONFIRMCOMP (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PRICECONFIRMENTRY') 
 CREATE TABLE T_SRC_PRICECONFIRMENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FUNIT BIGINT DEFAULT 0 NOT NULL,
FTAXPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONLINENUM BIGINT DEFAULT 0 NOT NULL,
FCONPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTAXPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTAXRATE BIGINT DEFAULT 0 NOT NULL,
FTOTALPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPURDATE DATETIME,
FPURREASON VARCHAR(50) DEFAULT ' ' NOT NULL,
FDEPARTMENT BIGINT DEFAULT 0 NOT NULL,
FREQUIREFLOW VARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIALNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FAREAPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAREA DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXRATE BIGINT DEFAULT 0 NOT NULL,
FDISTRICTID BIGINT DEFAULT 0 NOT NULL,
FAREAID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FNOTE VARCHAR(255) DEFAULT ' ' NOT NULL,
FLENGTH DECIMAL(23,10) DEFAULT 0 NOT NULL,
FWIDTH DECIMAL(23,10) DEFAULT 0 NOT NULL,
FHEIGHT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FLENGTHUNIT BIGINT DEFAULT 0 NOT NULL,
FSOURMATERIALLD BIGINT DEFAULT 0 NOT NULL,
FSOURCATEGORY BIGINT DEFAULT 0 NOT NULL,
FBOXCODE BIGINT DEFAULT 0 NOT NULL,
FBOXNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FTEXTURE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCARDPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICEFIELD DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDIECUTPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTHREEGAUGE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRINTREQUIRE VARCHAR(255) DEFAULT ' ' NOT NULL,
FMODELNUM VARCHAR(255) DEFAULT ' ' NOT NULL,
FMATERIALID BIGINT DEFAULT 0 NOT NULL,
FPRICE_UOM BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROCHGCONDITION') 
 CREATE TABLE T_SRC_PROCHGCONDITION (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FPLUGIN VARCHAR(100) DEFAULT ' ' NOT NULL,
FBIZNODEID BIGINT DEFAULT 0 NOT NULL,
FCHGTYPEID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROCHGHANDLER') 
 CREATE TABLE T_SRC_PROCHGHANDLER (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCHGTYPEID BIGINT DEFAULT 0 NOT NULL,
FBIZNODEID BIGINT DEFAULT 0 NOT NULL,
FPLUGIN NVARCHAR(100) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT') 
 CREATE TABLE T_SRC_PROJECT (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCTYPEID BIGINT DEFAULT 0 NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL,
FBILLDATE DATETIME,
FCURRENTNODE BIGINT DEFAULT 0 NOT NULL,
FSOURCECLASSID BIGINT DEFAULT 0 NOT NULL,
FSOURCETYPEID BIGINT DEFAULT 0 NOT NULL,
FMANAGETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FSTOPBIDDATE DATETIME,
FBIZTYPEID BIGINT DEFAULT 0 NOT NULL,
FTENDERTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FOPENTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FREPLYDATE DATETIME,
FANSWERDATE DATETIME,
FPAYENDDATE DATETIME,
FOPENDATE DATETIME,
FDECIDEDATE DATETIME,
FTAXTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSENDTENDERTIME DATETIME,
FBIDERQTY BIGINT DEFAULT 0 NOT NULL,
FWINERQTY BIGINT DEFAULT 0 NOT NULL,
FALTERQTY BIGINT DEFAULT 0 NOT NULL,
FRATIO_TEC DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRATIO_BIZ DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRATIO_OTH DECIMAL(23,10) DEFAULT 0 NOT NULL,
FWINRULEID BIGINT DEFAULT 0 NOT NULL,
FRULEASSESS CHAR(1) DEFAULT ' ' NOT NULL,
FFEEWAYID BIGINT DEFAULT 0 NOT NULL,
FFEEITEMID BIGINT DEFAULT 0 NOT NULL,
FSURPLUSAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORIGIN VARCHAR(30) DEFAULT ' ' NOT NULL,
FSCORETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FISMULTIPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FISBYPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISQUICKPUR CHAR(1) DEFAULT '0' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBIDNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_A') 
 CREATE TABLE T_SRC_PROJECT_A (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FSCENEID BIGINT DEFAULT 0 NOT NULL,
FPURDECISION CHAR(1) DEFAULT '0' NOT NULL,
FISSPECIAL CHAR(1) DEFAULT '0' NOT NULL,
FISSPLITDOC CHAR(1) DEFAULT '0' NOT NULL,
FISPAPER CHAR(1) DEFAULT '0' NOT NULL,
FCONTRACTCYCLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDECISIONBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FDECISIONNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FISMUSTAPPLY CHAR(1) DEFAULT '0' NOT NULL,
FAMOUNTRANGE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FOPENTYPEP NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDISCARDRULE NVARCHAR(255) DEFAULT ' ',
FORDERRULE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FOTHERWINRULE NVARCHAR(255) DEFAULT ' ',
FAFTERTALKRULE NVARCHAR(255) DEFAULT ' ',
FSOLEREASON CHAR(1) DEFAULT ' ' NOT NULL,
FREASONREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FOTHERRULEASSESS NVARCHAR(255) DEFAULT ' ',
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBIDADDRESS NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCESTATE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ',
FREGIONID BIGINT DEFAULT 0 NOT NULL,
FSOURCESTATEPRINT NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREASONREMARK_TAG NCLOB,
FISDISCARDBID CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_B') 
 CREATE TABLE T_SRC_PROJECT_B (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FTENDERSIDELD BIGINT DEFAULT 0 NOT NULL,
FISDISCARDBID CHAR(1) DEFAULT '0' NOT NULL,
FCHASSISTYPE BIGINT DEFAULT 0 NOT NULL,
FREGIONID BIGINT DEFAULT 0 NOT NULL,
FBUSINESSTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTANDPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFIELDNUM BIGINT DEFAULT 0 NOT NULL,
FBUSIAREA BIGINT DEFAULT 0 NOT NULL,
FSERVICETYPE BIGINT DEFAULT 0 NOT NULL,
FISADD CHAR(1) DEFAULT '0' NOT NULL,
FISITEMSUPPLIER CHAR(1) DEFAULT '0' NOT NULL,
FSOURCEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSCENEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_C') 
 CREATE TABLE T_SRC_PROJECT_C (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_D') 
 CREATE TABLE T_SRC_PROJECT_D (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIZPARTNERID BIGINT DEFAULT 0 NOT NULL,
FENROLLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_E') 
 CREATE TABLE T_SRC_PROJECT_E (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_F') 
 CREATE TABLE T_SRC_PROJECT_F (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCONDITION NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_G') 
 CREATE TABLE T_SRC_PROJECT_G (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FSENDTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_H') 
 CREATE TABLE T_SRC_PROJECT_H (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_I') 
 CREATE TABLE T_SRC_PROJECT_I (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_J') 
 CREATE TABLE T_SRC_PROJECT_J (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FFEEWAYID BIGINT DEFAULT 0 NOT NULL,
FFEEITEMID BIGINT DEFAULT 0 NOT NULL,
FFEEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_K') 
 CREATE TABLE T_SRC_PROJECT_K (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_L') 
 CREATE TABLE T_SRC_PROJECT_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FBIDNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_M') 
 CREATE TABLE T_SRC_PROJECT_M (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_N') 
 CREATE TABLE T_SRC_PROJECT_N (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_O') 
 CREATE TABLE T_SRC_PROJECT_O (
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FENROLLDATE DATETIME,
FOPENDATE DATETIME,
FRESULTDATE DATETIME,
FBIDTIME BIGINT DEFAULT 0 NOT NULL,
FREDUCETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FREDUCEPCT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FLASTTIME BIGINT DEFAULT 0 NOT NULL,
FDELAYTIME BIGINT DEFAULT 0 NOT NULL,
FBIDNUMBER BIGINT DEFAULT 0 NOT NULL,
FCASHDEPOSIT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBIDCOUNT BIGINT DEFAULT 0 NOT NULL,
FMAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMINAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FOPEN1 CHAR(1) DEFAULT ' ' NOT NULL,
FOPEN2 CHAR(1) DEFAULT ' ' NOT NULL,
FOPEN3 CHAR(1) DEFAULT ' ' NOT NULL,
FOPEN4 CHAR(1) DEFAULT ' ' NOT NULL,
FAUTOCONFIRM CHAR(1) DEFAULT ' ' NOT NULL,
FVIETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FISNEWPRICE CHAR(1) DEFAULT '0' NOT NULL,
FTENDENCY CHAR(1) DEFAULT ' ' NOT NULL,
FADDTIME BIGINT DEFAULT 0 NOT NULL,
FLASTQUOTEDATE DATETIME,
FSTOPBIDDATE DATETIME,
FRISKINFO NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FPAUSETIME DATETIME,
FBIDRESTOFTIME BIGINT DEFAULT 0 NOT NULL,
FPAUSESTARTTIME DATETIME,
FPAUSEAMT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBIDSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCHECKTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FOPINION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_P') 
 CREATE TABLE T_SRC_PROJECT_P (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_Q') 
 CREATE TABLE T_SRC_PROJECT_Q (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FISPKGSCHEME CHAR(1) DEFAULT '0' NOT NULL,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FNEGOTIATERULE CHAR(1) DEFAULT ' ' NOT NULL,
FTOPSUPPLIER BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(510) DEFAULT ' ' NOT NULL,
FISMANUALSCORE CHAR(1) DEFAULT '0' NOT NULL,
FTENDENCY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_R') 
 CREATE TABLE T_SRC_PROJECT_R (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_S') 
 CREATE TABLE T_SRC_PROJECT_S (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_T') 
 CREATE TABLE T_SRC_PROJECT_T (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FPURASSESSID BIGINT DEFAULT 0 NOT NULL,
FDECISIONSUMID BIGINT DEFAULT 0 NOT NULL,
FCFMSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FFLUCTUATEAMOUNT VARCHAR(50) DEFAULT ' ' NOT NULL,
FPRICEEFFECT DATETIME,
FPURTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FAPPROVALTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FISEDITED CHAR(1) DEFAULT '0' NOT NULL,
FPURREPORT VARCHAR(30) DEFAULT ' ' NOT NULL,
FCHASSISTYPE BIGINT DEFAULT 0 NOT NULL,
FISCREATPUR CHAR(1) DEFAULT '0' NOT NULL,
FPRICEBIZTYPE BIGINT DEFAULT 0 NOT NULL,
FCOMNUM BIGINT DEFAULT 0 NOT NULL,
FWINTIME DATETIME,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDECIDENUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDECISIONTYPE BIGINT DEFAULT 0 NOT NULL,
FDECSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCONCLUSION NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FDECIDELINK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRESULTSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISTEMPPUSH CHAR(1) DEFAULT '0' NOT NULL,
FTEMPREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISDECISIONRESULT CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_T_FJ') 
 CREATE TABLE T_SRC_PROJECT_T_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_X') 
 CREATE TABLE T_SRC_PROJECT_X (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_Y') 
 CREATE TABLE T_SRC_PROJECT_Y (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
模板 BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_Z') 
 CREATE TABLE T_SRC_PROJECT_Z (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FSCORESTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECTEND') 
 CREATE TABLE T_SRC_PROJECTEND (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECTNODE') 
 CREATE TABLE T_SRC_PROJECTNODE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBIZNODEID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FISFLOWCHART CHAR(1) DEFAULT '0' NOT NULL,
FBIZOBJECT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEXTOBJECT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECTNODESUB') 
 CREATE TABLE T_SRC_PROJECTNODESUB (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBIZNODEID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FISFLOWCHART CHAR(1) DEFAULT '0' NOT NULL,
FBIZOBJECT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEXTOBJECT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISAUDIT CHAR(1) DEFAULT '0' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECTORG') 
 CREATE TABLE T_SRC_PROJECTORG (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSRCPROJECT BIGINT DEFAULT 0 NOT NULL,
FBUSINESSSTATUS1 NVARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECTPACKAGE') 
 CREATE TABLE T_SRC_PROJECTPACKAGE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPACKAGE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FISTECOPEN CHAR(1) DEFAULT '0' NOT NULL,
FISTECASSESS CHAR(1) DEFAULT '0' NOT NULL,
FISBIZOPEN CHAR(1) DEFAULT '0' NOT NULL,
FTECOPENDATE DATETIME,
FTECASSESSDATE DATETIME,
FBIZOPENDATE DATETIME,
FTECOPENUSER BIGINT DEFAULT 0 NOT NULL,
FBIZOPENUSER BIGINT DEFAULT 0 NOT NULL,
FISNEGOPEN CHAR(1) DEFAULT '0' NOT NULL,
FNEGOPENDATE DATETIME,
FNEGOPENUSER BIGINT DEFAULT 0 NOT NULL,
FISNEGOTIATE CHAR(1) DEFAULT '0' NOT NULL,
FTURNS CHAR(1) DEFAULT ' ' NOT NULL,
FPACKFEEITEMID BIGINT DEFAULT 0 NOT NULL,
FFEEAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECTPURORG') 
 CREATE TABLE T_SRC_PROJECTPURORG (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECTTPL') 
 CREATE TABLE T_SRC_PROJECTTPL (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCOMPONENTID BIGINT DEFAULT 0 NOT NULL,
FBIZOBJECT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCTPLID NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURAPPLYSUBENTRY') 
 CREATE TABLE T_SRC_PURAPPLYSUBENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSERVICEROWITEM BIGINT DEFAULT 0 NOT NULL,
FLEASESERVICECODE BIGINT DEFAULT 0 NOT NULL,
FCARBODYNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCARPLATENO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISADJUSTDELIVERY NVARCHAR(30) DEFAULT '0' NOT NULL,
FREGISTERDATE DATETIME,
FISSPARECAR NVARCHAR(30) DEFAULT '0' NOT NULL,
FADJUSTEDMODEL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FADJUSTEDBRAND NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENGINENO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDRIVINGLICENSENO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FELECTRICPILENO NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS') 
 CREATE TABLE T_SRC_PURASSESS (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FSRCTYPEID BIGINT DEFAULT 0 NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL,
FISMULTIPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FBILLDATE DATETIME,
FCURRENTNODE BIGINT DEFAULT 0 NOT NULL,
FSUBMITECPTIME DATETIME,
FECPAPPROVALTIME DATETIME,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSOURCEENTITYID VARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUSS VARCHAR(30) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FBUSINESSTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTANDPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBUSIAREA BIGINT DEFAULT 0 NOT NULL,
FSERVICETYPE BIGINT DEFAULT 0 NOT NULL,
FBIDNAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FPROJECTNO NVARCHAR(300) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_CGZXBMFZR') 
 CREATE TABLE T_SRC_PURASSESS_CGZXBMFZR (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_COM') 
 CREATE TABLE T_SRC_PURASSESS_COM (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSQRGW NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSQBM BIGINT DEFAULT 0 NOT NULL,
FSQRQ DATETIME,
FLCBH VARCHAR(50) DEFAULT ' ' NOT NULL,
FSQRGH BIGINT DEFAULT 0 NOT NULL,
FXQSSZZ CHAR(1) DEFAULT ' ' NOT NULL,
FLCBT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FXQLX CHAR(1) DEFAULT ' ' NOT NULL,
FTSCGYY CHAR(1) DEFAULT ' ' NOT NULL,
FQTCGYYSM NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCGXPL VARCHAR(50) DEFAULT ' ' NOT NULL,
FPSBH VARCHAR(50) DEFAULT ' ' NOT NULL,
FCGJGQRS CHAR(1) DEFAULT ' ' NOT NULL,
FDJXJ CHAR(1) DEFAULT ' ' NOT NULL,
FZDFD CHAR(1) DEFAULT ' ' NOT NULL,
FXSHRY CHAR(1) DEFAULT ' ' NOT NULL,
FCGXYFS CHAR(30) DEFAULT ' ' NOT NULL,
FCGJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPLZ BIGINT DEFAULT 0 NOT NULL,
FZDJE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_COM_FJ') 
 CREATE TABLE T_SRC_PURASSESS_COM_FJ (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPACKFILETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FPACKFILENAME NVARCHAR(500) DEFAULT ' ' NOT NULL,
FPACKNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_COM_FJ1') 
 CREATE TABLE T_SRC_PURASSESS_COM_FJ1 (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_CSFZR') 
 CREATE TABLE T_SRC_PURASSESS_CSFZR (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_CYPSRY') 
 CREATE TABLE T_SRC_PURASSESS_CYPSRY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_IT') 
 CREATE TABLE T_SRC_PURASSESS_IT (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSQRGW VARCHAR(30) DEFAULT ' ' NOT NULL,
FSQBM BIGINT DEFAULT 0 NOT NULL,
FSQRQ DATETIME,
FLCBH VARCHAR(50) DEFAULT ' ' NOT NULL,
FSQRGH BIGINT DEFAULT 0 NOT NULL,
FLCBT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FITXQBM CHAR(1) DEFAULT ' ' NOT NULL,
FXQLX CHAR(1) DEFAULT ' ' NOT NULL,
FTSCGYY CHAR(1) DEFAULT ' ' NOT NULL,
FQTCGYY NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPSBH VARCHAR(50) DEFAULT ' ' NOT NULL,
FSFCGJGQRS CHAR(1) DEFAULT ' ' NOT NULL,
FCGJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDJXJ CHAR(1) DEFAULT ' ' NOT NULL,
FZDFD CHAR(1) DEFAULT ' ' NOT NULL,
FXQBM BIGINT DEFAULT 0 NOT NULL,
FCGPM VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_IT_FJ') 
 CREATE TABLE T_SRC_PURASSESS_IT_FJ (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPACKFILETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FPACKFILENAME NVARCHAR(500) DEFAULT ' ' NOT NULL,
FPACKNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_IT_FJ1') 
 CREATE TABLE T_SRC_PURASSESS_IT_FJ1 (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_L') 
 CREATE TABLE T_SRC_PURASSESS_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FBIDNAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FPROJECTNO NVARCHAR(300) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_PSRY') 
 CREATE TABLE T_SRC_PURASSESS_PSRY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_SEP') 
 CREATE TABLE T_SRC_PURASSESS_SEP (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSQRGW CHAR(1) DEFAULT ' ' NOT NULL,
FSQBM BIGINT DEFAULT 0 NOT NULL,
FSQRQ DATETIME,
FLCBH VARCHAR(50) DEFAULT ' ' NOT NULL,
FSQRGH BIGINT DEFAULT 0 NOT NULL,
FREVIEWFORM VARCHAR(50) DEFAULT ' ' NOT NULL,
FLCBT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFSCGPSLX CHAR(1) DEFAULT ' ' NOT NULL,
FBDW NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCGPSBH VARCHAR(50) DEFAULT ' ' NOT NULL,
FBDWLX CHAR(1) DEFAULT ' ' NOT NULL,
FSWLX CHAR(2) DEFAULT ' ' NOT NULL,
FQTFWLX CHAR(1) DEFAULT ' ' NOT NULL,
FSFZGPL CHAR(1) DEFAULT ' ' NOT NULL,
FXQLX CHAR(1) DEFAULT ' ' NOT NULL,
FSSQY CHAR(2) DEFAULT ' ' NOT NULL,
FBZ CHAR(1) DEFAULT ' ' NOT NULL,
FCGXYFS CHAR(2) DEFAULT ' ' NOT NULL,
FZBH VARCHAR(300) DEFAULT ' ' NOT NULL,
FSFTSCG CHAR(1) DEFAULT ' ' NOT NULL,
FTSCGYY NVARCHAR(300) DEFAULT ' ' NOT NULL,
FSFYCGJGQRS CHAR(1) DEFAULT ' ' NOT NULL,
FZYBMSPRY CHAR(1) DEFAULT ' ' NOT NULL,
FDJTPCJ CHAR(1) DEFAULT ' ' NOT NULL,
FDJTPCJBCSM NVARCHAR(255) DEFAULT ' ' NOT NULL,
FWYFWLX CHAR(1) DEFAULT ' ' NOT NULL,
FCGJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_SEP_FJ') 
 CREATE TABLE T_SRC_PURASSESS_SEP_FJ (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FFILETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FFILENAME NVARCHAR(500) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_SEP_FJ1') 
 CREATE TABLE T_SRC_PURASSESS_SEP_FJ1 (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_XQBMFZR') 
 CREATE TABLE T_SRC_PURASSESS_XQBMFZR (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_XQFZR') 
 CREATE TABLE T_SRC_PURASSESS_XQFZR (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_XQZYBMFZR') 
 CREATE TABLE T_SRC_PURASSESS_XQZYBMFZR (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_XZCSRY') 
 CREATE TABLE T_SRC_PURASSESS_XZCSRY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESS_ZJPSRY') 
 CREATE TABLE T_SRC_PURASSESS_ZJPSRY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURASSESSPROJECT') 
 CREATE TABLE T_SRC_PURASSESSPROJECT (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURBILL') 
 CREATE TABLE T_SRC_PURBILL (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FYEARAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPURGROUPID BIGINT DEFAULT 0 NOT NULL,
FPURLEADERID BIGINT DEFAULT 0 NOT NULL,
FPURCHASERID BIGINT DEFAULT 0 NOT NULL,
FPURDECISION CHAR(1) DEFAULT ' ' NOT NULL,
FREMARKS NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLDATE DATETIME,
FDECISIONID BIGINT DEFAULT 0 NOT NULL,
FDECSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FLEVELID BIGINT DEFAULT 0 NOT NULL,
FNOTREASON NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISSPECIAL CHAR(1) DEFAULT '0' NOT NULL,
FISPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FISANNUAL CHAR(1) DEFAULT '0' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBILLTYPE BIGINT DEFAULT 0 NOT NULL,
FSOURCENUM NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTITLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREQCLASS NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSUMNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRENTSUPPLIERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURBILL_L') 
 CREATE TABLE T_SRC_PURBILL_L (
FPKID NVARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(10) DEFAULT ' ' NOT NULL,
FTITLE NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLIST') 
 CREATE TABLE T_SRC_PURLIST (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(30) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(30) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FTAXTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FSUMQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORIGIN VARCHAR(30) DEFAULT ' ' NOT NULL,
FISQUICKPUR CHAR(1) DEFAULT '0' NOT NULL,
FSOURCETYPEID BIGINT DEFAULT 0 NOT NULL,
FCOSTTYPEID BIGINT DEFAULT 0 NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL,
FPURTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FMAINTAINCLAUSE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLIST_ITEM') 
 CREATE TABLE T_SRC_PURLIST_ITEM (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FITEMTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQUEST NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREPLY NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY') 
 CREATE TABLE T_SRC_PURLISTENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPACKAGENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALNANE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FMATERIALMODEL NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FUNITID BIGINT DEFAULT 0 NOT NULL,
FQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDCTRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDCTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFEERATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FREBATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDECREASE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTRANSCOST DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTURNS VARCHAR(2) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISDISCARDBID CHAR(1) DEFAULT '0' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FBIZAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRANK BIGINT DEFAULT 0 NOT NULL,
FSYSRESULT CHAR(1) DEFAULT ' ' NOT NULL,
FRESULT CHAR(1) DEFAULT ' ' NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISNEW CHAR(1) DEFAULT '0' NOT NULL,
FBIDMATERIALID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FAREAID BIGINT DEFAULT 0 NOT NULL,
FDISTRICTID BIGINT DEFAULT 0 NOT NULL,
FTAXITEMID BIGINT DEFAULT 0 NOT NULL,
FISDISCARDED CHAR(1) DEFAULT '0' NOT NULL,
FPKGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FVIEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FHISTORYPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPKGTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_A') 
 CREATE TABLE T_SRC_PURLISTENTRY_A (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_B') 
 CREATE TABLE T_SRC_PURLISTENTRY_B (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_C') 
 CREATE TABLE T_SRC_PURLISTENTRY_C (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_D') 
 CREATE TABLE T_SRC_PURLISTENTRY_D (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_E') 
 CREATE TABLE T_SRC_PURLISTENTRY_E (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FMATERIALGROUPID BIGINT DEFAULT 0 NOT NULL,
FISREUSE CHAR(1) DEFAULT '0' NOT NULL,
FLENGTH DECIMAL(23,10) DEFAULT 0 NOT NULL,
FWIDT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FHIGTH DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSPEED DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPOWER BIGINT DEFAULT 0 NOT NULL,
FPLATFORMEREA DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUTRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMATERIALTYPEID BIGINT DEFAULT 0 NOT NULL,
FELECTRICTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_F') 
 CREATE TABLE T_SRC_PURLISTENTRY_F (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FEFFECTDATE DATETIME,
FDUEDATE DATETIME,
FSITECODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBESTPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FUSDPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FAWARD CHAR(1) DEFAULT '0' NOT NULL,
FINCREASEPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBUYERNOTE NVARCHAR(512) DEFAULT ' ' NOT NULL,
FSUPPLIERNOTE NVARCHAR(512) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_FJ') 
 CREATE TABLE T_SRC_PURLISTENTRY_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_L') 
 CREATE TABLE T_SRC_PURLISTENTRY_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBIDNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_SUP') 
 CREATE TABLE T_SRC_PURLISTENTRY_SUP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_SUPFJ') 
 CREATE TABLE T_SRC_PURLISTENTRY_SUPFJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURLISTENTRY_Z') 
 CREATE TABLE T_SRC_PURLISTENTRY_Z (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSRCENTRYID VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCOMPKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FISCLONE CHAR(1) DEFAULT '0' NOT NULL,
FFIRSTRANK BIGINT DEFAULT 0 NOT NULL,
FWEIGHT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCALCVALUE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FACTPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FACTTAXPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE2 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE3 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE4 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE5 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE6 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE7 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE8 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE9 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTENDERSIDELD BIGINT DEFAULT 0 NOT NULL,
FPAYMETHOD VARCHAR(30) DEFAULT ' ' NOT NULL,
FPRICE10 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE11 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE12 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE13 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE14 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE15 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FNOTE1 NVARCHAR(500) DEFAULT ' ' NOT NULL,
FNOTE2 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNOTE3 NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNUMBER1 BIGINT DEFAULT 0 NOT NULL,
FNUMBER2 BIGINT DEFAULT 0 NOT NULL,
FPURDATE DATETIME,
FREQDEPART BIGINT DEFAULT 0 NOT NULL,
FREQFREQUENCY CHAR(1) DEFAULT ' ' NOT NULL,
FPRICE_UOM BIGINT DEFAULT 0 NOT NULL,
FBRAND NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLGORTID BIGINT DEFAULT 0 NOT NULL,
FWIDTH DECIMAL(23,10) DEFAULT 0 NOT NULL,
FLENGTH DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMINIORDERQTY BIGINT DEFAULT 0 NOT NULL,
FMINIPACKQTY BIGINT DEFAULT 0 NOT NULL,
FCONTRACT BIGINT DEFAULT 0 NOT NULL,
FHEIGHT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAREA DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAREAPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FACREAGE DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURORGCHANGE') 
 CREATE TABLE T_SRC_PURORGCHANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURORGCHANGE01') 
 CREATE TABLE T_SRC_PURORGCHANGE01 (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURORGCHANGE02') 
 CREATE TABLE T_SRC_PURORGCHANGE02 (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURORGCHG') 
 CREATE TABLE T_SRC_PURORGCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURREPORT') 
 CREATE TABLE T_SRC_PURREPORT (
FID BIGINT DEFAULT 0 NOT NULL,
FREQBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQBILLNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPECIALPUR VARCHAR(255) DEFAULT ' ' NOT NULL,
FREQPERSON VARCHAR(255) DEFAULT ' ' NOT NULL,
FREQDEPT VARCHAR(255) DEFAULT ' ' NOT NULL,
FREQPRONUM VARCHAR(255) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCHOOSEREASON VARCHAR(500) DEFAULT ' ' NOT NULL,
FPRICEREASON VARCHAR(500) DEFAULT ' ' NOT NULL,
FNOMINREASON VARCHAR(500) DEFAULT ' ' NOT NULL,
FHISTORYDATA VARCHAR(2000) DEFAULT ' ' NOT NULL,
FASSESSPROCESS VARCHAR(2000) DEFAULT ' ' NOT NULL,
FASSESSRESULT VARCHAR(2000) DEFAULT ' ' NOT NULL,
FNOTE VARCHAR(500) DEFAULT ' ' NOT NULL,
FISSPECIAL VARCHAR(50) DEFAULT '0' NOT NULL,
FISPROJECT VARCHAR(50) DEFAULT '0' NOT NULL,
FREQTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPECIALSUP VARCHAR(255) DEFAULT ' ' NOT NULL,
FAPPLYBILLNO VARCHAR(255) DEFAULT ' ' NOT NULL,
FAPPLYBILLNAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FPROLEADER VARCHAR(255) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FSOUSITUATION VARCHAR(255) DEFAULT ' ' NOT NULL,
FSIGNPERIOD VARCHAR(50) DEFAULT ' ' NOT NULL,
FORDERCYCLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FADJUSTPRICE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FREQCURRENCY BIGINT DEFAULT 0 NOT NULL,
FREPPROJECTNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FREPPROJECTNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FAMOUNTTOTAL VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXAMOUNTTOTAL VARCHAR(50) DEFAULT ' ' NOT NULL,
FRATIOTOTAL VARCHAR(50) DEFAULT ' ' NOT NULL,
FSYSCURRENCY BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURREPORTASSESS') 
 CREATE TABLE T_SRC_PURREPORTASSESS (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSRCBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCBILLNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FWINSUPPLIER VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTRACTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FWINAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FWINTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FWINORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURREPORTPROS') 
 CREATE TABLE T_SRC_PURREPORTPROS (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PURREPORTSOURCE') 
 CREATE TABLE T_SRC_PURREPORTSOURCE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSRCBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSRCBILLNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FINVITESUPPLIER NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FBIDSUPPLIER NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FNEGOTIATETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FTURNS VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_QUESTION') 
 CREATE TABLE T_SRC_QUESTION (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FRESPONDERID BIGINT DEFAULT 0 NOT NULL,
FREPLYTIME DATETIME,
FPUBLISHTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FQUESTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIZPARTNERID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPURDEPTID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCONTENT NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FREPLYCONTENT NVARCHAR(1000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_QUESTION_L') 
 CREATE TABLE T_SRC_QUESTION_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FCONTENT NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FREPLYCONTENT NVARCHAR(1000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_QUITENTRY') 
 CREATE TABLE T_SRC_QUITENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FQUITBILLNO BIGINT DEFAULT 0 NOT NULL,
FSEQ1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERNAME BIGINT DEFAULT 0 NOT NULL,
FPURDEPART BIGINT DEFAULT 0 NOT NULL,
FPURORG BIGINT DEFAULT 0 NOT NULL,
FPURCONTRACTNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FK_SF_CHECKBOXFIELD CHAR(1) DEFAULT ' ' NOT NULL,
FREMARKS VARCHAR(50) DEFAULT ' ' NOT NULL,
FISAGREE CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_QUOTE_DETAILS') 
 CREATE TABLE T_SRC_QUOTE_DETAILS (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTURNS VARCHAR(2) DEFAULT ' ' NOT NULL,
FNEGOTIATETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FNEGOTIATEDATE DATETIME,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_QUOTEBILL') 
 CREATE TABLE T_SRC_QUOTEBILL (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIZPARTNERID BIGINT DEFAULT 0 NOT NULL,
FBILLDATE DATETIME,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FTURNS VARCHAR(2) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FDEADLINE DATETIME,
FOPENTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FISADD CHAR(1) DEFAULT '0' NOT NULL,
FREPLENISHTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FNEGOTIATETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FISCOMPETE CHAR(1) DEFAULT '0' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISFINISH CHAR(1) DEFAULT '0' NOT NULL,
FVIETAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERIP VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_RATIOCHG') 
 CREATE TABLE T_SRC_RATIOCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTAXTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSUMTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUMQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISADD CHAR(1) DEFAULT '0' NOT NULL,
FISSRC CHAR(1) DEFAULT '0' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_RATIOCHGENTRY') 
 CREATE TABLE T_SRC_RATIOCHGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FTURNS VARCHAR(30) DEFAULT ' ' NOT NULL,
FISNEW CHAR(1) DEFAULT '0' NOT NULL,
FPACKAGENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FBIDMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALID BIGINT DEFAULT 0 NOT NULL,
FMATERIALNANE VARCHAR(100) DEFAULT ' ' NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FBRAND NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMATERIALMODEL NVARCHAR(100) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDCTRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDCTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FACTPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FREBATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPERCENT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBIZAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDECREASE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRESULT CHAR(1) DEFAULT ' ' NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPURLISTID BIGINT DEFAULT 0 NOT NULL,
FSRCENTRYID VARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMPKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FORDERRATIONEW DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REFERENCETYPE') 
 CREATE TABLE T_SRC_REFERENCETYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_RESDETAILS') 
 CREATE TABLE T_SRC_RESDETAILS (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FORIGIN VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REVIEWHEAD') 
 CREATE TABLE T_SRC_REVIEWHEAD (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(100) DEFAULT ' ' NOT NULL,
FPROCESSNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FPROCESSTITLE VARCHAR(100) DEFAULT ' ' NOT NULL,
FASSESSTYPE VARCHAR(100) DEFAULT ' ' NOT NULL,
FCOMMENT VARCHAR(100) DEFAULT ' ' NOT NULL,
FISSURE VARCHAR(30) DEFAULT '0' NOT NULL,
FENTITYKEY VARCHAR(100) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REVIEWMONEY') 
 CREATE TABLE T_SRC_REVIEWMONEY (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REVIEWMONEY_BODY') 
 CREATE TABLE T_SRC_REVIEWMONEY_BODY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCURRENCYTYPE BIGINT DEFAULT 0 NOT NULL,
FPURCHASEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNTRANGE VARCHAR(50) DEFAULT ' ' NOT NULL,
FISDECLINE VARCHAR(30) DEFAULT '0' NOT NULL,
FUPSANDDOWNS VARCHAR(50) DEFAULT ' ' NOT NULL,
FDECIMALFIELD1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICEDECREASE DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REVIEWTAIL') 
 CREATE TABLE T_SRC_REVIEWTAIL (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REVIEWTAIL_BODY') 
 CREATE TABLE T_SRC_REVIEWTAIL_BODY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSCORER BIGINT DEFAULT 0 NOT NULL,
FAUTHSCORER BIGINT DEFAULT 0 NOT NULL,
FNOTIFY VARCHAR(30) DEFAULT ' ' NOT NULL,
FREPLY VARCHAR(30) DEFAULT ' ' NOT NULL,
FCONFIRM VARCHAR(30) DEFAULT ' ' NOT NULL,
FCFMOPINION VARCHAR(50) DEFAULT ' ' NOT NULL,
FNOTE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_RISKSUPPLIER') 
 CREATE TABLE T_SRC_RISKSUPPLIER (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FRISKMESSAGE NVARCHAR(500) DEFAULT ' ' NOT NULL,
FDISCERNDATE DATETIME,
FNOTE NVARCHAR(255) DEFAULT ' ',
FPACKAGENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYID2 BIGINT DEFAULT 0 NOT NULL,
FRISKTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ROLE') 
 CREATE TABLE T_SRC_ROLE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FISVETOPOWER CHAR(1) DEFAULT '0' NOT NULL,
FISPOWER CHAR(1) DEFAULT '0' NOT NULL,
FISPRIVILIGE CHAR(1) DEFAULT '0' NOT NULL,
FOVERTIMERULE BIGINT DEFAULT 0 NOT NULL,
FISSCENE CHAR(1) DEFAULT '0' NOT NULL,
FREMARK VARCHAR(50) DEFAULT ' ' NOT NULL,
FISSCORER CHAR(1) DEFAULT '0' NOT NULL,
FISSCOREROPINION CHAR(1) DEFAULT '0' NOT NULL,
FISATTACH CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ROLEDEPT') 
 CREATE TABLE T_SRC_ROLEDEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ROLEENTRY') 
 CREATE TABLE T_SRC_ROLEENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCOMPONENTID BIGINT DEFAULT 0 NOT NULL,
FNOTE VARCHAR(100) DEFAULT ' ' NOT NULL,
FBIZOBJECT VARCHAR(50) DEFAULT ' ' NOT NULL,
FEXTOBJECT VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCHEME') 
 CREATE TABLE T_SRC_SCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY CHAR(1) DEFAULT ' ' NOT NULL,
FINDEXTYPEID BIGINT DEFAULT 0 NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL,
FISOFFLINE CHAR(1) DEFAULT '0' NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FOFFSET DECIMAL(19,6) DEFAULT 0 NOT NULL,
FINDEXDIMENSION NVARCHAR(255) DEFAULT ' ',
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCHEMECATEGORY') 
 CREATE TABLE T_SRC_SCHEMECATEGORY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCHEMEINDEX') 
 CREATE TABLE T_SRC_SCHEMEINDEX (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FPROPERTY CHAR(1) DEFAULT ' ' NOT NULL,
FINDEX NVARCHAR(255) DEFAULT ' ' NOT NULL,
FINDEXRULE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FINDEXCLASSID BIGINT DEFAULT 0 NOT NULL,
FSCORETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FISFORMULA CHAR(1) DEFAULT '0' NOT NULL,
FISDEDUCT CHAR(1) DEFAULT '0' NOT NULL,
FINDEXTYPEID BIGINT DEFAULT 0 NOT NULL,
FISTHRESHOLD CHAR(1) DEFAULT '0' NOT NULL,
FTHRESHOLD DECIMAL(19,6) DEFAULT 0 NOT NULL,
FISVETO CHAR(1) DEFAULT '0' NOT NULL,
FINDEXLIBID BIGINT DEFAULT 0 NOT NULL,
FINDEXDIMENSION NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCHEMEPROJECT') 
 CREATE TABLE T_SRC_SCHEMEPROJECT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCHEMEPURDEPT') 
 CREATE TABLE T_SRC_SCHEMEPURDEPT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCHEMEPURGROUP') 
 CREATE TABLE T_SRC_SCHEMEPURGROUP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCHEMEPURORG') 
 CREATE TABLE T_SRC_SCHEMEPURORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCORE') 
 CREATE TABLE T_SRC_SCORE (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) 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,
FBILLDATE DATETIME,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FSUMSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINDEXTYPEID BIGINT DEFAULT 0 NOT NULL,
FFINISHDATE DATETIME,
FINPUTSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSCORETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FBILLINDEXSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCOREDETAIL') 
 CREATE TABLE T_SRC_SCOREDETAIL (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FPARENTID BIGINT DEFAULT 0 NOT NULL,
FSCORERID BIGINT DEFAULT 0 NOT NULL,
FVALUE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSCORERWEIGHT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSCORERSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSCORED CHAR(1) DEFAULT '0' NOT NULL,
FNOTE VARCHAR(255) DEFAULT ' ' NOT NULL,
FAVERAGE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINVALID CHAR(1) DEFAULT '0' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FINDEXSCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISVETO NVARCHAR(30) DEFAULT '0' NOT NULL,
FVETO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FORIGNCREATOR BIGINT DEFAULT 0 NOT NULL,
FISOVERTHRESHOLD CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCOREENTRY') 
 CREATE TABLE T_SRC_SCOREENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FINDEXID BIGINT DEFAULT 0 NOT NULL,
FSYSSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FMANSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FWEIGHT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FFINALSCORE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FSCORED CHAR(1) DEFAULT ' ' NOT NULL,
FINDEXDIMENSION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FINDEXRULE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISTHRESHOLD CHAR(1) DEFAULT '0' NOT NULL,
FTHRESHOLD DECIMAL(19,6) DEFAULT 0 NOT NULL,
FISVETO CHAR(1) DEFAULT '0' NOT NULL,
FINDEXLIBID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SELLINVITSUP') 
 CREATE TABLE T_SRC_SELLINVITSUP (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FLINKMAN NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISINVITE CHAR(1) DEFAULT '0' NOT NULL,
FFEEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FISPAYFEE CHAR(1) DEFAULT '0' NOT NULL,
FISCONFIRM CHAR(1) DEFAULT '0' NOT NULL,
FISABANDON CHAR(1) DEFAULT '0' NOT NULL,
FISQUOTE CHAR(1) DEFAULT '0' NOT NULL,
FISTENDER CHAR(1) DEFAULT '0' NOT NULL,
FISNEGOTIATE CHAR(1) DEFAULT '0' NOT NULL,
FISDISCARD CHAR(1) DEFAULT '0' NOT NULL,
FREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTRYSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FABANDONREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SERVICEMSG') 
 CREATE TABLE T_SRC_SERVICEMSG (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNUMSORT BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SERVICETYPE') 
 CREATE TABLE T_SRC_SERVICETYPE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SETTINGTPL') 
 CREATE TABLE T_SRC_SETTINGTPL (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FSHOWTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FBIZNODEID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SIGNCHG') 
 CREATE TABLE T_SRC_SIGNCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FISPRICE CHAR(1) DEFAULT '0' NOT NULL,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FISPROJECT CHAR(1) DEFAULT '0' NOT NULL,
FISCATEGORY CHAR(1) DEFAULT '0' NOT NULL,
FISPACKAGE CHAR(1) DEFAULT '0' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SIGNCHG_FJ') 
 CREATE TABLE T_SRC_SIGNCHG_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SIGNCHGENTRY') 
 CREATE TABLE T_SRC_SIGNCHGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FUPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORDERRATIO1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SIGNCHGSIGN') 
 CREATE TABLE T_SRC_SIGNCHGSIGN (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSIGNSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FSIGNRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSIGNTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCONTRACTID BIGINT DEFAULT 0 NOT NULL,
FENTRYPARENTID1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SRMREGIONENTRY') 
 CREATE TABLE T_SRC_SRMREGIONENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPROVINCE BIGINT DEFAULT 0 NOT NULL,
FENABLESTATUS CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SRMREGIONGROUP') 
 CREATE TABLE T_SRC_SRMREGIONGROUP (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FUSEORG BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY CHAR(1) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FPURORG BIGINT DEFAULT 0 NOT NULL,
FDEPARTMENT BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SUPCERTIFICAT') 
 CREATE TABLE T_SRC_SUPCERTIFICAT (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SUPPLIER_TMP') 
 CREATE TABLE T_SRC_SUPPLIER_TMP (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SUPQUIT') 
 CREATE TABLE T_SRC_SUPQUIT (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_TEMPLETE') 
 CREATE TABLE T_SRC_TEMPLETE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_TIMECHG') 
 CREATE TABLE T_SRC_TIMECHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTOPBIDDATE DATETIME,
FNEWSTOPBIDDATE DATETIME,
FOPENDATE DATETIME,
FNEWOPENDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_TRANSFER') 
 CREATE TABLE T_SRC_TRANSFER (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_TRANSFERENTRY') 
 CREATE TABLE T_SRC_TRANSFERENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FLENGTH DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER2 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE2 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER3 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE3 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER4 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE4 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER5 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE5 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER6 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE6 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER7 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE7 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER8 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE8 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER9 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE9 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER10 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE10 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER11 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE11 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER12 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE12 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER13 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE13 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER14 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE14 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER15 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE15 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER16 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE16 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER17 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE17 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER18 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE18 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER19 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE19 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUPPLIER20 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRICE20 DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_USUALUSER') 
 CREATE TABLE T_SRC_USUALUSER (
FID BIGINT DEFAULT 0 NOT NULL,
FCOMPKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_USUALUSERENTRY') 
 CREATE TABLE T_SRC_USUALUSERENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBIDDERID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(36) DEFAULT ' ' NOT NULL,
FDUTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDEPTID BIGINT DEFAULT 0 NOT NULL,
FPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEMAIL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_VIE_DETAIL') 
 CREATE TABLE T_SRC_VIE_DETAIL (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FQUOTEDATE DATETIME,
FQUOTEAMT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FREDUCEAMT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FEXCHANGE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FLOCQUOTEAMT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FLOCREDUCEAMT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_WAITINGDEC') 
 CREATE TABLE T_SRC_WAITINGDEC (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCONTENT_TAG NCLOB
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_WINNUMCHG') 
 CREATE TABLE T_SRC_WINNUMCHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FWINERQTY INT DEFAULT 0 NOT NULL,
FNEWWINERQTY INT DEFAULT 0 NOT NULL,
FPENTITYKEY VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_YEARINFO') 
 CREATE TABLE T_SRC_YEARINFO (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCATEGORYBIG1 BIGINT DEFAULT 0 NOT NULL,
FCATEGORYSMALL1 BIGINT DEFAULT 0 NOT NULL,
FCATEGORYMID1 BIGINT DEFAULT 0 NOT NULL,
FUNIT1 BIGINT DEFAULT 0 NOT NULL,
FREQQTY1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAXAMOUNT1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FREQDESCRIBEYEAR1 VARCHAR(500) DEFAULT ' ',
FINTEGERFIELD BIGINT DEFAULT 0 NOT NULL,
FREQORG11 BIGINT DEFAULT 0 NOT NULL,
FTYPE1 BIGINT DEFAULT 0 NOT NULL,
FCOSTATTRIBUTION1 BIGINT DEFAULT 0 NOT NULL,
FSERVICEATTRIBUTES1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FISDECISION1 VARCHAR(30) DEFAULT '0' NOT NULL,
FSUPPLIERNO11 BIGINT DEFAULT 0 NOT NULL,
FPROJECTNO11 VARCHAR(50) DEFAULT ' ' NOT NULL,
FPROJECTNAME11 VARCHAR(50) DEFAULT ' ' NOT NULL,
FAPPLYNO11 VARCHAR(50) DEFAULT ' ' NOT NULL,
FLINENUMBER11 VARCHAR(50) DEFAULT ' ' NOT NULL,
FREQSOURCE1 VARCHAR(30) DEFAULT ' ' NOT NULL,
FENTRYSTATUS1 VARCHAR(30) DEFAULT ' ' NOT NULL,
FCHECKBOXFIELD CHAR(1) DEFAULT ' ' NOT NULL,
FYEARSWITCH1 CHAR(1) DEFAULT ' ' NOT NULL,
FCATEGORY3 BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERNAME11 VARCHAR(50) DEFAULT ' ' NOT NULL,
FDEMANDNUMBER BIGINT DEFAULT 0 NOT NULL,
FQTY2 BIGINT DEFAULT 0 NOT NULL,
FLD VARCHAR(50) DEFAULT ' ' NOT NULL,
FCATEGORY3CODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCATEGORY3NAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPECIALREASONYEAR VARCHAR(50) DEFAULT ' ' NOT NULL,
FSPECIALREASON11 VARCHAR(300) DEFAULT ' ',
FSERVICEATTRIBUTES VARCHAR(30) DEFAULT ' ' NOT NULL,
FTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FBIGINSMALLLD BIGINT DEFAULT 0 NOT NULL,
FUNIT1UNIT1 BIGINT DEFAULT 0 NOT NULL
);



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