123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436 |
- create database wtu
- go
- use wtu
- go
- --档案传递信息表
- create table dbo.transtime
- (
- entitytype nvarchar(60) not null, --档案类型
- lasttime datetime --最后传递时间
- )
- go
- --错误信息表
- create table dbo.errmsg
- (
- sysid int identity(1,1),
- operdate datetime default(getdate()),
- opertype nvarchar(60) not null,
- msg nvarchar(4000),
- sources nvarchar(400),
- errorflag int default(0) --0,从中间库到业务系统,1,从业务系统到中间库
- )
- go
- --旺店通日志表
- create table dbo.wdtlogs
- (
- sysid int identity(1,1),
- operdate datetime default(getdate()),
- opertype nvarchar(60) not null,
- args nvarchar(4000) null,
- returncode nvarchar(10) null,
- msg nvarchar(400) null
- )
- --存货
- CREATE TABLE dbo.Inventory(
- sysid int identity(1,1),
- cInvCode nvarchar(60) NOT NULL,
- cInvName nvarchar(255) NULL,
- cInvStd nvarchar(255) NULL,
- bPurchase bit NOT NULL,
- iTaxRate float NULL,
- importdate datetime null default(getdate()),
- processdate datetime null,
- cComUnitCode nvarchar(35) null,
- processflag bit default(0)
- )
- GO
- --库存期初
- create table dbo.stock(
- sysid int identity(1,1),
- cInvCode nvarchar(60) NOT NULL,
- cwhcode nvarchar(30) not null,
- qty decimal(26,4) not null default(0),
- price decimal(13,4) not null default(0),
- importdate datetime null default(getdate()),
- processflag int default(0)
- )
- go
- --仓库
- CREATE TABLE dbo.Warehouse(
- sysid int identity(1,1),
- cWhCode nvarchar(10) NOT NULL,
- cWhName nvarchar(20) NULL,
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0)
- )
- --供应商
- CREATE TABLE dbo.Vendor(
- sysid int identity(1,1),
- cVenCode nvarchar(20) NOT NULL,
- cVenName nvarchar(98) NULL,
- cVenPhone nvarchar(100) null,
- cVenAbbName nvarchar(60) NOT NULL,
- cVenPerson [nvarchar](50) NULL,
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0)
- )
- GO
- --其他入库单
- CREATE TABLE [dbo].[RdRecord08](
- sysid int identity(1,1),
- [ID] [bigint] NOT NULL,
- [bRdFlag] [tinyint] NOT NULL,
- [cVouchType] [nvarchar](2) NOT NULL,
- [cBusType] [nvarchar](12) NULL,
- [cSource] [nvarchar](50) NOT NULL,
- [cBusCode] [nvarchar](30) NULL,
- [cWhCode] [nvarchar](10) NOT NULL,
- [dDate] [datetime] NOT NULL,
- [cCode] [nvarchar](30) NOT NULL,
- [cRdCode] [nvarchar](5) NULL,
- [cDepCode] [nvarchar](12) NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [cPTCode] [nvarchar](2) NULL,
- [cSTCode] [nvarchar](2) NULL,
- [cCusCode] [nvarchar](20) NULL,
- [cVenCode] [nvarchar](20) NULL,
- [cOrderCode] [nvarchar](30) NULL,
- [cARVCode] [nvarchar](30) NULL,
- [cBillCode] [bigint] NULL,
- [cDLCode] [bigint] NULL,
- [cProBatch] [nvarchar](60) NULL,
- [cHandler] [nvarchar](20) NULL,
- [cMemo] [nvarchar](255) NULL,
- [bTransFlag] [bit] NOT NULL,
- [cAccounter] [nvarchar](20) NULL,
- [cMaker] [nvarchar](20) NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [dKeepDate] [nvarchar](5) NULL,
- [dVeriDate] [datetime] NULL,
- [bpufirst] [bit] NULL,
- [biafirst] [bit] NULL,
- [iMQuantity] [float] NULL,
- [dARVDate] [datetime] NULL,
- [cChkCode] [nvarchar](30) NULL,
- [dChkDate] [datetime] NULL,
- [cChkPerson] [nvarchar](40) NULL,
- [VT_ID] [int] NULL,
- [bIsSTQc] [bit] NOT NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [gspcheck] [nvarchar](10) NULL,
- [ufts] [timestamp] NULL,
- [iExchRate] [float] NULL,
- [cExch_Name] [nvarchar](8) NULL,
- [bOMFirst] [bit] NULL,
- [bFromPreYear] [bit] NULL,
- [bIsLsQuery] [bit] NULL,
- [bIsComplement] [smallint] NULL,
- [iDiscountTaxType] [tinyint] NULL,
- [ireturncount] [int] NULL,
- [iverifystate] [int] NULL,
- [iswfcontrolled] [int] NULL,
- [cModifyPerson] [nvarchar](50) NULL,
- [dModifyDate] [datetime] NULL,
- [dnmaketime] [datetime] NULL,
- [dnmodifytime] [datetime] NULL,
- [dnverifytime] [datetime] NULL,
- [bredvouch] [int] NULL,
- [iFlowId] [int] NULL,
- [cPZID] [nvarchar](30) NULL,
- [cSourceLs] [nvarchar](4) NULL,
- [cSourceCodeLs] [nvarchar](20) NULL,
- [iPrintCount] [int] NULL,
- [ctransflag] [nvarchar](2) NULL,
- [csysbarcode] [nvarchar](60) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL,
- [cCheckSignFlag] [nvarchar](36) NULL,
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0) --0:从U8到中间库,1:从旺店通到中间库
-
-
- )
- CREATE TABLE [dbo].[rdrecords08](
- sysid int identity(1,1),
- [AutoID] [bigint] NOT NULL,
- [ID] [bigint] NOT NULL,
- [cInvCode] [nvarchar](60) NOT NULL,
- [iNum] [decimal](30, 10) NULL,
- [iQuantity] [decimal](30, 10) NULL,
- [iUnitCost] [decimal](30, 10) NULL,
- [iPrice] [money] NULL,
- [iAPrice] [money] NULL,
- [iPUnitCost] [decimal](30, 10) NULL,
- [iPPrice] [money] NULL,
- [cBatch] [nvarchar](60) NULL,
- [cVouchCode] [bigint] NULL,
- [cInVouchCode] [nvarchar](30) NULL,
- [cinvouchtype] [nvarchar](2) NULL,
- [iSOutQuantity] [decimal](30, 10) NULL,
- [iSOutNum] [decimal](30, 10) NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [iFlag] [tinyint] NOT NULL,
- [iFNum] [decimal](30, 10) NULL,
- [iFQuantity] [decimal](30, 10) NULL,
- [dVDate] [datetime] NULL,
- [iTrIds] [bigint] NULL,
- [cPosition] [nvarchar](20) NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [cItem_class] [nvarchar](10) NULL,
- [cItemCode] [nvarchar](60) NULL,
- [cName] [nvarchar](255) NULL,
- [cItemCName] [nvarchar](20) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [cBarCode] [nvarchar](200) NULL,
- [iNQuantity] [decimal](30, 10) NULL,
- [iNNum] [decimal](30, 10) NULL,
- [cAssUnit] [nvarchar](35) NULL,
- [dMadeDate] [datetime] NULL,
- [iMassDate] [int] NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [iCheckIds] [bigint] NULL,
- [cBVencode] [nvarchar](20) NULL,
- [chVencode] [nvarchar](20) NULL,
- [bGsp] [bit] NULL,
- [cGspState] [nvarchar](20) NULL,
- [cCheckCode] [nvarchar](30) NULL,
- [iCheckIdBaks] [bigint] NULL,
- [cRejectCode] [nvarchar](30) NULL,
- [iRejectIds] [bigint] NULL,
- [cCheckPersonCode] [nvarchar](20) NULL,
- [dCheckDate] [datetime] NULL,
- [cMassUnit] [smallint] NULL,
- [bChecked] [bit] NULL,
- [bLPUseFree] [bit] NULL,
- [iRSRowNO] [int] NULL,
- [iOriTrackID] [bigint] NULL,
- [coritracktype] [nvarchar](2) NULL,
- [cbaccounter] [nvarchar](30) NULL,
- [dbKeepDate] [datetime] NULL,
- [bCosting] [bit] NULL,
- [bVMIUsed] [bit] NULL,
- [iVMISettleQuantity] [decimal](30, 10) NULL,
- [iVMISettleNum] [decimal](30, 10) NULL,
- [cvmivencode] [nvarchar](20) NULL,
- [iInvSNCount] [int] NULL,
- [cwhpersoncode] [nvarchar](20) NULL,
- [cwhpersonname] [nvarchar](50) NULL,
- [cserviceoid] [varchar](38) NULL,
- [cbserviceoid] [varchar](38) NULL,
- [iinvexchrate] [decimal](38, 8) NULL
- )
- go
- CREATE TABLE [dbo].[RdRecord09](
- sysid int identity(1,1),
- [ID] [bigint] NOT NULL,
- [bRdFlag] [tinyint] NOT NULL,
- [cVouchType] [nvarchar](2) NOT NULL,
- [cBusType] [nvarchar](12) NULL,
- [cSource] [nvarchar](50) NOT NULL,
- [cBusCode] [nvarchar](30) NULL,
- [cWhCode] [nvarchar](10) NOT NULL,
- [dDate] [datetime] NOT NULL,
- [cCode] [nvarchar](30) NOT NULL,
- [cRdCode] [nvarchar](5) NULL,
- [cDepCode] [nvarchar](12) NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [cPTCode] [nvarchar](2) NULL,
- [cSTCode] [nvarchar](2) NULL,
- [cCusCode] [nvarchar](20) NULL,
- [cVenCode] [nvarchar](20) NULL,
- [cOrderCode] [nvarchar](30) NULL,
- [cARVCode] [nvarchar](30) NULL,
- [cBillCode] [bigint] NULL,
- [cDLCode] [bigint] NULL,
- [cProBatch] [nvarchar](60) NULL,
- [cHandler] [nvarchar](20) NULL,
- [cMemo] [nvarchar](255) NULL,
- [bTransFlag] [bit] NOT NULL,
- [cAccounter] [nvarchar](20) NULL,
- [cMaker] [nvarchar](20) NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [dKeepDate] [nvarchar](5) NULL,
- [dVeriDate] [datetime] NULL,
- [bpufirst] [bit] NULL,
- [biafirst] [bit] NULL,
- [iMQuantity] [float] NULL,
- [dARVDate] [datetime] NULL,
- [cChkCode] [nvarchar](30) NULL,
- [dChkDate] [datetime] NULL,
- [cChkPerson] [nvarchar](40) NULL,
- [VT_ID] [int] NULL,
- [bIsSTQc] [bit] NOT NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [gspcheck] [nvarchar](10) NULL,
- [ufts] [timestamp] NULL,
- [iExchRate] [float] NULL,
- [cExch_Name] [nvarchar](8) NULL,
- [cShipAddress] [nvarchar](200) NULL,
- [caddcode] [nvarchar](60) NULL,
- [bOMFirst] [bit] NULL,
- [bFromPreYear] [bit] NULL,
- [bIsLsQuery] [bit] NULL,
- [bIsComplement] [smallint] NULL,
- [iDiscountTaxType] [tinyint] NULL,
- [iBG_OverFlag] [smallint] NULL,
- [cBG_Auditor] [nvarchar](20) NULL,
- [cBG_AuditTime] [nvarchar](20) NULL,
- [ControlResult] [smallint] NULL,
- [ireturncount] [int] NULL,
- [iverifystate] [int] NULL,
- [iswfcontrolled] [int] NULL,
- [cModifyPerson] [nvarchar](50) NULL,
- [dModifyDate] [datetime] NULL,
- [dnmaketime] [datetime] NULL,
- [dnmodifytime] [datetime] NULL,
- [dnverifytime] [datetime] NULL,
- [bredvouch] [int] NULL,
- [iFlowId] [int] NULL,
- [cPZID] [nvarchar](30) NULL,
- [cSourceLs] [nvarchar](4) NULL,
- [cSourceCodeLs] [nvarchar](20) NULL,
- [iPrintCount] [int] NULL,
- [ctransflag] [nvarchar](2) NULL,
- [csysbarcode] [nvarchar](60) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL,
- [cCheckSignFlag] [nvarchar](36) NULL,
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0), --0:未处理,1:已处理
- direction int default(0) --0:从U8到中间库,1:从旺店通到中间库
- )
- go
- CREATE TABLE [dbo].[rdrecords09](
- sysid int identity(1,1),
- [AutoID] [bigint] NOT NULL,
- [ID] [bigint] NOT NULL,
- [cInvCode] [nvarchar](60) NOT NULL,
- [iNum] [decimal](30, 10) NULL,
- [iQuantity] [decimal](30, 10) NULL,
- [iUnitCost] [decimal](30, 10) NULL,
- [iPrice] [money] NULL,
- [iAPrice] [money] NULL,
- [iPUnitCost] [decimal](30, 10) NULL,
- [iPPrice] [money] NULL,
- [cBatch] [nvarchar](60) NULL,
- [cVouchCode] [bigint] NULL,
- [cInVouchCode] [nvarchar](30) NULL,
- [cinvouchtype] [nvarchar](2) NULL,
- [iSOutQuantity] [decimal](30, 10) NULL,
- [iSOutNum] [decimal](30, 10) NULL,
- [coutvouchid] [bigint] NULL,
- [coutvouchtype] [nvarchar](2) NULL,
- [iSRedOutQuantity] [decimal](30, 10) NULL,
- [iSRedOutNum] [decimal](30, 10) NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [iFlag] [tinyint] NOT NULL,
- [iFNum] [decimal](30, 10) NULL,
- [iFQuantity] [decimal](30, 10) NULL,
- [dVDate] [datetime] NULL,
- [iTrIds] [bigint] NULL,
- [cPosition] [nvarchar](20) NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [cItem_class] [nvarchar](10) NULL,
- [cItemCode] [nvarchar](60) NULL,
- [iDLsID] [bigint] NULL,
- [cName] [nvarchar](255) NULL,
- [cItemCName] [nvarchar](20) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [cBarCode] [nvarchar](200) NULL,
- [iNQuantity] [decimal](30, 10) NULL,
- [iNNum] [decimal](30, 10) NULL,
- [cAssUnit] [nvarchar](35) NULL,
- [dMadeDate] [datetime] NULL,
- [iMassDate] [int] NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [iCheckIds] [bigint] NULL,
- [cBVencode] [nvarchar](20) NULL,
- [bGsp] [bit] NULL,
- [cGspState] [nvarchar](20) NULL,
- [cCheckCode] [nvarchar](30) NULL,
- [iCheckIdBaks] [bigint] NULL,
- [cRejectCode] [nvarchar](30) NULL,
- [iRejectIds] [bigint] NULL,
- [cCheckPersonCode] [nvarchar](20) NULL,
- [dCheckDate] [datetime] NULL,
- [cMassUnit] [smallint] NULL,
- [bChecked] [bit] NULL,
- [iEqDID] [int] NULL,
- [bLPUseFree] [bit] NULL,
- [iRSRowNO] [int] NULL,
- [iOriTrackID] [bigint] NULL,
- [coritracktype] [nvarchar](2) NULL,
- [cbaccounter] [nvarchar](30) NULL,
- [dbKeepDate] [datetime] NULL,
- [bCosting] [bit] NULL,
- [bVMIUsed] [bit] NULL,
- [iVMISettleQuantity] [decimal](30, 10) NULL,
- [iVMISettleNum] [decimal](30, 10) NULL,
- [cvmivencode] [nvarchar](20) NULL,
- [iInvSNCount] [int] NULL,
- [cwhpersoncode] [nvarchar](20) NULL,
- [cwhpersonname] [nvarchar](50) NULL,
- [cserviceoid] [varchar](38) NULL,
- [cbserviceoid] [varchar](38) NULL,
- [iinvexchrate] [decimal](38, 8) NULL,
- [cbdlcode] [nvarchar](30) NULL
- )
- go
- CREATE TABLE [dbo].[RdRecord01](
- sysid int identity(1,1),
- [ID] [bigint] NOT NULL,
- [bRdFlag] [tinyint] NOT NULL,
- [cVouchType] [nvarchar](2) NOT NULL,
- [cBusType] [nvarchar](12) NULL,
- [cSource] [nvarchar](50) NOT NULL,
- [cBusCode] [nvarchar](30) NULL,
- [cWhCode] [nvarchar](10) NOT NULL,
- [dDate] [datetime] NOT NULL,
- [cCode] [nvarchar](30) NOT NULL,
- [cRdCode] [nvarchar](5) NULL,
- [cDepCode] [nvarchar](12) NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [cPTCode] [nvarchar](2) NULL,
- [cSTCode] [nvarchar](2) NULL,
- [cCusCode] [nvarchar](20) NULL,
- [cVenCode] [nvarchar](20) NULL,
- [cOrderCode] [nvarchar](30) NULL,
- [cARVCode] [nvarchar](30) NULL,
- [cBillCode] [bigint] NULL,
- [cDLCode] [bigint] NULL,
- [cProBatch] [nvarchar](60) NULL,
- [cHandler] [nvarchar](20) NULL,
- [cMemo] [nvarchar](255) NULL,
- [bTransFlag] [bit] NOT NULL,
- [cAccounter] [nvarchar](20) NULL,
- [cMaker] [nvarchar](20) NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [dKeepDate] [nvarchar](5) NULL,
- [dVeriDate] [datetime] NULL,
- [bpufirst] [bit] NULL,
- [biafirst] [bit] NULL,
- [iMQuantity] [float] NULL,
- [dARVDate] [datetime] NULL,
- [cChkCode] [nvarchar](30) NULL,
- [dChkDate] [datetime] NULL,
- [cChkPerson] [nvarchar](40) NULL,
- [VT_ID] [int] NULL,
- [bIsSTQc] [bit] NOT NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [gspcheck] [nvarchar](10) NULL,
- [ipurorderid] [bigint] NULL,
- [ipurarriveid] [bigint] NULL,
- [iarriveid] [nvarchar](30) NULL,
- [isalebillid] [nvarchar](30) NULL,
- [ufts] [timestamp] NULL,
- [iTaxRate] [decimal](20, 6) NULL,
- [iExchRate] [float] NULL,
- [cExch_Name] [nvarchar](8) NULL,
- [bOMFirst] [bit] NULL,
- [bFromPreYear] [bit] NULL,
- [bIsLsQuery] [bit] NULL,
- [bIsComplement] [smallint] NULL,
- [iDiscountTaxType] [tinyint] NULL,
- [ireturncount] [int] NULL,
- [iverifystate] [int] NULL,
- [iswfcontrolled] [int] NULL,
- [cModifyPerson] [nvarchar](50) NULL,
- [dModifyDate] [datetime] NULL,
- [dnmaketime] [datetime] NULL,
- [dnmodifytime] [datetime] NULL,
- [dnverifytime] [datetime] NULL,
- [bredvouch] [int] NULL,
- [cVenPUOMProtocol] [nvarchar](20) NULL,
- [dCreditStart] [datetime] NULL,
- [iCreditPeriod] [int] NULL,
- [dGatheringDate] [datetime] NULL,
- [bCredit] [tinyint] NULL,
- [iFlowId] [int] NULL,
- [cPZID] [nvarchar](30) NULL,
- [cSourceLs] [nvarchar](4) NULL,
- [cSourceCodeLs] [nvarchar](20) NULL,
- [iPrintCount] [int] NULL,
- [csysbarcode] [nvarchar](60) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL,
- [cCheckSignFlag] [nvarchar](36) NULL,
- [cGCRouteCode] [nvarchar](40) NULL,
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0) --0:从U8到中间库,1:从旺店通到中间库
- )
- GO
- CREATE TABLE [dbo].[rdrecords01](
- sysid int identity(1,1),
- [AutoID] [bigint] NOT NULL,
- [ID] [bigint] NOT NULL,
- [cInvCode] [nvarchar](60) NOT NULL,
- [iNum] [decimal](30, 10) NULL,
- [iQuantity] [decimal](30, 10) NULL,
- [iUnitCost] [decimal](30, 10) NULL,
- [iPrice] [money] NULL,
- [iAPrice] [money] NULL,
- [iPUnitCost] [decimal](30, 10) NULL,
- [iPPrice] [money] NULL,
- [cBatch] [nvarchar](60) NULL,
- [cVouchCode] [bigint] NULL,
- [cInVouchCode] [nvarchar](30) NULL,
- [cinvouchtype] [nvarchar](2) NULL,
- [iSOutQuantity] [decimal](30, 10) NULL,
- [iSOutNum] [decimal](30, 10) NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [iFlag] [tinyint] NOT NULL,
- [dSDate] [datetime] NULL,
- [iTax] [money] NULL,
- [iSQuantity] [decimal](30, 10) NULL,
- [iSNum] [decimal](30, 10) NULL,
- [iMoney] [money] NULL,
- [iFNum] [decimal](30, 10) NULL,
- [iFQuantity] [decimal](30, 10) NULL,
- [dVDate] [datetime] NULL,
- [cPosition] [nvarchar](20) NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [cItem_class] [nvarchar](10) NULL,
- [cItemCode] [nvarchar](60) NULL,
- [iPOsID] [bigint] NULL,
- [fACost] [decimal](30, 10) NULL,
- [cName] [nvarchar](255) NULL,
- [cItemCName] [nvarchar](20) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [cBarCode] [nvarchar](200) NULL,
- [iNQuantity] [decimal](30, 10) NULL,
- [iNNum] [decimal](30, 10) NULL,
- [cAssUnit] [nvarchar](35) NULL,
- [dMadeDate] [datetime] NULL,
- [iMassDate] [int] NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [iCheckIds] [bigint] NULL,
- [cBVencode] [nvarchar](20) NULL,
- [chVencode] [nvarchar](20) NULL,
- [bGsp] [bit] NULL,
- [cGspState] [nvarchar](20) NULL,
- [iArrsId] [bigint] NULL,
- [cCheckCode] [nvarchar](30) NULL,
- [iCheckIdBaks] [bigint] NULL,
- [cRejectCode] [nvarchar](30) NULL,
- [iRejectIds] [bigint] NULL,
- [cCheckPersonCode] [nvarchar](20) NULL,
- [dCheckDate] [datetime] NULL,
- [iOriTaxCost] [decimal](20, 6) NULL,
- [iOriCost] [decimal](20, 6) NULL,
- [iOriMoney] [money] NULL,
- [iOriTaxPrice] [money] NULL,
- [ioriSum] [money] NULL,
- [iTaxRate] [decimal](20, 6) NULL,
- [iTaxPrice] [money] NULL,
- [iSum] [money] NULL,
- [bTaxCost] [bit] NULL,
- [cPOID] [nvarchar](30) NULL,
- [cMassUnit] [smallint] NULL,
- [iMaterialFee] [money] NULL,
- [iProcessCost] [decimal](30, 10) NULL,
- [iProcessFee] [money] NULL,
- [dMSDate] [datetime] NULL,
- [iSMaterialFee] [money] NULL,
- [iSProcessFee] [money] NULL,
- [iOMoDID] [int] NULL,
- [strContractId] [nvarchar](64) NULL,
- [strCode] [nvarchar](150) NULL,
- [bChecked] [bit] NULL,
- [bRelated] [bit] NULL,
- [iOMoMID] [bigint] NULL,
- [iMatSettleState] [int] NOT NULL,
- [iBillSettleCount] [int] NOT NULL,
- [bLPUseFree] [bit] NULL,
- [iOriTrackID] [bigint] NULL,
- [coritracktype] [nvarchar](2) NULL,
- [cbaccounter] [nvarchar](30) NULL,
- [dbKeepDate] [datetime] NULL,
- [bCosting] [bit] NULL,
- [iSumBillQuantity] [decimal](30, 10) NULL,
- [bVMIUsed] [bit] NULL,
- [iVMISettleQuantity] [decimal](30, 10) NULL,
- [iVMISettleNum] [decimal](30, 10) NULL,
- [cvmivencode] [nvarchar](20) NULL,
- [iInvSNCount] [int] NULL,
- [cwhpersoncode] [nvarchar](20) NULL,
- [cwhpersonname] [nvarchar](50) NULL,
- [impcost] [decimal](30, 10) NULL,
- [iIMOSID] [int] NULL,
- [iIMBSID] [int] NULL,
- [cbarvcode] [nvarchar](30) NULL,
- [dbarvdate] [nvarchar](30) NULL,
- [iinvexchrate] [decimal](30, 10) NULL,
- [corufts] [varchar](16) NULL,
- [comcode] [nvarchar](30) NULL,
- [strContractGUID] [uniqueidentifier] NULL,
- [iExpiratDateCalcu] [smallint] NULL
- )
- go
- CREATE TABLE [dbo].[rdrecord11](
- sysid int identity(1,1),
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0), --0:从U8到中间库,1:从旺店通到中间库
- [ID] [bigint] NOT NULL,
- [bRdFlag] [tinyint] NOT NULL,
- [cVouchType] [nvarchar](2) NOT NULL,
- [cBusType] [nvarchar](12) NULL,
- [cSource] [nvarchar](50) NOT NULL,
- [cBusCode] [nvarchar](30) NULL,
- [cWhCode] [nvarchar](10) NOT NULL,
- [dDate] [datetime] NOT NULL,
- [cCode] [nvarchar](30) NOT NULL,
- [cRdCode] [nvarchar](5) NULL,
- [cDepCode] [nvarchar](12) NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [cPTCode] [nvarchar](2) NULL,
- [cSTCode] [nvarchar](2) NULL,
- [cCusCode] [nvarchar](20) NULL,
- [cVenCode] [nvarchar](20) NULL,
- [cOrderCode] [nvarchar](30) NULL,
- [cARVCode] [nvarchar](30) NULL,
- [cBillCode] [bigint] NULL,
- [cDLCode] [bigint] NULL,
- [cProBatch] [nvarchar](60) NULL,
- [cHandler] [nvarchar](20) NULL,
- [cMemo] [nvarchar](255) NULL,
- [bTransFlag] [bit] NOT NULL,
- [cAccounter] [nvarchar](20) NULL,
- [cMaker] [nvarchar](20) NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [dKeepDate] [nvarchar](5) NULL,
- [dVeriDate] [datetime] NULL,
- [bpufirst] [bit] NULL,
- [biafirst] [bit] NULL,
- [iMQuantity] [float] NULL,
- [dARVDate] [datetime] NULL,
- [cChkCode] [nvarchar](30) NULL,
- [dChkDate] [datetime] NULL,
- [cChkPerson] [nvarchar](40) NULL,
- [VT_ID] [int] NULL,
- [bIsSTQc] [bit] NOT NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [cPsPcode] [nvarchar](60) NULL,
- [cMPoCode] [nvarchar](30) NULL,
- [gspcheck] [nvarchar](10) NULL,
- [ipurorderid] [bigint] NULL,
- [iproorderid] [int] NULL,
- [ufts] [timestamp] NULL,
- [iExchRate] [float] NULL,
- [cExch_Name] [nvarchar](8) NULL,
- [bOMFirst] [bit] NULL,
- [bFromPreYear] [bit] NULL,
- [bIsLsQuery] [bit] NULL,
- [bIsComplement] [smallint] NULL,
- [iDiscountTaxType] [tinyint] NULL,
- [ireturncount] [int] NULL,
- [iverifystate] [int] NULL,
- [iswfcontrolled] [int] NULL,
- [cModifyPerson] [nvarchar](50) NULL,
- [dModifyDate] [datetime] NULL,
- [dnmaketime] [datetime] NULL,
- [dnmodifytime] [datetime] NULL,
- [dnverifytime] [datetime] NULL,
- [bredvouch] [int] NULL,
- [bmotran] [tinyint] NULL,
- [iFlowId] [int] NULL,
- [cPZID] [nvarchar](30) NULL,
- [cSourceLs] [nvarchar](4) NULL,
- [cSourceCodeLs] [nvarchar](20) NULL,
- [bHYVouch] [bit] NULL,
- [iPrintCount] [int] NULL,
- [csysbarcode] [nvarchar](60) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL,
- [cCheckSignFlag] [nvarchar](36) NULL
- )
- GO
- CREATE TABLE [dbo].[rdrecords11](
- sysid int identity(1,1),
- [AutoID] [bigint] NOT NULL,
- [ID] [bigint] NOT NULL,
- [cInvCode] [nvarchar](60) NOT NULL,
- [iNum] [decimal](30, 10) NULL,
- [iQuantity] [decimal](30, 10) NULL,
- [iUnitCost] [decimal](30, 10) NULL,
- [iPrice] [money] NULL,
- [iAPrice] [money] NULL,
- [iPUnitCost] [decimal](30, 10) NULL,
- [iPPrice] [money] NULL,
- [cBatch] [nvarchar](60) NULL,
- [cObjCode] [nvarchar](12) NULL,
- [cVouchCode] [bigint] NULL,
- [cInVouchCode] [nvarchar](30) NULL,
- [cinvouchtype] [nvarchar](2) NULL,
- [iSOutQuantity] [decimal](30, 10) NULL,
- [iSOutNum] [decimal](30, 10) NULL,
- [coutvouchid] [bigint] NULL,
- [coutvouchtype] [nvarchar](2) NULL,
- [iSRedOutQuantity] [decimal](30, 10) NULL,
- [iSRedOutNum] [decimal](30, 10) NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [iFlag] [tinyint] NOT NULL,
- [iSQuantity] [decimal](30, 10) NULL,
- [iSNum] [decimal](30, 10) NULL,
- [iFNum] [decimal](30, 10) NULL,
- [iFQuantity] [decimal](30, 10) NULL,
- [dVDate] [datetime] NULL,
- [iTrIds] [bigint] NULL,
- [cPosition] [nvarchar](20) NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [cItem_class] [nvarchar](10) NULL,
- [cItemCode] [nvarchar](60) NULL,
- [cName] [nvarchar](255) NULL,
- [cItemCName] [nvarchar](20) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [cBarCode] [nvarchar](200) NULL,
- [iNQuantity] [decimal](30, 10) NULL,
- [iNNum] [decimal](30, 10) NULL,
- [cAssUnit] [nvarchar](35) NULL,
- [dMadeDate] [datetime] NULL,
- [iMassDate] [int] NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [iMPoIds] [bigint] NULL,
- [iCheckIds] [bigint] NULL,
- [cBVencode] [nvarchar](20) NULL,
- [bGsp] [bit] NULL,
- [cGspState] [nvarchar](20) NULL,
- [cCheckCode] [nvarchar](30) NULL,
- [iCheckIdBaks] [bigint] NULL,
- [cRejectCode] [nvarchar](30) NULL,
- [iRejectIds] [bigint] NULL,
- [cCheckPersonCode] [nvarchar](20) NULL,
- [dCheckDate] [datetime] NULL,
- [cMassUnit] [smallint] NULL,
- [cMoLotCode] [nvarchar](60) NULL,
- [iMaterialFee] [money] NULL,
- [iProcessCost] [decimal](30, 10) NULL,
- [iProcessFee] [money] NULL,
- [dMSDate] [datetime] NULL,
- [iSMaterialFee] [money] NULL,
- [iSProcessFee] [money] NULL,
- [iOMoDID] [int] NULL,
- [bFilled] [bigint] NULL,
- [bChecked] [bit] NULL,
- [iOMoMID] [bigint] NULL,
- [cmworkcentercode] [nvarchar](8) NULL,
- [bLPUseFree] [bit] NULL,
- [iRSRowNO] [int] NULL,
- [iOriTrackID] [bigint] NULL,
- [coritracktype] [nvarchar](2) NULL,
- [cbaccounter] [nvarchar](30) NULL,
- [dbKeepDate] [datetime] NULL,
- [bCosting] [bit] NULL,
- [bVMIUsed] [bit] NULL,
- [iVMISettleQuantity] [decimal](30, 10) NULL,
- [iVMISettleNum] [decimal](30, 10) NULL,
- [cvmivencode] [nvarchar](20) NULL,
- [iInvSNCount] [int] NULL,
- [cwhpersoncode] [nvarchar](20) NULL,
- [cwhpersonname] [nvarchar](50) NULL,
- [iMaIDs] [bigint] NULL,
- [cserviceoid] [varchar](38) NULL,
- [cbserviceoid] [varchar](38) NULL,
- [iinvexchrate] [decimal](38, 8) NULL
- )
- GO
- CREATE TABLE [dbo].[PO_Pomain](
- sysid int identity(1,1),
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0), --0:从U8到中间库,1:从旺店通到中间库
- [cPOID] [nvarchar](30) NULL,
- [dPODate] [datetime] NOT NULL,
- [cVenCode] [nvarchar](20) NULL,
- [cDepCode] [nvarchar](12) NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [cPTCode] [nvarchar](2) NULL,
- [cArrivalPlace] [nvarchar](255) NULL,
- [cSCCode] [nvarchar](2) NULL,
- [cexch_name] [nvarchar](8) NULL,
- [nflat] [float] NULL,
- [iTaxRate] [float] NULL,
- [cPayCode] [nvarchar](3) NULL,
- [iCost] [money] NULL,
- [iBargain] [money] NULL,
- [cMemo] [nvarchar](255) NULL,
- [cState] [tinyint] NULL,
- [cPeriod] [nvarchar](12) NULL,
- [cMaker] [nvarchar](20) NULL,
- [cVerifier] [nvarchar](20) NULL,
- [cCloser] [nvarchar](20) NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [POID] [int] NOT NULL,
- [iVTid] [int] NOT NULL,
- [ufts] [timestamp] NULL,
- [cChanger] [nvarchar](20) NULL,
- [cBusType] [nvarchar](8) NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [cLocker] [nvarchar](20) NULL,
- [iDiscountTaxType] [tinyint] NULL,
- [iverifystateex] [int] NULL,
- [ireturncount] [int] NULL,
- [IsWfControlled] [bit] NULL,
- [cmaketime] [datetime] NULL,
- [cModifyTime] [datetime] NULL,
- [cAuditTime] [datetime] NULL,
- [cAuditDate] [datetime] NULL,
- [cModifyDate] [datetime] NULL,
- [cReviser] [nvarchar](40) NULL,
- [cVenPUOMProtocol] [nvarchar](20) NULL,
- [cChangVerifier] [nvarchar](40) NULL,
- [cChangAuditTime] [datetime] NULL,
- [cChangAuditDate] [datetime] NULL,
- [iBG_OverFlag] [smallint] NULL,
- [cBG_Auditor] [nvarchar](20) NULL,
- [cBG_AuditTime] [nvarchar](20) NULL,
- [ControlResult] [smallint] NULL,
- [iflowid] [int] NULL,
- [iPrintCount] [int] NULL,
- [dCloseDate] [datetime] NULL,
- [dCloseTime] [datetime] NULL,
- [ccleanver] [nvarchar](50) NULL,
- [cContactCode] [nvarchar](60) NULL,
- [cVenPerson] [nvarchar](100) NULL,
- [cVenBank] [nvarchar](200) NULL,
- [cVenAccount] [nvarchar](100) NULL,
- [cappcode] [nvarchar](64) NULL,
- [csysbarcode] [nvarchar](60) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL,
- [cGCRouteCode] [nvarchar](40) NULL,
- [bGCTransforming] [bit] NULL)
- GO
- CREATE TABLE [dbo].[PO_Podetails](
- [ID] [int] NOT NULL,
- [cPOID] [nvarchar](30) NULL,
- [cInvCode] [nvarchar](60) NOT NULL,
- [iQuantity] [decimal](30, 10) NULL,
- [iNum] [decimal](30, 10) NULL,
- [iQuotedPrice] [decimal](30, 10) NULL,
- [iUnitPrice] [decimal](30, 10) NULL,
- [iMoney] [money] NULL,
- [iTax] [money] NULL,
- [iSum] [money] NULL,
- [iDisCount] [money] NULL,
- [iNatUnitPrice] [decimal](30, 10) NULL,
- [iNatMoney] [money] NULL,
- [iNatTax] [money] NULL,
- [iNatSum] [money] NULL,
- [iNatDisCount] [money] NULL,
- [dArriveDate] [datetime] NULL,
- [iReceivedQTY] [decimal](30, 10) NULL,
- [iReceivedNum] [decimal](30, 10) NULL,
- [iReceivedMoney] [money] NULL,
- [iInvQTY] [decimal](30, 10) NULL,
- [iInvNum] [decimal](30, 10) NULL,
- [iInvMoney] [money] NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [iNatInvMoney] [money] NULL,
- [iOriTotal] [money] NULL,
- [iTotal] [money] NULL,
- [iPerTaxRate] decimal(26,4) NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [iflag] [tinyint] NULL,
- [cItemCode] [nvarchar](60) NULL,
- [cItem_class] [nvarchar](10) NULL,
- [PPCIds] [int] NULL,
- [cItemName] [nvarchar](255) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [bGsp] [tinyint] NULL,
- [POID] [int] NULL,
- [cUnitID] [nvarchar](35) NULL,
- [iTaxPrice] decimal(26,4) NULL,
- [iArrQTY] decimal(26,4) NULL,
- [iArrNum] decimal(26,4) NULL,
- [iArrMoney] [money] NULL,
- [iNatArrMoney] [money] NULL,
- [iAppIds] [int] NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [iSOsID] [int] NULL,
- [bTaxCost] [bit] NULL,
- [cSource] [nvarchar](10) NULL,
- [cbCloser] [nvarchar](20) NULL,
- [iPPartId] [int] NULL,
- [iPQuantity] decimal(26,4) NULL,
- [iPTOSeq] [int] NULL,
- [SoType] [tinyint] NULL,
- [SoDId] [nvarchar](50) NULL,
- [ContractRowGUID] [uniqueidentifier] NULL,
- [cupsocode] [nvarchar](64) NULL,
- [iInvMPCost] [decimal](20, 6) NULL,
- [ContractCode] [nvarchar](128) NULL,
- [ContractRowNo] [nvarchar](150) NULL,
- [fPoValidQuantity] decimal(26,4) NULL,
- [fPoValidNum] decimal(26,4) NULL,
- [fPoArrQuantity] decimal(26,4) NULL,
- [fPoArrNum] decimal(26,4) NULL,
- [fPoRetQuantity] decimal(26,4) NULL,
- [fPoRetNum] decimal(26,4) NULL,
- [fPoRefuseQuantity] decimal(26,4) NULL,
- [fPoRefuseNum] decimal(26,4) NULL,
- [dUfts] [timestamp] NULL,
- [iorderdid] [int] NULL,
- [iordertype] [tinyint] NULL,
- [csoordercode] [nvarchar](50) NULL,
- [iorderseq] [int] NULL,
- [cbCloseTime] [datetime] NULL,
- [cbCloseDate] [datetime] NULL,
- [cBG_ItemCode] [nvarchar](50) NULL,
- [cBG_ItemName] [nvarchar](100) NULL,
- [cBG_CaliberKey1] [nvarchar](50) NULL,
- [cBG_CaliberKeyName1] [nvarchar](100) NULL,
- [cBG_CaliberKey2] [nvarchar](50) NULL,
- [cBG_CaliberKeyName2] [nvarchar](100) NULL,
- [cBG_CaliberKey3] [nvarchar](50) NULL,
- [cBG_CaliberKeyName3] [nvarchar](100) NULL,
- [cBG_CaliberCode1] [nvarchar](90) NULL,
- [cBG_CaliberName1] [nvarchar](100) NULL,
- [cBG_CaliberCode2] [nvarchar](90) NULL,
- [cBG_CaliberName2] [nvarchar](100) NULL,
- [cBG_CaliberCode3] [nvarchar](90) NULL,
- [cBG_CaliberName3] [nvarchar](100) NULL,
- [iBG_Ctrl] [tinyint] NULL,
- [cBG_Auditopinion] [nvarchar](100) NULL,
- [fexquantity] decimal(26,4) NULL,
- [fexnum] decimal(26,4) NULL,
- [ivouchrowno] [int] NULL,
- [cBG_CaliberKey4] [nvarchar](50) NULL,
- [cBG_CaliberKeyName4] [nvarchar](100) NULL,
- [cBG_CaliberKey5] [nvarchar](50) NULL,
- [cBG_CaliberKeyName5] [nvarchar](100) NULL,
- [cBG_CaliberKey6] [nvarchar](50) NULL,
- [cBG_CaliberKeyName6] [nvarchar](100) NULL,
- [cBG_CaliberCode4] [nvarchar](90) NULL,
- [cBG_CaliberName4] [nvarchar](100) NULL,
- [cBG_CaliberCode5] [nvarchar](90) NULL,
- [cBG_CaliberName5] [nvarchar](100) NULL,
- [cBG_CaliberCode6] [nvarchar](90) NULL,
- [cBG_CaliberName6] [nvarchar](100) NULL,
- [csocode] [nvarchar](40) NULL,
- [irowno] [int] NULL,
- [freceivedqty] decimal(26,4) NULL,
- [freceivednum] decimal(26,4) NULL,
- [cxjspdids] [nvarchar](60) NULL,
- [cbMemo] [nvarchar](255) NULL,
- [cbsysbarcode] [nvarchar](80) NULL,
- [planlotnumber] [nvarchar](40) NULL,
- [bgift] [smallint] NULL,
- [cFactoryCode] [nvarchar](50) NULL
- )
- GO
- CREATE TABLE [dbo].[PU_ArrivalVouch](
- sysid int identity(1,1),
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0), --0:从U8到中间库,1:从旺店通到中间库
- [iVTid] [int] NOT NULL,
- [ufts] [timestamp] NULL,
- [ID] [int] NOT NULL,
- [cCode] [nvarchar](30) NOT NULL,
- [cPTCode] [nvarchar](2) NULL,
- [dDate] [datetime] NOT NULL,
- [cVenCode] [nvarchar](20) NOT NULL,
- [cDepCode] [nvarchar](12) NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [cPayCode] [nvarchar](3) NULL,
- [cSCCode] [nvarchar](2) NULL,
- [cexch_name] [nvarchar](8) NOT NULL,
- [iExchRate] [float] NULL,
- [iTaxRate] [decimal](20, 6) NULL,
- [cMemo] [nvarchar](255) NULL,
- [cBusType] [nvarchar](8) NOT NULL,
- [cMaker] [nvarchar](20) NOT NULL,
- [bNegative] [int] NOT NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [ccloser] [nvarchar](20) NULL,
- [iDiscountTaxType] [tinyint] NULL,
- [iBillType] [tinyint] NOT NULL,
- [cvouchtype] [nvarchar](10) NULL,
- [cgeneralordercode] [nvarchar](300) NULL,
- [ctmcode] [nvarchar](30) NULL,
- [cincotermcode] [nvarchar](30) NULL,
- [ctransordercode] [nvarchar](30) NULL,
- [dportdate] [datetime] NULL,
- [csportcode] [nvarchar](30) NULL,
- [caportcode] [nvarchar](30) NULL,
- [csvencode] [nvarchar](30) NULL,
- [carrivalplace] [nvarchar](100) NULL,
- [dclosedate] [datetime] NULL,
- [idec] [int] NULL,
- [bcal] [bit] NULL,
- [guid] [nvarchar](50) NULL,
- [cMakeTime] [datetime] NULL,
- [cModifyTime] [datetime] NULL,
- [cModifyDate] [datetime] NULL,
- [cReviser] [nvarchar](40) NULL,
- [iverifystate] [int] NULL,
- [cAuditDate] [datetime] NULL,
- [caudittime] [datetime] NULL,
- [cverifier] [nvarchar](20) NULL,
- [iverifystateex] [int] NULL,
- [ireturncount] [int] NULL,
- [IsWfControlled] [bit] NULL,
- [cVenPUOMProtocol] [nvarchar](20) NULL,
- [cchanger] [nvarchar](20) NULL,
- [iflowid] [int] NULL,
- [iPrintCount] [int] NULL,
- [ccleanver] [nvarchar](50) NULL,
- [cpocode] [nvarchar](64) NULL,
- [csysbarcode] [nvarchar](60) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL)
- go
- CREATE TABLE [dbo].[PU_ArrivalVouchs](
- [Autoid] [int] NOT NULL,
- [ID] [int] NULL,
- [cWhCode] [nvarchar](10) NULL,
- [cInvCode] [nvarchar](60) NOT NULL,
- [iNum] [decimal](20, 6) NULL,
- [iQuantity] [decimal](20, 6) NOT NULL,
- [iOriCost] [decimal](20, 6) NULL,
- [iOriTaxCost] [decimal](20, 6) NULL,
- [iOriMoney] [money] NULL,
- [iOriTaxPrice] [money] NULL,
- [iOriSum] [money] NULL,
- [iCost] [decimal](20, 6) NULL,
- [iMoney] [money] NULL,
- [iTaxPrice] [money] NULL,
- [iSum] [money] NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [iTaxRate] [decimal](20, 6) NOT NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [cItem_class] [nvarchar](2) NULL,
- [cItemCode] [nvarchar](60) NULL,
- [iPOsID] [int] NULL,
- [cItemName] [nvarchar](255) NULL,
- [cUnitID] [nvarchar](50) NULL,
- [fValidInQuan] [decimal](20, 6) NULL,
- [fKPQuantity] [decimal](20, 6) NULL,
- [fRealQuantity] [decimal](20, 6) NULL,
- [fValidQuantity] [decimal](20, 6) NULL,
- [finValidQuantity] [decimal](20, 6) NULL,
- [cCloser] [nvarchar](20) NULL,
- [iCorId] [int] NULL,
- [fRetQuantity] [decimal](20, 6) NULL,
- [fInValidInQuan] [decimal](20, 6) NULL,
- [bGsp] [tinyint] NULL,
- [cBatch] [nvarchar](60) NULL,
- [dVDate] [datetime] NULL,
- [dPDate] [datetime] NULL,
- [fRefuseQuantity] [decimal](20, 6) NULL,
- [cGspState] [nvarchar](20) NULL,
- [fValidNum] decimal(26,4) NULL,
- [fValidInNum] decimal(26,4) NULL,
- [fInValidNum] decimal(26,4) NULL,
- [fRealNum] decimal(26,4) NULL,
- [bTaxCost] [bit] NULL,
- [bInspect] [tinyint] NULL,
- [fRefuseNum] [decimal](20, 6) NULL,
- [iPPartId] [int] NULL,
- [iPQuantity] decimal(26,4) NULL,
- [iPTOSeq] [int] NULL,
- [SoDId] [nvarchar](50) NULL,
- [SoType] [tinyint] NULL,
- [ContractRowGUID] [uniqueidentifier] NULL,
- [imassdate] [int] NULL,
- [cmassunit] [tinyint] NULL,
- [bexigency] [tinyint] NULL,
- [cbcloser] [nvarchar](20) NULL,
- [fSumRefuseQuantity] [decimal](20, 6) NULL,
- [FSumRefuseNum] [decimal](20, 6) NULL,
- [fRetNum] [decimal](20, 6) NULL,
- [fDTQuantity] [decimal](20, 6) NULL,
- [fInvalidInNum] [decimal](20, 6) NULL,
- [fDegradeQuantity] [decimal](20, 6) NULL,
- [fDegradeNum] [decimal](20, 6) NULL,
- [fDegradeInQuantity] [decimal](20, 6) NULL,
- [fDegradeInNum] [decimal](20, 6) NULL,
- [fInspectQuantity] [decimal](20, 6) NULL,
- [fInspectNum] [decimal](20, 6) NULL,
- [iInvMPCost] [decimal](20, 6) NULL,
- [guids] [nvarchar](50) NULL,
- [iinvexchrate] [decimal](28, 8) NULL,
- [objectid_source] [nvarchar](30) NULL,
- [autoid_source] [int] NULL,
- [ufts_source] [nvarchar](50) NULL,
- [irowno_source] [int] NULL,
- [csocode] [nvarchar](50) NULL,
- [isorowno] [int] NULL,
- [iorderid] [int] NULL,
- [cordercode] [nvarchar](50) NULL,
- [iorderrowno] [int] NULL,
- [dlineclosedate] [datetime] NULL,
- [ContractCode] [nvarchar](128) NULL,
- [ContractRowNo] [nvarchar](150) NULL,
- [RejectSource] [bit] NULL,
- [iciqbookid] [int] NULL,
- [cciqbookcode] [nvarchar](30) NULL,
- [cciqcode] [nvarchar](30) NULL,
- [fciqchangrate] decimal(20,6) NULL,
- [irejectautoid] [int] NULL,
- [iExpiratDateCalcu] [smallint] NULL,
- [cExpirationdate] [nvarchar](20) NULL,
- [dExpirationdate] [datetime] NULL,
- [cupsocode] [nvarchar](120) NULL,
- [iorderdid] [int] NULL,
- [iordertype] [tinyint] NULL,
- [csoordercode] [nvarchar](50) NULL,
- [iorderseq] [int] NULL,
- [cBatchProperty1] [decimal](38, 8) NULL,
- [cBatchProperty2] [decimal](38, 8) NULL,
- [cBatchProperty3] [decimal](38, 8) NULL,
- [cBatchProperty4] [decimal](38, 8) NULL,
- [cBatchProperty5] [decimal](38, 8) NULL,
- [cBatchProperty6] [nvarchar](120) NULL,
- [cBatchProperty7] [nvarchar](120) NULL,
- [cBatchProperty8] [nvarchar](120) NULL,
- [cBatchProperty9] [nvarchar](120) NULL,
- [cBatchProperty10] [datetime] NULL,
- [ivouchrowno] [int] NULL,
- [irowno] [int] NULL,
- [cbMemo] [nvarchar](255) NULL,
- [cbsysbarcode] [nvarchar](80) NULL,
- [carrivalcode] [nvarchar](80) NULL,
- [ipickedquantity] [float] NULL,
- [ipickednum] [float] NULL,
- [iSourceMOCode] [nvarchar](60) NULL,
- [iSourceMODetailsID] [int] NULL,
- [freworkquantity] decimal(26,4) NULL,
- [freworknum] decimal(26,4) NULL,
- [fsumreworkquantity] decimal(26,4) NULL,
- [fsumreworknum] decimal(26,4) NULL,
- [iProductType] [tinyint] NULL,
- [cMainInvCode] [nvarchar](60) NULL,
- [iMainMoDetailsID] [int] NULL,
- [PlanLotNumber] [nvarchar](40) NULL,
- [bgift] [smallint] NULL,
- [cFactoryCode] [nvarchar](50) NULL
- )
- go
- CREATE TABLE [dbo].[DispatchList](
- sysid int identity(1,1),
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0), --0:从U8到中间库,1:从旺店通到中间库
- [DLID] [int] NOT NULL,
- [cDLCode] [nvarchar](30) NULL,
- [cVouchType] [nvarchar](2) NOT NULL,
- [cSTCode] [nvarchar](2) NOT NULL,
- [dDate] [datetime] NOT NULL,
- [cRdCode] [nvarchar](5) NULL,
- [cDepCode] [nvarchar](12) NOT NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [SBVID] [int] NULL,
- [cSBVCode] [nvarchar](255) NULL,
- [cSOCode] [nvarchar](30) NULL,
- [cCusCode] [nvarchar](20) NULL,
- [cPayCode] [nvarchar](3) NULL,
- [cSCCode] [nvarchar](2) NULL,
- [cShipAddress] [nvarchar](255) NULL,
- [cexch_name] [nvarchar](8) NOT NULL,
- [iExchRate] [float] NOT NULL,
- [iTaxRate] [float] NULL,
- [bFirst] [bit] NOT NULL,
- [bReturnFlag] [bit] NOT NULL,
- [bSettleAll] [bit] NOT NULL,
- [cMemo] [nvarchar](255) NULL,
- [cSaleOut] [nvarchar](255) NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [cVerifier] [nvarchar](20) NULL,
- [cMaker] [nvarchar](20) NULL,
- [iNetLock] [real] NULL,
- [iSale] [smallint] NULL,
- [cCusName] [nvarchar](120) NULL,
- [iVTid] [int] NOT NULL,
- [ufts] [timestamp] NULL,
- [cBusType] [nvarchar](8) NULL,
- [cCloser] [nvarchar](20) NULL,
- [cAccounter] [nvarchar](20) NULL,
- [cCreChpName] [nvarchar](20) NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [bIAFirst] [bit] NULL,
- [ioutgolden] [int] NULL,
- [cgatheringplan] [nvarchar](20) NULL,
- [dCreditStart] [datetime] NULL,
- [dGatheringDate] [datetime] NULL,
- [icreditdays] [int] NULL,
- [bCredit] [bit] NULL,
- [caddcode] [nvarchar](30) NULL,
- [iverifystate] [int] NULL,
- [ireturncount] [tinyint] NULL,
- [iswfcontrolled] [tinyint] NULL,
- [icreditstate] [varchar](20) NULL,
- [bARFirst] [bit] NULL,
- [cmodifier] [nvarchar](20) NULL,
- [dmoddate] [datetime] NULL,
- [dverifydate] [datetime] NULL,
- [ccusperson] [nvarchar](100) NULL,
- [dcreatesystime] [datetime] NULL,
- [dverifysystime] [datetime] NULL,
- [dmodifysystime] [datetime] NULL,
- [csvouchtype] [nvarchar](10) NULL,
- [iflowid] [int] NULL,
- [bsigncreate] [bit] NULL,
- [bcashsale] [bit] NULL,
- [cgathingcode] [nvarchar](255) NULL,
- [cChanger] [nvarchar](20) NULL,
- [cChangeMemo] [nvarchar](255) NULL,
- [outid] [uniqueidentifier] NULL,
- [bmustbook] [bit] NULL,
- [cBookDepcode] [nvarchar](12) NULL,
- [cBookType] [nvarchar](10) NULL,
- [bSaUsed] [bit] NULL,
- [bneedbill] [bit] NULL,
- [baccswitchflag] [bit] NULL,
- [iPrintCount] [int] NULL,
- [ccuspersoncode] [nvarchar](30) NULL,
- [cSourceCode] [nvarchar](60) NULL,
- [bsaleoutcreatebill] [bit] NULL,
- [cSysBarCode] [nvarchar](60) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL,
- [csscode] [nvarchar](3) NULL,
- [cinvoicecompany] [nvarchar](20) NULL,
- [fEBweight] [decimal](30, 9) NULL,
- [cEBweightUnit] [nvarchar](50) NULL,
- [cEBExpressCode] [nvarchar](50) NULL,
- [iEBExpressCoID] [bigint] NULL,
- [SeparateID] [int] NULL,
- [bNotToGoldTax] [tinyint] NULL,
- [cEBTrnumber] [nvarchar](80) NULL,
- [cEBBuyer] [nvarchar](2000) NULL,
- [cEBBuyerNote] [nvarchar](4000) NULL,
- [ccontactname] [nvarchar](255) NULL,
- [cEBprovince] [nvarchar](20) NULL,
- [cEBcity] [nvarchar](20) NULL,
- [cEBdistrict] [nvarchar](60) NULL,
- [cmobilephone] [nvarchar](50) NULL,
- [cInvoiceCusName] [nvarchar](255) NULL,
- [cweighter] [nvarchar](40) NULL,
- [dweighttime] [datetime] NULL,
- [cPickVouchCode] [nvarchar](255) NULL,
- [cGCRouteCode] [nvarchar](10) NULL
- )
- go
- CREATE TABLE [dbo].[DispatchLists](
- [AutoID] [int] IDENTITY(1,1) NOT NULL,
- [DLID] [int] NOT NULL,
- [iCorID] [int] NULL,
- [cWhCode] [nvarchar](10) NULL,
- [cInvCode] [nvarchar](60) NULL,
- [iQuantity] [decimal](30, 10) NULL,
- [iNum] [decimal](30, 10) NULL,
- [iQuotedPrice] [decimal](30, 10) NULL,
- [iUnitPrice] [decimal](30, 10) NULL,
- [iTaxUnitPrice] [decimal](30, 10) NULL,
- [iMoney] [money] NULL,
- [iTax] [money] NULL,
- [iSum] [money] NULL,
- [iDisCount] [money] NULL,
- [iNatUnitPrice] [decimal](30, 10) NULL,
- [iNatMoney] [money] NULL,
- [iNatTax] [money] NULL,
- [iNatSum] [money] NULL,
- [iNatDisCount] [money] NULL,
- [iSettleNum] [decimal](30, 10) NULL,
- [iSettleQuantity] [decimal](30, 10) NULL,
- [iBatch] [int] NULL,
- [cBatch] [nvarchar](60) NULL,
- [bSettleAll] [bit] NOT NULL,
- [cMemo] [nvarchar](255) NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [iTB] [tinyint] NULL,
- [dvDate] [datetime] NULL,
- [TBQuantity] [decimal](26, 9) NULL,
- [TBNum] [decimal](26, 9) NULL,
- [iSOsID] [int] NULL,
- [iDLsID] [int] NOT NULL,
- [KL] [decimal](30, 10) NULL,
- [KL2] [decimal](30, 10) NULL,
- [cInvName] [nvarchar](255) NULL,
- [iTaxRate] [decimal](30, 10) NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [fOutQuantity] [decimal](30, 10) NULL,
- [fOutNum] [decimal](30, 10) NULL,
- [cItemCode] [nvarchar](60) NULL,
- [cItem_class] [nvarchar](10) NULL,
- [fSaleCost] [decimal](30, 10) NULL,
- [fSalePrice] [decimal](30, 10) NULL,
- [cVenAbbName] [nvarchar](60) NULL,
- [cItemName] [nvarchar](255) NULL,
- [cItem_CName] [nvarchar](20) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [bIsSTQc] [bit] NULL,
- [iInvExchRate] decimal(26,4) NULL,
- [cUnitID] [nvarchar](35) NULL,
- [cCode] [nvarchar](30) NULL,
- [iRetQuantity] decimal(26,4) NULL,
- [fEnSettleQuan] decimal(26,4) NULL,
- [fEnSettleSum] [money] NULL,
- [iSettlePrice] [decimal](30, 10) NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [dMDate] [datetime] NULL,
- [bGsp] [bit] NULL,
- [cGspState] [nvarchar](20) NULL,
- [cSoCode] [nvarchar](30) NULL,
- [cCorCode] [nvarchar](30) NULL,
- [iPPartSeqID] [int] NULL,
- [iPPartID] [int] NULL,
- [iPPartQty] decimal(26,4) NULL,
- [cContractID] [nvarchar](64) NULL,
- [cContractTagCode] [nvarchar](150) NULL,
- [cContractRowGuid] [uniqueidentifier] ROWGUIDCOL NULL,
- [iMassDate] [int] NULL,
- [cMassUnit] [smallint] NULL,
- [bQANeedCheck] [bit] NOT NULL,
- [bQAUrgency] [bit] NOT NULL,
- [bQAChecking] [bit] NOT NULL,
- [bQAChecked] [bit] NOT NULL,
- [iQAQuantity] [decimal](30, 10) NULL,
- [iQANum] [decimal](30, 10) NULL,
- [cCusInvCode] [nvarchar](60) NULL,
- [cCusInvName] [nvarchar](100) NULL,
- [fsumsignquantity] [decimal](26, 9) NULL,
- [fsumsignnum] [decimal](26, 9) NULL,
- [cbaccounter] [nvarchar](30) NULL,
- [bcosting] [bit] NOT NULL,
- [cordercode] [nvarchar](30) NULL,
- [iorderrowno] [bigint] NULL,
- [fcusminprice] [decimal](26, 9) NULL,
- [icostquantity] [decimal](26, 9) NULL,
- [icostsum] [money] NULL,
- [ispecialtype] [tinyint] NULL,
- [cvmivencode] [nvarchar](20) NULL,
- [iexchsum] [money] NULL,
- [imoneysum] [money] NULL,
- [irowno] [bigint] NULL,
- [frettbquantity] [decimal](26, 9) NULL,
- [fretsum] [decimal](26, 9) NULL,
- [iExpiratDateCalcu] [smallint] NULL,
- [dExpirationdate] [datetime] NULL,
- [cExpirationdate] [nvarchar](20) NULL,
- [cbatchproperty1] [decimal](38, 8) NULL,
- [cbatchproperty2] [decimal](38, 8) NULL,
- [cbatchproperty3] [decimal](38, 8) NULL,
- [cbatchproperty4] [decimal](38, 8) NULL,
- [cbatchproperty5] [decimal](38, 8) NULL,
- [cbatchproperty6] [nvarchar](120) NULL,
- [cbatchproperty7] [nvarchar](120) NULL,
- [cbatchproperty8] [nvarchar](120) NULL,
- [cbatchproperty9] [nvarchar](120) NULL,
- [cbatchproperty10] [datetime] NULL,
- [dblPreExchMomey] [decimal](29, 6) NULL,
- [dblPreMomey] [decimal](29, 6) NULL,
- [idemandtype] [smallint] NULL,
- [cdemandcode] [nvarchar](40) NULL,
- [cdemandmemo] [nvarchar](300) NULL,
- [cdemandid] [nvarchar](30) NULL,
- [idemandseq] [bigint] NULL,
- [cvencode] [nvarchar](20) NULL,
- [cReasonCode] [nvarchar](10) NULL,
- [cInvSN] [nvarchar](200) NULL,
- [iInvSNCount] [int] NULL,
- [bneedsign] [bit] NULL,
- [bsignover] [bit] NULL,
- [bneedloss] [bit] NULL,
- [flossrate] [decimal](29, 6) NULL,
- [frlossqty] [decimal](29, 6) NULL,
- [fulossqty] [decimal](29, 6) NULL,
- [isettletype] [smallint] NULL,
- [crelacuscode] [nvarchar](20) NULL,
- [cLossMaker] [nvarchar](20) NULL,
- [dLossDate] [datetime] NULL,
- [dLossTime] [datetime] NULL,
- [icoridlsid] [bigint] NULL,
- [fretoutqty] [decimal](29, 6) NULL,
- [body_outid] [uniqueidentifier] NULL,
- [fVeriBillQty] [decimal](26, 9) NULL,
- [fVeriBillSum] [money] NULL,
- [fVeriRetQty] [decimal](26, 9) NULL,
- [fVeriRetSum] [money] NULL,
- [fLastSettleQty] [decimal](26, 9) NULL,
- [fLastSettleSum] [money] NULL,
- [cBookWhcode] [nvarchar](10) NULL,
- [cInVouchType] [nvarchar](2) NULL,
- [cPosition] [nvarchar](20) NULL,
- [fretqtywkp] [decimal](26, 9) NULL,
- [fretqtyykp] [decimal](26, 9) NULL,
- [frettbqtyykp] [decimal](26, 9) NULL,
- [fretsumykp] [decimal](26, 9) NULL,
- [dkeepdate] [datetime] NULL,
- [cSCloser] [nvarchar](20) NULL,
- [isaleoutid] [bigint] NULL,
- [bsaleprice] [bit] NULL,
- [bgift] [bit] NULL,
- [bmpforderclosed] [bit] NULL,
- [cbSysBarCode] [nvarchar](80) NULL,
- [fxjquantity] [float] NULL,
- [fxjnum] [float] NULL,
- [bIAcreatebill] [bit] NULL,
- [cParentCode] [nvarchar](50) NULL,
- [cChildCode] [nvarchar](50) NULL,
- [fchildqty] [decimal](30, 9) NULL,
- [fchildrate] [decimal](30, 9) NULL,
- [iCalcType] [tinyint] NULL,
- [fappretwkpqty] [decimal](30, 9) NULL,
- [fappretwkpsum] [decimal](30, 9) NULL,
- [fappretykpqty] [decimal](30, 9) NULL,
- [fappretykpsum] [decimal](30, 9) NULL,
- [fappretwkptbqty] [decimal](30, 9) NULL,
- [fappretykptbqty] [decimal](30, 9) NULL,
- [irtnappid] [bigint] NULL,
- [crtnappcode] [nvarchar](30) NULL,
- [fretailrealamount] [decimal](26, 9) NULL,
- [fretailsettleamount] [decimal](26, 9) NULL,
- [cFactoryCode] [nvarchar](50) NULL,
- [GCSourceId] [int] NULL,
- [GCSourceIds] [int] NULL)
- go
-
-
- CREATE TABLE [dbo].[SO_SOMain](
- sysid int identity(1,1),
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0), --0:从U8到中间库,1:从旺店通到中间库
- [cSTCode] [nvarchar](2) NOT NULL,
- [dDate] [datetime] NOT NULL,
- [cSOCode] [nvarchar](30) NULL,
- [cCusCode] [nvarchar](20) NULL,
- [cDepCode] [nvarchar](12) NOT NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [cSCCode] [nvarchar](2) NULL,
- [cCusOAddress] [nvarchar](255) NULL,
- [cPayCode] [nvarchar](3) NULL,
- [cexch_name] [nvarchar](8) NOT NULL,
- [iExchRate] [float] NULL,
- [iTaxRate] [float] NULL,
- [iMoney] [money] NULL,
- [cMemo] [nvarchar](255) NULL,
- [iStatus] [tinyint] NULL,
- [cMaker] [nvarchar](20) NULL,
- [cVerifier] [nvarchar](20) NULL,
- [cCloser] [nvarchar](20) NULL,
- [bDisFlag] [bit] NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [bReturnFlag] [bit] NOT NULL,
- [cCusName] [nvarchar](120) NULL,
- [bOrder] [bit] NULL,
- [ID] [int] NOT NULL,
- [iVTid] [int] NOT NULL,
- [ufts] [timestamp] NULL,
- [cChanger] [nvarchar](20) NULL,
- [cBusType] [nvarchar](8) NOT NULL,
- [cCreChpName] [nvarchar](20) NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [coppcode] [nvarchar](60) NULL,
- [cLocker] [nvarchar](20) NULL,
- [dPreMoDateBT] [datetime] NULL,
- [dPreDateBT] [datetime] NULL,
- [cgatheringplan] [nvarchar](20) NULL,
- [caddcode] [nvarchar](30) NULL,
- [iverifystate] [int] NULL,
- [ireturncount] [tinyint] NULL,
- [iswfcontrolled] [tinyint] NULL,
- [icreditstate] [varchar](20) NULL,
- [cmodifier] [nvarchar](20) NULL,
- [dmoddate] [datetime] NULL,
- [dverifydate] [datetime] NULL,
- [ccusperson] [nvarchar](100) NULL,
- [dcreatesystime] [datetime] NULL,
- [dverifysystime] [datetime] NULL,
- [dmodifysystime] [datetime] NULL,
- [iflowid] [int] NULL,
- [bcashsale] [bit] NULL,
- [cgathingcode] [nvarchar](255) NULL,
- [cChangeVerifier] [nvarchar](20) NULL,
- [dChangeVerifyDate] [datetime] NULL,
- [dChangeVerifyTime] [datetime] NULL,
- [outid] [uniqueidentifier] NULL,
- [ccuspersoncode] [nvarchar](30) NULL,
- [dclosedate] [datetime] NULL,
- [dclosesystime] [datetime] NULL,
- [iPrintCount] [float] NULL,
- [fbookratio] [float] NULL,
- [bmustbook] [bit] NULL,
- [fbooksum] [money] NULL,
- [fbooknatsum] [money] NULL,
- [fgbooksum] [money] NULL,
- [fgbooknatsum] [money] NULL,
- [csvouchtype] [nvarchar](10) NULL,
- [cCrmPersonCode] [nvarchar](255) NULL,
- [cCrmPersonName] [nvarchar](255) NULL,
- [cMainPersonCode] [nvarchar](255) NULL,
- [cSysBarCode] [nvarchar](60) NULL,
- [ioppid] [int] NULL,
- [optnty_name] [nvarchar](255) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL,
- [contract_status] [smallint] NULL,
- [csscode] [nvarchar](3) NULL,
- [cinvoicecompany] [nvarchar](20) NULL,
- [cAttachment] [nvarchar](255) NULL,
- [cEBTrnumber] [nvarchar](80) NULL,
- [cEBBuyer] [nvarchar](2000) NULL,
- [cEBBuyerNote] [nvarchar](4000) NULL,
- [ccontactname] [nvarchar](255) NULL,
- [cEBprovince] [nvarchar](20) NULL,
- [cEBcity] [nvarchar](20) NULL,
- [cEBdistrict] [nvarchar](60) NULL,
- [cmobilephone] [nvarchar](50) NULL,
- [cInvoiceCusName] [nvarchar](255) NULL,
- [cGCRouteCode] [nvarchar](10) NULL)
- go
-
-
- CREATE TABLE [dbo].[SO_SODetails](
- [AutoID] [int] IDENTITY(1,1) NOT NULL,
- [cSOCode] [nvarchar](30) NULL,
- [cInvCode] [nvarchar](60) NULL,
- [dPreDate] [datetime] NULL,
- [iQuantity] [decimal](30, 10) NULL,
- [iNum] [decimal](30, 10) NULL,
- [iQuotedPrice] [decimal](30, 10) NULL,
- [iUnitPrice] [decimal](30, 10) NULL,
- [iTaxUnitPrice] [decimal](30, 10) NULL,
- [iMoney] [money] NULL,
- [iTax] [money] NULL,
- [iSum] [money] NULL,
- [iDisCount] [money] NULL,
- [iNatUnitPrice] [decimal](30, 10) NULL,
- [iNatMoney] [money] NULL,
- [iNatTax] [money] NULL,
- [iNatSum] [money] NULL,
- [iNatDisCount] [money] NULL,
- [iFHNum] [decimal](30, 10) NULL,
- [iFHQuantity] [decimal](30, 10) NULL,
- [iFHMoney] [money] NULL,
- [iKPQuantity] [decimal](30, 10) NULL,
- [iKPNum] [decimal](30, 10) NULL,
- [iKPMoney] [money] NULL,
- [cMemo] [nvarchar](255) NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [bFH] [int] NULL,
- [iSOsID] [int] NOT NULL,
- [KL] [decimal](30, 10) NULL,
- [KL2] [decimal](30, 10) NULL,
- [cInvName] [nvarchar](255) NULL,
- [iTaxRate] [decimal](30, 10) NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [cItemCode] [nvarchar](60) NULL,
- [cItem_class] [nvarchar](10) NULL,
- [cItemName] [nvarchar](255) NULL,
- [cItem_CName] [nvarchar](20) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [iInvExchRate] decimal(26,4) NULL,
- [cUnitID] [nvarchar](35) NULL,
- [ID] [int] NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [FPurQuan] decimal(26,4) NULL,
- [fSaleCost] [decimal](30, 10) NULL,
- [fSalePrice] [decimal](30, 10) NULL,
- [cQuoCode] [nvarchar](30) NULL,
- [iQuoID] [int] NULL,
- [cSCloser] [nvarchar](20) NULL,
- [dPreMoDate] [datetime] NULL,
- [iRowNo] [int] NULL,
- [iCusBomID] [int] NULL,
- [iMoQuantity] decimal(26,4) NULL,
- [cContractID] [nvarchar](64) NULL,
- [cContractTagCode] [nvarchar](150) NULL,
- [cContractRowGuid] [uniqueidentifier] ROWGUIDCOL NULL,
- [iPPartSeqID] [int] NULL,
- [iPPartID] [int] NULL,
- [iPPartQty] decimal(26,4) NULL,
- [cCusInvCode] [nvarchar](60) NULL,
- [cCusInvName] [nvarchar](100) NULL,
- [iPreKeepQuantity] decimal(26,4) NULL,
- [iPreKeepNum] decimal(26,4) NULL,
- [iPreKeepTotQuantity] decimal(26,4) NULL,
- [iPreKeepTotNum] decimal(26,4) NULL,
- [dreleasedate] [datetime] NULL,
- [fcusminprice] [decimal](26, 9) NULL,
- [fimquantity] [decimal](26, 9) NULL,
- [fomquantity] [decimal](26, 9) NULL,
- [ballpurchase] [bit] NULL,
- [finquantity] [decimal](26, 9) NULL,
- [icostquantity] [decimal](26, 9) NULL,
- [icostsum] [money] NULL,
- [foutquantity] [decimal](26, 9) NULL,
- [foutnum] [decimal](26, 9) NULL,
- [iexchsum] [money] NULL,
- [imoneysum] [money] NULL,
- [dufts] [timestamp] NULL,
- [iaoids] [int] NULL,
- [cpreordercode] [nvarchar](30) NULL,
- [fretquantity] [decimal](29, 6) NULL,
- [fretnum] [decimal](29, 6) NULL,
- [dbclosedate] [datetime] NULL,
- [dbclosesystime] [datetime] NULL,
- [bOrderBOM] [bit] NULL,
- [bOrderBOMOver] [tinyint] NULL,
- [idemandtype] [smallint] NULL,
- [cdemandcode] [nvarchar](40) NULL,
- [cdemandmemo] [nvarchar](300) NULL,
- [fPurSum] [decimal](26, 9) NULL,
- [fPurBillQty] [decimal](26, 9) NULL,
- [fPurBillSum] [decimal](26, 9) NULL,
- [iimid] [bigint] NULL,
- [ccorvouchtype] [nvarchar](10) NULL,
- [icorrowno] [int] NULL,
- [busecusbom] [bit] NULL,
- [body_outid] [uniqueidentifier] NULL,
- [fVeriDispQty] [decimal](26, 9) NULL,
- [fVeriDispSum] [money] NULL,
- [bsaleprice] [bit] NULL,
- [bgift] [bit] NULL,
- [forecastdid] [int] NULL,
- [cdetailsdemandcode] [nvarchar](40) NULL,
- [cdetailsdemandmemo] [nvarchar](300) NULL,
- [fTransedQty] [decimal](30, 10) NULL,
- [cbSysBarCode] [nvarchar](80) NULL,
- [fappqty] [decimal](30, 9) NULL,
- [cParentCode] [nvarchar](50) NULL,
- [cChildCode] [nvarchar](50) NULL,
- [fchildqty] [decimal](30, 9) NULL,
- [fchildrate] [decimal](30, 9) NULL,
- [iCalcType] [tinyint] NULL,
- [iCurPartid] [bigint] NULL,
- [cFactoryCode] [nvarchar](50) NULL,
- [GCSourceId] [int] NULL,
- [GCSourceIds] [int] NULL)
- go
- CREATE TABLE [dbo].[Customer](
- sysid int identity(1,1),
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0), --0:从U8到中间库,1:从旺店通到中间库
- [cCusCode] [nvarchar](20) NOT NULL,
- [cCusName] [nvarchar](98) NULL,
- [cCusAbbName] [nvarchar](60) NOT NULL,
- [cCCCode] [nvarchar](12) NULL,
- [cDCCode] [nvarchar](12) NULL,
- [cTrade] [nvarchar](50) NULL,
- [cCusAddress] [nvarchar](255) NULL,
- [cCusPostCode] [nvarchar](20) NULL,
- [cCusRegCode] [nvarchar](50) NULL,
- [cCusBank] [nvarchar](100) NULL,
- [cCusAccount] [nvarchar](50) NULL,
- [dCusDevDate] [datetime] NULL,
- [cCusLPerson] [nvarchar](100) NULL,
- [cCusEmail] [nvarchar](100) NULL,
- [cCusPerson] [nvarchar](50) NULL,
- [cCusPhone] [nvarchar](100) NULL,
- [cCusFax] [nvarchar](100) NULL,
- [cCusBP] [nvarchar](20) NULL,
- [cCusHand] [nvarchar](100) NULL,
- [cCusPPerson] [nvarchar](20) NULL,
- [iCusDisRate] [float] NULL,
- [cCusCreGrade] [nvarchar](6) NULL,
- [iCusCreLine] [float] NULL,
- [iCusCreDate] [int] NULL,
- [cCusPayCond] [nvarchar](20) NULL,
- [cCusOAddress] [nvarchar](255) NULL,
- [cCusOType] [nvarchar](10) NULL,
- [cCusHeadCode] [nvarchar](20) NULL,
- [cCusWhCode] [nvarchar](10) NULL,
- [cCusDepart] [nvarchar](12) NULL,
- [iARMoney] [float] NULL,
- [dLastDate] [datetime] NULL,
- [iLastMoney] [float] NULL,
- [dLRDate] [datetime] NULL,
- [iLRMoney] [float] NULL,
- [dEndDate] [datetime] NULL,
- [iFrequency] [int] NULL,
- [cCusDefine1] [nvarchar](20) NULL,
- [cCusDefine2] [nvarchar](20) NULL,
- [cCusDefine3] [nvarchar](20) NULL,
- [iCostGrade] [smallint] NULL,
- [cCreatePerson] [nvarchar](20) NULL,
- [cModifyPerson] [nvarchar](20) NULL,
- [dModifyDate] [datetime] NULL,
- [cRelVendor] [nvarchar](20) NULL,
- [iId] [nvarchar](40) NULL,
- [cPriceGroup] [nvarchar](20) NULL,
- [cOfferGrade] [nvarchar](20) NULL,
- [iOfferRate] [float] NULL,
- [cCusDefine4] [nvarchar](60) NULL,
- [cCusDefine5] [nvarchar](60) NULL,
- [cCusDefine6] [nvarchar](60) NULL,
- [cCusDefine7] [nvarchar](120) NULL,
- [cCusDefine8] [nvarchar](120) NULL,
- [cCusDefine9] [nvarchar](120) NULL,
- [cCusDefine10] [nvarchar](120) NULL,
- [cCusDefine11] [int] NULL,
- [cCusDefine12] [int] NULL,
- [cCusDefine13] [float] NULL,
- [cCusDefine14] [float] NULL,
- [cCusDefine15] [datetime] NULL,
- [cCusDefine16] [datetime] NULL,
- [pubufts] [timestamp] NULL,
- [cInvoiceCompany] [nvarchar](60) NULL,
- [bCredit] [bit] NOT NULL,
- [bCreditDate] [bit] NOT NULL,
- [bCreditByHead] [bit] NOT NULL,
- [bLicenceDate] [bit] NOT NULL,
- [dLicenceSDate] [datetime] NULL,
- [dLicenceEDate] [datetime] NULL,
- [iLicenceADays] [int] NULL,
- [bBusinessDate] [bit] NOT NULL,
- [dBusinessSDate] [datetime] NULL,
- [dBusinessEDate] [datetime] NULL,
- [iBusinessADays] [int] NULL,
- [bProxy] [bit] NOT NULL,
- [dProxySDate] [datetime] NULL,
- [dProxyEDate] [datetime] NULL,
- [iProxyADays] [int] NULL,
- [cMemo] [nvarchar](1000) NULL,
- [bLimitSale] [bit] NOT NULL,
- [cCusContactCode] [uniqueidentifier] NULL,
- [cCusCountryCode] [nvarchar](10) NULL,
- [cCusEnName] [nvarchar](100) NULL,
- [cCusEnAddr1] [nvarchar](60) NULL,
- [cCusEnAddr2] [nvarchar](60) NULL,
- [cCusEnAddr3] [nvarchar](60) NULL,
- [cCusEnAddr4] [nvarchar](60) NULL,
- [cCusPortCode] [nvarchar](10) NULL,
- [cPrimaryVen] [nvarchar](20) NULL,
- [fCommisionRate] [float] NULL,
- [fInsueRate] [float] NULL,
- [bHomeBranch] [bit] NOT NULL,
- [cBranchAddr] [nvarchar](255) NULL,
- [cBranchPhone] [nvarchar](100) NULL,
- [cBranchPerson] [nvarchar](50) NULL,
- [cCusTradeCCode] [nvarchar](12) NULL,
- [CustomerKCode] [nvarchar](4) NULL,
- [bCusState] [bit] NOT NULL,
- [bShop] [smallint] NULL,
- [cCusBankCode] [nvarchar](50) NULL,
- [cCusExch_name] [nvarchar](50) NULL,
- [iCusGSPType] [smallint] NOT NULL,
- [iCusGSPAuth] [smallint] NULL,
- [cCusGSPAuthNo] [nvarchar](120) NULL,
- [cCusBusinessNo] [nvarchar](120) NULL,
- [cCusLicenceNo] [nvarchar](20) NULL,
- [bCusDomestic] [bit] NOT NULL,
- [bCusOverseas] [bit] NOT NULL,
- [cCusCreditCompany] [nvarchar](20) NULL,
- [cCusSAProtocol] [nvarchar](20) NULL,
- [cCusExProtocol] [nvarchar](20) NULL,
- [cCusOtherProtocol] [nvarchar](20) NULL,
- [fCusDiscountRate] [float] NULL,
- [cCusSSCode] [nvarchar](20) NULL,
- [cCusCMProtocol] [nvarchar](20) NULL,
- [dCusCreateDatetime] [datetime] NOT NULL,
- [cCusAppDocNo] [nvarchar](50) NULL,
- [cCusMnemCode] [nvarchar](98) NULL,
- [fAdvancePaymentRatio] [float] NULL,
- [bServiceAttribute] [bit] NOT NULL,
- [bRequestSign] [bit] NOT NULL,
- [bOnGPinStore] [bit] NULL,
- [cCusMngTypeCode] [nvarchar](32) NULL,
- [account_type] [numeric](22, 0) NULL,
- [cCusImAgentProtocol] [nvarchar](20) NULL,
- [iSourceType] [smallint] NULL,
- [iSourceId] [varchar](20) NULL,
- [fExpense] [float] NULL,
- [fApprovedExpense] [float] NULL,
- [dTouchedTime] [datetime] NULL,
- [dRecentlyInvoiceTime] [datetime] NULL,
- [dRecentlyQuoteTime] [datetime] NULL,
- [dRecentlyActivityTime] [datetime] NULL,
- [dRecentlyChanceTime] [datetime] NULL,
- [dRecentlyContractTime] [datetime] NULL,
- [cLtcCustomerCode] [nvarchar](100) NULL,
- [bTransFlag] [bit] NULL,
- [cLtcPerson] [nvarchar](40) NULL,
- [dLtcDate] [datetime] NULL,
- [cLocationSite] [nvarchar](128) NULL,
- [iCusTaxRate] [float] NULL,
- [alloct_dept_time] [datetime] NULL,
- [allot_user_time] [datetime] NULL,
- [recyle_dept_time] [datetime] NULL,
- [recyle_pub_time] [datetime] NULL,
- [cLicenceNo] [nvarchar](120) NULL,
- [cLicenceRange] [nvarchar](255) NULL,
- [cCusBusinessRange] [nvarchar](255) NULL,
- [cCusGSPAuthRange] [nvarchar](255) NULL,
- [dCusGSPEDate] [datetime] NULL,
- [dCusGSPSDate] [datetime] NULL,
- [iCusGSPADays] [int] NULL,
- [bIsCusAttachFile] [bit] NULL,
- [dRecentContractDate] [datetime] NULL,
- [dRecentDeliveryDate] [datetime] NULL,
- [dRecentOutboundDate] [datetime] NULL,
- [cProvince] [nvarchar](255) NULL,
- [cCity] [nvarchar](255) NULL,
- [cCounty] [nvarchar](255) NULL,
- [cCusAddressGUID] [uniqueidentifier] NULL,
- [cAddCode] [nvarchar](30) NULL,
- [cCreditAddCode] [nvarchar](18) NULL,
- [cRegCash] [nvarchar](60) NULL,
- [dDepBeginDate] [datetime] NULL,
- [iEmployeeNum] [int] NULL,
- [cURL] [nvarchar](50) NULL,
- [PictureGUID] [uniqueidentifier] NULL
- )
- alter table RdRecord08 add newcode nvarchar(60) null
- alter table RdRecord09 add newcode nvarchar(60) null
- alter table RdRecord01 add newcode nvarchar(60) null
- --alter table RdRecord32 add newcode nvarchar(60) null
- alter table so_somain add newcode nvarchar(60) null
- alter table po_pomain add newcode nvarchar(60) null
- alter table dispatchlist add newcode nvarchar(60) null
- alter table PU_ArrivalVouch add newcode nvarchar(60) null
- alter table transtime
- add lasttime2 datetime
- alter table rdrecords08
- add text_flag bigint
- alter table rdrecords09
- add text_flag bigint
- go
- insert into transtime(entitytype) values('供应商')
- insert into transtime(entitytype) values('仓库')
- insert into transtime(entitytype) values('存货')
- insert into transtime(entitytype) values('其他入库')
- insert into transtime(entitytype) values('其他出库')
- insert into transtime(entitytype) values('采购订单')
- insert into transtime(entitytype) values('采购入库')
- insert into transtime(entitytype) values('采购退货')
- insert into transtime(entitytype) values('销售退货')
- insert into transtime(entitytype) values('销售订单')
- insert into transtime(entitytype) values('材料出库')
- insert into transtime(entitytype) values('组装入库')
- insert into transtime(entitytype) values('组装出库')
- insert into transtime(entitytype) values('委外加工')
- go
- create index i_importdate on rdrecord08(importdate)
- create index i_importdate on rdrecord09(importdate)
- create index i_importdate on rdrecord01(importdate)
- create index i_importdate on PU_ArrivalVouch(importdate)
- create index i_importdate on PO_Pomain(importdate)
- create index i_importdate on DispatchList(importdate)
- create index i_importdate on SO_SOMain(importdate)
- go
- create index i_id on rdrecord08(id)
- create index i_id on rdrecord09(id)
- create index i_id on rdrecord01(id)
- create index i_id on PU_ArrivalVouch(id)
- create index i_id on PO_Pomain(poid)
- create index i_id on DispatchList(dlid)
- create index i_id on SO_SOMain(id)
- go
- create index i_id on rdrecords08(id)
- create index i_id on rdrecords09(id)
- create index i_id on rdrecords01(id)
- create index i_id on PU_ArrivalVouchs(id)
- create index i_id on PO_Podetails(poid)
- create index i_id on DispatchLists(dlid)
- create index i_id on SO_SOdetails(id)
- go
- alter table so_somain
- add platform_id nvarchar(50)
- go
- alter table inventory add cInvDefine1 nvarchar(20)
- alter table inventory add cInvDefine2 nvarchar(20)
- alter table inventory add cInvDefine3 nvarchar(20)
- alter table inventory add cInvDefine4 nvarchar(60)
- alter table inventory add cInvDefine5 nvarchar(60)
- alter table inventory add cInvDefine6 nvarchar(60)
- alter table inventory add cInvDefine7 nvarchar(120)
- alter table inventory add cInvDefine8 nvarchar(120)
- alter table inventory add cInvDefine9 nvarchar(120)
- alter table inventory add cInvDefine10 nvarchar(120)
- alter table inventory add cInvDefine11 int
- alter table inventory add cInvDefine12 int
- alter table inventory add cInvDefine13 decimal(26,4)
- alter table inventory add cInvDefine14 decimal(26,4)
- alter table inventory add fRetailPrice decimal(26,4)
- go
- alter table vendor add contact nvarchar(30)
- alter table vendor add phone nvarchar(100)
- alter table vendor add mobile nvarchar(100)
- alter table vendor add fax nvarchar(100)
- alter table vendor add email nvarchar(100)
- alter table vendor add cVenDefine11 int
- alter table vendor add cVenDefine1 nvarchar(20)
- alter table vendor add cVenDefine2 nvarchar(20)
- alter table vendor add cVenDefine3 nvarchar(20)
- alter table vendor add cVenDefine4 nvarchar(60)
- alter table vendor add cVenDefine5 nvarchar(60)
- alter table vendor add cVenDefine6 nvarchar(60)
- alter table vendor add cVenDefine7 nvarchar(120)
- alter table vendor add address nvarchar(255)
- alter table vendor add cmemo nvarchar(240)
- alter table vendor add bank_acc_number nvarchar(120)
- alter table vendor add bank_open nvarchar(120)
- go
- --销售出库单
- CREATE TABLE [dbo].[rdrecord32](
- [ID] [bigint] NOT NULL,
- [bRdFlag] [tinyint] NOT NULL,
- [cVouchType] [nvarchar](2) NOT NULL,
- [cBusType] [nvarchar](12) NULL,
- [cSource] [nvarchar](50) NOT NULL,
- [cBusCode] [nvarchar](30) NULL,
- [cWhCode] [nvarchar](10) NOT NULL,
- [dDate] [datetime] NOT NULL,
- [cCode] [nvarchar](30) NOT NULL,
- [cRdCode] [nvarchar](5) NULL,
- [cDepCode] [nvarchar](12) NULL,
- [cPersonCode] [nvarchar](20) NULL,
- [cPTCode] [nvarchar](2) NULL,
- [cSTCode] [nvarchar](2) NULL,
- [cCusCode] [nvarchar](20) NULL,
- [cVenCode] [nvarchar](20) NULL,
- [cOrderCode] [nvarchar](30) NULL,
- [cARVCode] [nvarchar](30) NULL,
- [cBillCode] [bigint] NULL,
- [cDLCode] [bigint] NULL,
- [cProBatch] [nvarchar](60) NULL,
- [cHandler] [nvarchar](20) NULL,
- [cMemo] [nvarchar](255) NULL,
- [bTransFlag] [bit] NOT NULL,
- [cAccounter] [nvarchar](20) NULL,
- [cMaker] [nvarchar](20) NULL,
- [cDefine1] [nvarchar](20) NULL,
- [cDefine2] [nvarchar](20) NULL,
- [cDefine3] [nvarchar](20) NULL,
- [cDefine4] [datetime] NULL,
- [cDefine5] [int] NULL,
- [cDefine6] [datetime] NULL,
- [cDefine7] [float] NULL,
- [cDefine8] [nvarchar](4) NULL,
- [cDefine9] [nvarchar](8) NULL,
- [cDefine10] [nvarchar](60) NULL,
- [dKeepDate] [nvarchar](5) NULL,
- [dVeriDate] [datetime] NULL,
- [bpufirst] [bit] NULL,
- [biafirst] [bit] NULL,
- [iMQuantity] [float] NULL,
- [dARVDate] [datetime] NULL,
- [cChkCode] [nvarchar](30) NULL,
- [dChkDate] [datetime] NULL,
- [cChkPerson] [nvarchar](40) NULL,
- [VT_ID] [int] NULL,
- [bIsSTQc] [bit] NOT NULL,
- [cDefine11] [nvarchar](120) NULL,
- [cDefine12] [nvarchar](120) NULL,
- [cDefine13] [nvarchar](120) NULL,
- [cDefine14] [nvarchar](120) NULL,
- [cDefine15] [int] NULL,
- [cDefine16] [float] NULL,
- [gspcheck] [nvarchar](10) NULL,
- [isalebillid] [nvarchar](30) NULL,
- [ufts] [timestamp] NULL,
- [iExchRate] [float] NULL,
- [cExch_Name] [nvarchar](8) NULL,
- [cShipAddress] [nvarchar](200) NULL,
- [caddcode] [nvarchar](60) NULL,
- [bOMFirst] [bit] NULL,
- [bFromPreYear] [bit] NULL,
- [bIsLsQuery] [bit] NULL,
- [bIsComplement] [smallint] NULL,
- [iDiscountTaxType] [tinyint] NULL,
- [ireturncount] [int] NULL,
- [iverifystate] [int] NULL,
- [iswfcontrolled] [int] NULL,
- [cModifyPerson] [nvarchar](50) NULL,
- [dModifyDate] [datetime] NULL,
- [dnmaketime] [datetime] NULL,
- [dnmodifytime] [datetime] NULL,
- [dnverifytime] [datetime] NULL,
- [bredvouch] [int] NULL,
- [iFlowId] [int] NULL,
- [cPZID] [nvarchar](30) NULL,
- [cSourceLs] [nvarchar](4) NULL,
- [cSourceCodeLs] [nvarchar](20) NULL,
- [iPrintCount] [int] NULL,
- [csysbarcode] [nvarchar](60) NULL,
- [cCurrentAuditor] [nvarchar](200) NULL,
- [cinvoicecompany] [nvarchar](20) NULL,
- [fEBweight] [decimal](30, 9) NULL,
- [cEBweightUnit] [nvarchar](50) NULL,
- [cEBExpressCode] [nvarchar](50) NULL,
- [bScanExpress] [tinyint] NULL,
- [cinspector] [nvarchar](40) NULL,
- [dinspecttime] [datetime] NULL,
- [cweighter] [nvarchar](40) NULL,
- [dweighttime] [datetime] NULL,
- [bUpLoaded] [tinyint] NULL,
- [outid] [uniqueidentifier] NULL,
- [isMDdispatch] [tinyint] NULL,
- [cCheckSignFlag] [nvarchar](36) NULL,
- [cGCRouteCode] [nvarchar](40) NULL,
- sysid int identity(1,1),
- importdate datetime null default(getdate()),
- processdate datetime null,
- processflag bit default(0),
- direction int default(0), --0:从U8到中间库,1:从旺店通到中间库
- )
- create index i_id on rdrecord32(id)
- GO
- CREATE TABLE [dbo].[rdrecords32](
- [AutoID] [bigint] NOT NULL,
- [ID] [bigint] NOT NULL,
- [cInvCode] [nvarchar](60) NOT NULL,
- [iNum] [decimal](30, 10) NULL,
- [iQuantity] [decimal](30, 10) NULL,
- [iUnitCost] [decimal](30, 10) NULL,
- [iPrice] [money] NULL,
- [iAPrice] [money] NULL,
- [iPUnitCost] [decimal](30, 10) NULL,
- [iPPrice] [money] NULL,
- [cBatch] [nvarchar](60) NULL,
- [cVouchCode] [bigint] NULL,
- [cInVouchCode] [nvarchar](30) NULL,
- [cinvouchtype] [nvarchar](2) NULL,
- [iSOutQuantity] [decimal](30, 10) NULL,
- [iSOutNum] [decimal](30, 10) NULL,
- [coutvouchid] [bigint] NULL,
- [coutvouchtype] [nvarchar](2) NULL,
- [iSRedOutQuantity] [decimal](30, 10) NULL,
- [iSRedOutNum] [decimal](30, 10) NULL,
- [cFree1] [nvarchar](20) NULL,
- [cFree2] [nvarchar](20) NULL,
- [iFlag] [tinyint] NOT NULL,
- [iFNum] [decimal](30, 10) NULL,
- [iFQuantity] [decimal](30, 10) NULL,
- [dVDate] [datetime] NULL,
- [cPosition] [nvarchar](20) NULL,
- [cDefine22] [nvarchar](60) NULL,
- [cDefine23] [nvarchar](60) NULL,
- [cDefine24] [nvarchar](60) NULL,
- [cDefine25] [nvarchar](60) NULL,
- [cDefine26] [float] NULL,
- [cDefine27] [float] NULL,
- [cItem_class] [nvarchar](10) NULL,
- [cItemCode] [nvarchar](60) NULL,
- [iDLsID] [bigint] NULL,
- [iSBsID] [bigint] NULL,
- [iSendQuantity] [decimal](30, 10) NULL,
- [iSendNum] [decimal](30, 10) NULL,
- [iEnsID] [int] NULL,
- [cName] [nvarchar](255) NULL,
- [cItemCName] [nvarchar](20) NULL,
- [cFree3] [nvarchar](20) NULL,
- [cFree4] [nvarchar](20) NULL,
- [cFree5] [nvarchar](20) NULL,
- [cFree6] [nvarchar](20) NULL,
- [cFree7] [nvarchar](20) NULL,
- [cFree8] [nvarchar](20) NULL,
- [cFree9] [nvarchar](20) NULL,
- [cFree10] [nvarchar](20) NULL,
- [cBarCode] [nvarchar](200) NULL,
- [iNQuantity] [decimal](30, 10) NULL,
- [iNNum] [decimal](30, 10) NULL,
- [cAssUnit] [nvarchar](35) NULL,
- [dMadeDate] [datetime] NULL,
- [iMassDate] [int] NULL,
- [cDefine28] [nvarchar](120) NULL,
- [cDefine29] [nvarchar](120) NULL,
- [cDefine30] [nvarchar](120) NULL,
- [cDefine31] [nvarchar](120) NULL,
- [cDefine32] [nvarchar](120) NULL,
- [cDefine33] [nvarchar](120) NULL,
- [cDefine34] [int] NULL,
- [cDefine35] [int] NULL,
- [cDefine36] [datetime] NULL,
- [cDefine37] [datetime] NULL,
- [iCheckIds] [bigint] NULL,
- [cBVencode] [nvarchar](20) NULL,
- [bGsp] [bit] NULL,
- [cGspState] [nvarchar](20) NULL,
- [cCheckCode] [nvarchar](30) NULL,
- [iCheckIdBaks] [bigint] NULL,
- [cRejectCode] [nvarchar](30) NULL,
- [iRejectIds] [bigint] NULL,
- [cCheckPersonCode] [nvarchar](20) NULL,
- [dCheckDate] [datetime] NULL,
- [cMassUnit] [smallint] NULL,
- [iRefundInspectFlag] [tinyint] NULL,
- [strContractId] [nvarchar](64) NULL,
- [strCode] [nvarchar](150) NULL,
- [bChecked] [bit] NULL,
- [iEqDID] [int] NULL,
- [bLPUseFree] [bit] NULL,
- [iRSRowNO] [int] NULL,
- [iOriTrackID] [bigint] NULL,
- [coritracktype] [nvarchar](2) NULL,
- [cbaccounter] [nvarchar](30) NULL,
- [dbKeepDate] [datetime] NULL,
- [bCosting] [bit] NULL,
- [bVMIUsed] [bit] NULL,
- [iVMISettleQuantity] [decimal](30, 10) NULL,
- [iVMISettleNum] [decimal](30, 10) NULL,
- [cvmivencode] [nvarchar](20) NULL,
- [iInvSNCount] [int] NULL,
- [cwhpersoncode] [nvarchar](20) NULL,
- [cwhpersonname] [nvarchar](50) NULL,
- [cserviceoid] [varchar](38) NULL,
- [cbserviceoid] [varchar](38) NULL,
- [iinvexchrate] [decimal](38, 8) NULL,
- [cbdlcode] [nvarchar](30) NULL,
- sysid int identity(1,1)
- )
- create index i_id on rdrecords32(id)
- go
|