|
|
|
|
--ͨѶ<EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_item') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_item
|
|
|
|
|
|
|
|
|
|
create table t_int_item (
|
|
|
|
|
typecode varchar(10) not null,
|
|
|
|
|
typename varchar(20) not null,
|
|
|
|
|
itemcode varchar(10) not null,
|
|
|
|
|
itemname varchar(100) not null,
|
|
|
|
|
lastcomtime varchar(20) null,
|
|
|
|
|
lastcomresult varchar(10) null,
|
|
|
|
|
remark varchar(1000) null
|
|
|
|
|
constraint pk_t_int_item primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
typecode,itemcode
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--ͨѶ<EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_log') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_log
|
|
|
|
|
|
|
|
|
|
create table t_int_log (
|
|
|
|
|
serialno int not null identity(1,1),
|
|
|
|
|
typecode varchar(10) not null,
|
|
|
|
|
itemcode varchar(10) not null,
|
|
|
|
|
orgcode varchar(10) not null default '*',
|
|
|
|
|
comguid bigint not null default 0,
|
|
|
|
|
logdate varchar(10) not null,
|
|
|
|
|
logtime varchar(10) not null,
|
|
|
|
|
logtype varchar(10) not null,
|
|
|
|
|
logmsg varchar(5000) null,
|
|
|
|
|
sessioncode varchar(20) null,
|
|
|
|
|
constraint pk_t_int_log primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
serialno
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_log on t_int_log (typecode,itemcode,orgcode,comguid,logdate,logtime,logtype,sessioncode)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_drysalesinfo') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_drysalesinfo
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_drysalesinfo (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
WERKS varchar(10) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
ZYWDAT varchar(10) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
ZCXLX varchar(10) null,
|
|
|
|
|
ZJYFS varchar(10) null,
|
|
|
|
|
VVTYP varchar(10) null,
|
|
|
|
|
MATNR varchar(20) null,
|
|
|
|
|
MWSKZ varchar(10) null,
|
|
|
|
|
MENGE numeric(19,4) not null default(0),
|
|
|
|
|
MEINS varchar(10) null,
|
|
|
|
|
PRICE numeric(19,4) not null default(0),
|
|
|
|
|
SKTAK numeric(19,4) not null default(0),
|
|
|
|
|
SKTBT numeric(19,4) not null default(0),
|
|
|
|
|
TMWSTS numeric(19,4) not null default(0),
|
|
|
|
|
GTTAX numeric(19,4) not null default(0),
|
|
|
|
|
WAERS varchar(10) null,
|
|
|
|
|
ZTOLAMT numeric(19,4) not null default(0),
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
ZGZDAT varchar(10) null,
|
|
|
|
|
ZFNAME varchar(20) null,
|
|
|
|
|
ZUNFLG varchar(10) null,
|
|
|
|
|
ZYZLX varchar(10) null,
|
|
|
|
|
VBELN varchar(20) null,
|
|
|
|
|
KUNNR varchar(20) null,
|
|
|
|
|
KUNWE varchar(10) null,
|
|
|
|
|
ZRSV01 varchar(20) null,
|
|
|
|
|
ZRSV02 varchar(20) null,
|
|
|
|
|
ZRSV03 varchar(20) null,
|
|
|
|
|
ZRSV04 varchar(20) null,
|
|
|
|
|
ZRSV05 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_drysalesinfo primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_drysalesinfo on t_int_sap_drysalesinfo (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO,ZJYFS)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_paymentreportinfo') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_paymentreportinfo
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_paymentreportinfo (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
KUNNR varchar(20) null,
|
|
|
|
|
SKART varchar(10) null,
|
|
|
|
|
ZYYDAT varchar(10) null,
|
|
|
|
|
WRBTR numeric(19,4) not null default(0),
|
|
|
|
|
WEARS varchar(10) null,
|
|
|
|
|
ZCXBS varchar(10) null,
|
|
|
|
|
ZBYZD1 varchar(20) null,
|
|
|
|
|
ZBYZD2 varchar(20) null,
|
|
|
|
|
ZBYZD3 varchar(20) null,
|
|
|
|
|
ZBYZD4 varchar(20) null,
|
|
|
|
|
ZBYZD5 varchar(20) null,
|
|
|
|
|
ZBYZD6 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_paymentreportinfo primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_paymentreportinfo on t_int_sap_paymentreportinfo (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><EFBFBD>ɴ<EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_cashpaymentinfo') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_cashpaymentinfo
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_cashpaymentinfo (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
KUNNR varchar(20) null,
|
|
|
|
|
SKART varchar(10) null,
|
|
|
|
|
ZYRDAT varchar(10) null,
|
|
|
|
|
JCRQ varchar(10) null,
|
|
|
|
|
WRBTR numeric(19,4) not null default(0),
|
|
|
|
|
JCYYK numeric(19,4) not null default(0),
|
|
|
|
|
SYBTR numeric(19,4) not null default(0),
|
|
|
|
|
CDYSK numeric(19,4) not null default(0),
|
|
|
|
|
JKDOC varchar(20) null,
|
|
|
|
|
ZGZDAT varchar(10) null,
|
|
|
|
|
WAERS varchar(10) null,
|
|
|
|
|
ZCXBS varchar(10) null,
|
|
|
|
|
ZBYZD1 varchar(20) null,
|
|
|
|
|
ZBYZD2 varchar(20) null,
|
|
|
|
|
ZBYZD3 varchar(20) null,
|
|
|
|
|
ZBYZD4 varchar(20) null,
|
|
|
|
|
ZBYZD5 varchar(20) null,
|
|
|
|
|
ZBYZD6 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_cashpaymentinfo primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_cashpaymentinfo on t_int_sap_cashpaymentinfo (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_promotion') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_promotion
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_promotion (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
WERKS varchar(10) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
ZYWDAT varchar(10) null,
|
|
|
|
|
ZJYFS varchar(10) null,
|
|
|
|
|
ZCXLX varchar(10) null,
|
|
|
|
|
ZCXSP varchar(20) null,
|
|
|
|
|
ZCXSL numeric(19,4) not null default(0),
|
|
|
|
|
ZDW varchar(10) null,
|
|
|
|
|
ZZKJE numeric(19,4) not null default(0),
|
|
|
|
|
ZZKSE numeric(19,4) not null default(0),
|
|
|
|
|
ZSL varchar(10) null,
|
|
|
|
|
WAERS varchar(10) null,
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
ZGZDAT varchar(10) null,
|
|
|
|
|
ZCXBS varchar(10) null,
|
|
|
|
|
ZBYZD1 varchar(20) null,
|
|
|
|
|
ZBYZD2 varchar(20) null,
|
|
|
|
|
ZBYZD3 varchar(20) null,
|
|
|
|
|
ZBYZD4 varchar(20) null,
|
|
|
|
|
ZBYZD5 varchar(20) null,
|
|
|
|
|
ZBYZD6 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_promotion primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_promotion on t_int_sap_promotion (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD>Ͳɹ<EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_drypurchaseinfo') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_drypurchaseinfo
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_drypurchaseinfo (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
WERKS varchar(10) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
MATNR varchar(20) null,
|
|
|
|
|
ZYWDAT varchar(10) null,
|
|
|
|
|
LIFNR varchar(20) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
WAERS varchar(10) null,
|
|
|
|
|
ZJYFS varchar(10) null,
|
|
|
|
|
SLTWR numeric(19,4) not null default(0),
|
|
|
|
|
DWERT numeric(19,4) not null default(0),
|
|
|
|
|
MENGE numeric(19,4) not null default(0),
|
|
|
|
|
MEINS varchar(10) null,
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
ZGZDAT varchar(10) null,
|
|
|
|
|
ZFNAME varchar(20) null,
|
|
|
|
|
ZUNFLG varchar(10) null,
|
|
|
|
|
ZYZLX varchar(10) null,
|
|
|
|
|
ZRSV01 varchar(20) null,
|
|
|
|
|
ZRSV02 varchar(20) null,
|
|
|
|
|
ZRSV03 varchar(20) null,
|
|
|
|
|
ZRSV04 varchar(20) null,
|
|
|
|
|
ZRSV05 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_drypurchaseinfo primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_drypurchaseinfo on t_int_sap_drypurchaseinfo (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_stockconsumer') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_stockconsumer
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_stockconsumer (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO1 varchar(20) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
WERKS varchar(10) null,
|
|
|
|
|
ZHQBS varchar(10) null,
|
|
|
|
|
KOSTL varchar(20) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
ZLYLB varchar(10) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
BLDAT varchar(10) null,
|
|
|
|
|
MATNR varchar(20) null,
|
|
|
|
|
SLTWR numeric(19,4) not null default(0),
|
|
|
|
|
ZXSZJ numeric(19,4) not null default(0),
|
|
|
|
|
MENGE numeric(19,4) not null default(0),
|
|
|
|
|
WAERS varchar(10) null,
|
|
|
|
|
MEINS varchar(10) null,
|
|
|
|
|
MWSKZ varchar(10) null,
|
|
|
|
|
TSDAT varchar(10) null,
|
|
|
|
|
BUDAT varchar(10) null,
|
|
|
|
|
UNFLG varchar(10) null,
|
|
|
|
|
SGTXT varchar(100) null,
|
|
|
|
|
ZPLXH varchar(20) null,
|
|
|
|
|
FNAME varchar(20) null,
|
|
|
|
|
ZBYZD1 varchar(20) null,
|
|
|
|
|
ZBYZD2 varchar(20) null,
|
|
|
|
|
ZBYZD3 varchar(20) null,
|
|
|
|
|
ZBYZD4 varchar(20) null,
|
|
|
|
|
ZBYZD5 varchar(20) null,
|
|
|
|
|
ZBYZD6 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_stockconsumer primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_stockconsumer on t_int_sap_stockconsumer (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_inventorychginfo') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_inventorychginfo
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_inventorychginfo (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
WERKS varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
ZYWDAT varchar(10) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
MATNR varchar(20) null,
|
|
|
|
|
ZJYFS varchar(10) null,
|
|
|
|
|
SLTWR numeric(19,4) not null default(0),
|
|
|
|
|
WEARS varchar(10) null,
|
|
|
|
|
MENGE numeric(19,4) not null default(0),
|
|
|
|
|
DWERT numeric(19,4) not null default(0),
|
|
|
|
|
MEINS varchar(10) null,
|
|
|
|
|
MWSKZ varchar(10) null,
|
|
|
|
|
TMWSTS numeric(19,4) not null default(0),
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
ZGZDAT varchar(10) null,
|
|
|
|
|
UNFLG varchar(10) null,
|
|
|
|
|
ZCSBS varchar(10) null,
|
|
|
|
|
ZYZLX varchar(10) null,
|
|
|
|
|
VBELN varchar(20) null,
|
|
|
|
|
KUNNR varchar(10) null,
|
|
|
|
|
KUNWE varchar(10) null,
|
|
|
|
|
ZRSV01 varchar(20) null,
|
|
|
|
|
ZRSV02 varchar(20) null,
|
|
|
|
|
ZRSV03 varchar(20) null,
|
|
|
|
|
ZRSV04 varchar(20) null,
|
|
|
|
|
ZRSV05 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_inventorychginfo primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_inventorychginfo on t_int_sap_inventorychginfo (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO,ZJYFS)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_drydeliveryinfo') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_drydeliveryinfo
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_drydeliveryinfo (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
SDWRK varchar(10) null,
|
|
|
|
|
SPRCTR varchar(20) null,
|
|
|
|
|
WERKS varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
ZYWDAT varchar(10) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
MATNR varchar(20) null,
|
|
|
|
|
ZJYFS varchar(10) null,
|
|
|
|
|
DMBTR numeric(19,4) not null default(0),
|
|
|
|
|
WAERS varchar(10) null,
|
|
|
|
|
MENGE numeric(19,4) not null default(0),
|
|
|
|
|
DWERT numeric(19,4) not null default(0),
|
|
|
|
|
PCDIF varchar(10) null,
|
|
|
|
|
MEINS varchar(10) null,
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
ZGZDAT varchar(10) null,
|
|
|
|
|
ZFNAME varchar(20) null,
|
|
|
|
|
ZUNFLG varchar(10) null,
|
|
|
|
|
ZYZLX varchar(10) null,
|
|
|
|
|
ZRSV01 varchar(20) null,
|
|
|
|
|
ZRSV02 varchar(20) null,
|
|
|
|
|
ZRSV03 varchar(20) null,
|
|
|
|
|
ZRSV04 varchar(20) null,
|
|
|
|
|
ZRSV05 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_drydeliveryinfo primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_drydeliveryinfo on t_int_sap_drydeliveryinfo (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_drytransferinfo') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_drytransferinfo
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_drytransferinfo (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
SDWRK varchar(10) null,
|
|
|
|
|
SPRCTR varchar(20) null,
|
|
|
|
|
WERKS varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
ZYWDAT varchar(10) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
MATNR varchar(20) null,
|
|
|
|
|
ZJYFS varchar(10) null,
|
|
|
|
|
SLTWR numeric(19,4) not null default(0),
|
|
|
|
|
WEARS varchar(10) null,
|
|
|
|
|
MENGE numeric(19,4) not null default(0),
|
|
|
|
|
DWERT numeric(19,4) not null default(0),
|
|
|
|
|
PCDIF varchar(10) null,
|
|
|
|
|
MEINS varchar(10) null,
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
UNFLG varchar(10) null,
|
|
|
|
|
ZYZLX varchar(10) null,
|
|
|
|
|
ZRSV01 varchar(20) null,
|
|
|
|
|
ZRSV02 varchar(20) null,
|
|
|
|
|
ZRSV03 varchar(20) null,
|
|
|
|
|
ZRSV04 varchar(20) null,
|
|
|
|
|
ZRSV05 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_drytransferinfo primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_drytransferinfo on t_int_sap_drytransferinfo (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_dryaccountingforvendorinfo') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_dryaccountingforvendorinfo
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_dryaccountingforvendorinfo (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
LIFNR varchar(20) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
ZSIGN varchar(10) null,
|
|
|
|
|
ZYWDAT varchar(10) null,
|
|
|
|
|
AWKEY varchar(20) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
INVNR varchar(20) null,
|
|
|
|
|
WERKS varchar(10) null,
|
|
|
|
|
PRCTR varchar(20) null,
|
|
|
|
|
MATNR varchar(20) null,
|
|
|
|
|
ZJYFS varchar(10) null,
|
|
|
|
|
SLTWR numeric(19,4) not null default(0),
|
|
|
|
|
WEARS varchar(10) null,
|
|
|
|
|
MENGE numeric(19,4) not null default(0),
|
|
|
|
|
MEINS varchar(10) null,
|
|
|
|
|
KOSTN numeric(19,4) not null default(0),
|
|
|
|
|
SMGVO numeric(19,4) not null default(0),
|
|
|
|
|
MWSKZ varchar(10) null,
|
|
|
|
|
TMWSTS numeric(19,4) not null default(0),
|
|
|
|
|
ZTSDAT varchar(10) null,
|
|
|
|
|
ZGZDAT varchar(10) null,
|
|
|
|
|
UNFLG varchar(10) null,
|
|
|
|
|
ZCSBS varchar(10) null,
|
|
|
|
|
ZYZLX varchar(10) null,
|
|
|
|
|
ZRSV01 varchar(20) null,
|
|
|
|
|
ZRSV02 varchar(20) null,
|
|
|
|
|
ZRSV03 varchar(20) null,
|
|
|
|
|
ZRSV04 varchar(20) null,
|
|
|
|
|
ZRSV05 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_dryaccountingforvendorinfo primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_dryaccountingforvendorinfo on t_int_sap_dryaccountingforvendorinfo (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if exists (select * from sysobjects where id = OBJECT_ID(N't_int_sap_dryvendorfeebilling') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
drop table t_int_sap_dryvendorfeebilling
|
|
|
|
|
|
|
|
|
|
create table t_int_sap_dryvendorfeebilling (
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
CREATEDATE varchar(20) not null,
|
|
|
|
|
DATASTATUS varchar(1) not null default '0',
|
|
|
|
|
COMGUID bigint not null default 0,
|
|
|
|
|
STATUS varchar(10) null,
|
|
|
|
|
MESSAGE varchar(1000) null,
|
|
|
|
|
SEND_MSGID varchar(20) null,
|
|
|
|
|
IFTYPE varchar(10) null,
|
|
|
|
|
DOCNO varchar(20) null,
|
|
|
|
|
BUKRS varchar(10) null,
|
|
|
|
|
ZHQBS varchar(10) null,
|
|
|
|
|
LIFNR varchar(20) null,
|
|
|
|
|
MATNR varchar(20) null,
|
|
|
|
|
ZTYPE varchar(10) null,
|
|
|
|
|
BLDAT varchar(10) null,
|
|
|
|
|
TSDAT varchar(10) null,
|
|
|
|
|
BUDAT varchar(10) null,
|
|
|
|
|
SLTWR numeric(19,4) not null default(0),
|
|
|
|
|
MWSKZ varchar(10) null,
|
|
|
|
|
ZSHJE numeric(19,4) not null default(0),
|
|
|
|
|
WAERS varchar(10) null,
|
|
|
|
|
UNFLG varchar(10) null,
|
|
|
|
|
ZRSV01 varchar(20) null,
|
|
|
|
|
ZRSV02 varchar(20) null,
|
|
|
|
|
ZRSV03 varchar(20) null,
|
|
|
|
|
ZRSV04 varchar(20) null,
|
|
|
|
|
ZRSV05 varchar(20) null,
|
|
|
|
|
constraint pk_t_int_sap_dryvendorfeebilling primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
create index ix_t_int_sap_dryvendorfeebilling on t_int_sap_dryvendorfeebilling (DATASTATUS,COMGUID,STATUS,IFTYPE,DOCNO)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
if not exists (select * from sysobjects where id = OBJECT_ID(N't_flow_itemdsc') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
create table t_flow_itemdsc(posno varchar(6) not null,
|
|
|
|
|
orgcode varchar(10) not null,
|
|
|
|
|
sdate varchar(10) not null,
|
|
|
|
|
stime varchar(8) not null,
|
|
|
|
|
serialno varchar(20) not null,
|
|
|
|
|
pageno varchar(2) not null,
|
|
|
|
|
itemno varchar(5) not null,
|
|
|
|
|
plucode varchar(20) not null,
|
|
|
|
|
itemdscno varchar(5) not null,
|
|
|
|
|
trantype varchar(1) not null,
|
|
|
|
|
pludsc numeric(19,4) not null default(0),
|
|
|
|
|
pludsctype varchar(2) null,
|
|
|
|
|
dscbillno varchar(20) null,
|
|
|
|
|
accdate varchar(10) null,
|
|
|
|
|
tradedate varchar(10) null,
|
|
|
|
|
orderstatus varchar(1) not null default ('1')
|
|
|
|
|
constraint pk_flow_itemdsc primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
posno,sdate,stime,serialno,pageno,itemno,plucode,trantype,orgcode,itemdscno
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
if not exists (select * from sysobjects where id = OBJECT_ID(N't_int_flow_item') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
create table t_int_flow_item (
|
|
|
|
|
PosNo varchar(6) not null,
|
|
|
|
|
OrgCode varchar(10) not null,
|
|
|
|
|
SDate varchar(10) not null,
|
|
|
|
|
STime varchar(8) not null,
|
|
|
|
|
SerialNo varchar(50) not null,
|
|
|
|
|
PageNo varchar(2) not null,
|
|
|
|
|
ItemNo varchar(5) default '' not null,
|
|
|
|
|
TranType varchar(1) not null,
|
|
|
|
|
CshCode varchar(6) null,
|
|
|
|
|
clkcode varchar(6) null,
|
|
|
|
|
ItemType varchar(1) not null,
|
|
|
|
|
PluCode varchar(20) not null,
|
|
|
|
|
BarCode varchar(20) null,
|
|
|
|
|
PluName varchar(40) null,
|
|
|
|
|
DepCode varchar(10) not null,
|
|
|
|
|
ClsCode varchar(10) null,
|
|
|
|
|
PluPrice numeric(19,4) default 0 not null,
|
|
|
|
|
PluQty numeric(19,4) default 0 not null,
|
|
|
|
|
PluDsc numeric(19,4) default 0 not null,
|
|
|
|
|
PluTotal numeric(19,4) default 0 not null,
|
|
|
|
|
PluDscType varchar(1) null,
|
|
|
|
|
AccDate varchar(10) null,
|
|
|
|
|
OrderCode varchar(10) null,
|
|
|
|
|
TradeDate varchar(10) null,
|
|
|
|
|
IsBalanced varchar(1) default '' null,
|
|
|
|
|
ColorCode varchar(10) null,
|
|
|
|
|
ColorName varchar(20) null,
|
|
|
|
|
SizeCode varchar(10) null,
|
|
|
|
|
SizeName varchar(20) null,
|
|
|
|
|
YhPrice numeric(19,4) default 0 not null,
|
|
|
|
|
InputCode varchar(20) null,
|
|
|
|
|
Remark varchar(250) null,
|
|
|
|
|
GroupCode varchar(20) null,
|
|
|
|
|
plunum numeric(19,4) default 1 not null,
|
|
|
|
|
constraint PK_t_int_flow_item primary key nonclustered (PosNo,SDate,STime,SerialNo,PageNo,ItemNo,TranType,OrgCode)
|
|
|
|
|
);
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
if not exists (select * from sysobjects where id = OBJECT_ID(N't_int_flow_pay') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
create table t_int_flow_pay (
|
|
|
|
|
PosNo varchar(6) not null,
|
|
|
|
|
OrgCode varchar(10) not null,
|
|
|
|
|
SDate varchar(10) not null,
|
|
|
|
|
STime varchar(8) not null,
|
|
|
|
|
SerialNo varchar(50) not null,
|
|
|
|
|
ItemNo varchar(4) not null,
|
|
|
|
|
PayFlag varchar(4) not null,
|
|
|
|
|
TranType varchar(1) not null,
|
|
|
|
|
CshCode varchar(6) not null,
|
|
|
|
|
Amount numeric(19,4) default 0 not null,
|
|
|
|
|
PayAmount numeric(19,4) default 0 not null,
|
|
|
|
|
PayID varchar(100) null,
|
|
|
|
|
AccDate varchar(10) null,
|
|
|
|
|
TradeDate varchar(10) null,
|
|
|
|
|
IsBalanced varchar(1) default '' null,
|
|
|
|
|
AliTradeNo varchar(100) null,
|
|
|
|
|
constraint Pk_t_int_flow_pay primary key nonclustered (PosNo,SDate,STime,SerialNo,ItemNo,TranType,OrgCode)
|
|
|
|
|
);
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
if not exists (select * from sysobjects where id = OBJECT_ID(N't_int_flow_total') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
create table t_int_flow_total (
|
|
|
|
|
PosNo varchar(6) not null,
|
|
|
|
|
OrgCode varchar(10) not null,
|
|
|
|
|
SDate varchar(10) not null,
|
|
|
|
|
STime varchar(8) not null,
|
|
|
|
|
SerialNo varchar(50) not null,
|
|
|
|
|
TranType varchar(1) not null,
|
|
|
|
|
CshCode varchar(6) not null,
|
|
|
|
|
TotalDsc numeric(19,4) default 0 not null,
|
|
|
|
|
Total numeric(19,4) default 0 not null,
|
|
|
|
|
TotalPay numeric(19,4) default 0 not null,
|
|
|
|
|
[Change] numeric(19,4) default 0 not null,
|
|
|
|
|
CustFlag varchar(1) default 0 null,
|
|
|
|
|
CustCode varchar(20) null,
|
|
|
|
|
AuthNum varchar(10) null,
|
|
|
|
|
MemoStr varchar(10) null,
|
|
|
|
|
Customer varchar(20) null,
|
|
|
|
|
AccDate varchar(10) null,
|
|
|
|
|
TradeDate varchar(10) null,
|
|
|
|
|
IsBalanced varchar(1) default '' null,
|
|
|
|
|
EcwChange numeric(19,4) default 0 not null,
|
|
|
|
|
EBillNo varchar(32) null,
|
|
|
|
|
TaxNo varchar(20) null,
|
|
|
|
|
RoundAmt numeric(19,4) default 0 not null,
|
|
|
|
|
EPosMobile varchar(20) null,
|
|
|
|
|
RtnRefNo varchar(100) null,
|
|
|
|
|
IsRtned varchar(1) default '0' null,
|
|
|
|
|
SendFlg varchar(1) default '0' null,
|
|
|
|
|
Remark varchar(200) null,
|
|
|
|
|
InvCustId varchar(200) null,
|
|
|
|
|
InvCust varchar(200) null,
|
|
|
|
|
DBSign varchar(100) null,
|
|
|
|
|
shiftno varchar(20) null,
|
|
|
|
|
constraint Pk_t_int_flow_total primary key nonclustered (PosNo,SDate,STime,SerialNo,TranType,OrgCode)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if not exists (select * from sysobjects where id = OBJECT_ID(N't_int_flow_itemdsc') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
create table t_int_flow_itemdsc(posno varchar(6) not null,
|
|
|
|
|
orgcode varchar(10) not null,
|
|
|
|
|
sdate varchar(10) not null,
|
|
|
|
|
stime varchar(8) not null,
|
|
|
|
|
serialno varchar(20) not null,
|
|
|
|
|
pageno varchar(2) not null,
|
|
|
|
|
itemno varchar(5) not null,
|
|
|
|
|
plucode varchar(20) not null,
|
|
|
|
|
itemdscno varchar(5) not null,
|
|
|
|
|
trantype varchar(1) not null,
|
|
|
|
|
pludsc numeric(19,4) not null default(0),
|
|
|
|
|
pludsctype varchar(2) null,
|
|
|
|
|
dscbillno varchar(20) null,
|
|
|
|
|
accdate varchar(10) null,
|
|
|
|
|
tradedate varchar(10) null,
|
|
|
|
|
orderstatus varchar(1) not null default ('1')
|
|
|
|
|
constraint pk_t_int_flow_itemdsc primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
posno,sdate,stime,serialno,pageno,itemno,trantype,orgcode,itemdscno
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|
|
|
|
|
|
|
|
|
|
if not exists (select * from sysobjects where id = OBJECT_ID(N't_int_flow_pay_deily') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
|
|
|
|
|
create table t_int_flow_pay_deily(
|
|
|
|
|
SERIALNO int not null identity(100001,1),
|
|
|
|
|
WERKS varchar(10) not null,
|
|
|
|
|
BUSINESS_DATE varchar(10) not null,
|
|
|
|
|
CAL_DATETIME varchar(20) not null,
|
|
|
|
|
MOP_ID varchar(10) not null,
|
|
|
|
|
ITEM_ID varchar(20) not null,
|
|
|
|
|
AMOUNT numeric(19,4) not null default(0),
|
|
|
|
|
TOTAL_VOLU numeric(19,4) not null default(0),
|
|
|
|
|
TOTAL_VOLU_STD numeric(19,4) not null default(0),
|
|
|
|
|
PRICE numeric(19,4) not null default(0),
|
|
|
|
|
IF_ATG varchar(10) null,
|
|
|
|
|
constraint pk_t_int_flow_pay_deily primary key nonclustered
|
|
|
|
|
(
|
|
|
|
|
SERIALNO,WERKS,BUSINESS_DATE,MOP_ID
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
go
|