You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DSWMS/DB/sqlserver/表结构与数据_针对向DS7执行做相应修改_3.sql

257 lines
7.6 KiB
Transact-SQL

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/****** Object: Table [dbo].[OP_WMS_STOREHOUSE] Script Date: 2020/8/26 9:29:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OP_WMS_STOREHOUSE](
[Id] [int] IDENTITY(1,1) NOT NULL,
[CORPNAME] [varchar](50) NULL,
[AREACODE] [varchar](4) NOT NULL,
[AREANAME] [varchar](50) NULL,
[INUSE] [int] NULL,
[ISOWN] [int] NULL,
[REMARK] [varchar](100) NULL,
CONSTRAINT [PK_OP_WMS_STOREHOUSE_1] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[OP_WMS_STOREHOUSE_AREA] Script Date: 2020/8/26 9:29:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OP_WMS_STOREHOUSE_AREA](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Pid] [int] NOT NULL,
[AREACODE] [varchar](50) NOT NULL,
[AREANAME] [varchar](50) NULL,
[STORAGEUNIT] [varchar](50) NULL,
[STORAGEUNITVOLUME] [int] NULL,
[ISLEAF] [int] NULL,
[INUSE] [int] NULL,
CONSTRAINT [PK_OP_WMS_STOREHOUSE_AREA_1] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[OP_WMS_STOREHOUSE_GOODSTYPE] Script Date: 2020/8/26 9:30:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OP_WMS_STOREHOUSE_GOODSTYPE](
[Id] [int] IDENTITY(1,1) NOT NULL,
[AREACODE] [varchar](50) NULL,
[LINENUM] [int] NULL,
[GOODSCODE] [varchar](50) NULL,
CONSTRAINT [PK_OP_WMS_STOREHOUSE_GOODSTYPE] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[INFO_GOODS] Script Date: 2020/8/26 10:05:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[INFO_GOODS](
[GID] [uniqueidentifier] NOT NULL,
[ACCBOOKID] [uniqueidentifier] NOT NULL,
[GOODSNAME] [varchar](50) NULL,
[GOODSDETAILGID] [varchar](50) NULL,
[MATERIALNO] [varchar](50) NULL,
[HSCODE] [varchar](50) NULL,
[MODEL] [varchar](50) NULL,
[PRICE] [numeric](18, 4) NULL,
[REMARK] [varchar](100) NULL,
CONSTRAINT [PK_INFO_GOODS] PRIMARY KEY CLUSTERED
(
[GID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[INFO_ACCBOOK] Script Date: 2020/8/26 10:05:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[INFO_ACCBOOK](
[ACCBOOKID] [uniqueidentifier] NOT NULL,
[ACCBOOKNO] [varchar](50) NULL,
[REMARK] [varchar](50) NULL,
[TAXNO] [varchar](50) NULL,
[STORAGECODE] [varchar](50) NULL,
[Modifier] [varchar](50) NULL,
[ModifyDate] [datetime] NULL,
CONSTRAINT [PK_INFO_ACCBOOK] PRIMARY KEY CLUSTERED
(
[ACCBOOKID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[OP_WMS_IN_PLAN] Script Date: 2020/8/26 10:26:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OP_WMS_IN_PLAN](
[WMSPLANID] [uniqueidentifier] NOT NULL,
[WMSNO] [varchar](50) NULL,
[MASTERNO] [varchar](50) NULL,
[MASTERTYPE] [varchar](50) NULL,
[OPSTATUS] [varchar](50) NULL,
[BILLTYPE] [varchar](50) NULL,
[APPTIME] [datetime] NULL,
[PLANTIME] [datetime] NULL,
[CUSTOMERNAME] [varchar](50) NULL,
[OP] [varchar](50) NULL,
[SALE] [varchar](50) NULL,
[CORPID] [varchar](50) NULL,
[ACCBOOKNO] [varchar](50) NULL,
[REMARK] [varchar](400) NULL,
[STORAGENAME] [varchar](50) NULL,
[FEETEMPLATEID] [varchar](50) NULL,
[FREESTORAGEPERIOD] [int] NULL,
[FREESTORAGEPERIODAP] [int] NULL,
[Creator] [varchar](50) NULL,
[CreateDate] [datetime] NULL,
[FEESTATUS] [bit] NULL,
[BSSTATUS] [bit] NULL,
[TIMEMARK] [timestamp] NULL,
[ModifyDate] [char](10) NULL,
[Modifier] [char](10) NULL,
CONSTRAINT [PK_OP_WMS_IN_PLAN] PRIMARY KEY CLUSTERED
(
[WMSPLANID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'<EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD>GID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OP_WMS_IN_PLAN', @level2type=N'COLUMN',@level2name=N'FEETEMPLATEID'
GO
/****** Object: Table [dbo].[OP_WMS_IN_PLAN_GOODS] Script Date: 2020/8/26 10:27:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OP_WMS_IN_PLAN_GOODS](
[GID] [uniqueidentifier] NOT NULL,
[WMSPLANID] [uniqueidentifier] NULL,
[MATERIALNO] [varchar](50) NULL,
[GOODSCODE] [varchar](50) NULL,
[GOODSNAME] [varchar](50) NULL,
[GOODSHSCODE] [varchar](50) NULL,
[KGS] [numeric](18, 3) NULL,
[CBM] [numeric](18, 3) NULL,
[PKGS] [numeric](18, 3) NULL,
[KINDPKGS] [varchar](50) NULL,
[STORAGEUNIT] [varchar](50) NULL,
[STORAGEUNITCOUNT] [numeric](18, 3) NULL,
[RULEUNIT] [varchar](50) NULL,
[RULEUNITCOUNT] [numeric](18, 3) NULL,
[REMARK] [varchar](50) NULL,
[WMSBSNO] [varchar](50) NULL,
CONSTRAINT [PK_OP_WMS_IN_PLAN_GOODS] PRIMARY KEY NONCLUSTERED
(
[GID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [AK_KEY_1_OP_WMS_I] UNIQUE NONCLUSTERED
(
[GID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'<EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD>λ/<2F>ִ<EFBFBD><D6B4>Ʒѵ<C6B7>λ
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>շѱ<D5B7>׼<EFBFBD><D7BC>λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OP_WMS_IN_PLAN_GOODS', @level2type=N'COLUMN',@level2name=N'STORAGEUNIT'
GO
INSERT INTO [dbo].[Sys_Menu]
([MenuName]
,[Auth]
,[Icon]
,[Description]
,[Enable]
,[OrderNo]
,[TableName]
,[ParentId]
,[Url]
,[CreateDate]
,[Creator]
,[ModifyDate]
,[Modifier])
VALUES
('<EFBFBD>˲<EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
,'[{"text":"<22><>ѯ","value":"Search"},{"text":"<22>½<EFBFBD>","value":"Add"},{"text":"ɾ<><C9BE>","value":"Delete"},{"text":"<22>༭","value":"Update"},{"text":"<22><><EFBFBD><EFBFBD>","value":"Import"},{"text":"<22><><EFBFBD><EFBFBD>","value":"Export"},{"text":"<22>ϴ<EFBFBD>","value":"Upload"},{"text":"<22><><EFBFBD><EFBFBD>","value":"Audit"}]'
,''
,NULL
,1
,1
,'INFO_ACCBOOK'
,96
,'/INFO_ACCBOOK'
,'2020-08-13 13:52:16.377'
,'ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա'
,'2020-08-13 14:01:37.493'
,'ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա')
GO
INSERT INTO [dbo].[Sys_Menu]
([MenuName]
,[Auth]
,[Icon]
,[Description]
,[Enable]
,[OrderNo]
,[TableName]
,[ParentId]
,[Url]
,[CreateDate]
,[Creator]
,[ModifyDate]
,[Modifier])
VALUES
('<EFBFBD>ֿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ'
,'[{"text":"<22><>ѯ","value":"Search"},{"text":"<22>½<EFBFBD>","value":"Add"},{"text":"ɾ<><C9BE>","value":"Delete"},{"text":"<22>༭","value":"Update"},{"text":"<22><><EFBFBD><EFBFBD>","value":"Import"},{"text":"<22><><EFBFBD><EFBFBD>","value":"Export"},{"text":"<22>ϴ<EFBFBD>","value":"Upload"},{"text":"<22><><EFBFBD><EFBFBD>","value":"Audit"}]'
,''
,NULL
,1
,10
,'OP_WMS_STOREHOUSE'
,96
,'/OP_WMS_STOREHOUSE'
,'2020-08-21 16:24:46.667'
,'ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա'
,'2020-08-13 11:55:08.000'
,'ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա')
GO