--1、试车管道数据补充P&ID图号起止点 IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'PreRun_PropertySysPiping' AND COLUMN_NAME = 'DrawingEndNo') BEGIN ALTER TABLE PreRun_PropertySysPiping ADD DrawingEndNo varchar(50); END GO --IDP试车工作包数据表——管道一览表 IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'IDP_PreRunData_Piping') AND type = N'U') BEGIN CREATE TABLE [dbo].[IDP_PreRunData_Piping]( [ItemId] [varchar](50) NOT NULL, [ProjId] [varchar](50) NULL, [ProjCode] [varchar](50) NULL, [ProjectId] [varchar](50) NULL, [LastTime] [datetime] NOT NULL, [WbsCode] [varchar](50) NULL, [DeviceCode] [varchar](50) NULL, [ProcessesCode] [varchar](50) NULL, [SubjectCode] [varchar](50) NULL, [Category] [varchar](50) NULL, [Tag] [varchar](50) NULL, [PipingCode] [varchar](50) NULL, [Diameter] [varchar](50) NULL, [DiameterUnit] [varchar](50) NULL, [MaterialLevel] [varchar](50) NULL, [AdiabatType] [varchar](50) NULL, [AdiabatThickness] [varchar](50) NULL, [AdiabatThicknessUnit] [varchar](50) NULL, [MediumState] [varchar](50) NULL, [DrawingStartNo] [varchar](50) NULL, [DrawingEndNo] [varchar](50) NULL, [PipingStart] [varchar](500) NULL, [PipingEnd] [varchar](500) NULL, [PipingLevel] [varchar](50) NULL, [NormalTemperature] [varchar](50) NULL, [NormalTemperatureUnit] [varchar](50) NULL, [NormalPressure] [varchar](50) NULL, [NormalPressureUnit] [varchar](50) NULL, [DesignTemperature] [varchar](50) NULL, [DesignTemperatureUnit] [varchar](50) NULL, [DesignPressure] [varchar](50) NULL, [DesignPressureUnit] [varchar](50) NULL, [PaintLevel] [varchar](50) NULL, [Remark] [nvarchar](max) NULL, [DetailInfo] [varchar](max) NULL, CONSTRAINT [PK_IDP_PreRunData_Piping] PRIMARY KEY CLUSTERED ( [ItemId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'ItemId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'五环项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'ProjId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'五环项目Code' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'ProjCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'智慧施工系统项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'ProjectId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后异动时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'LastTime' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'详细完整信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'DetailInfo' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'装置工序主项码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'WbsCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'装置码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'DeviceCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工序码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'ProcessesCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主项码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Piping', @level2type=N'COLUMN',@level2name=N'SubjectCode' END GO --IDP试车工作包数据表——设备一览表 IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'IDP_PreRunData_Equipment') AND type = N'U') BEGIN CREATE TABLE [dbo].[IDP_PreRunData_Equipment]( [ItemId] [varchar](50) NOT NULL, [ProjId] [varchar](50) NULL, [ProjCode] [varchar](50) NULL, [ProjectId] [varchar](50) NULL, [LastTime] [datetime] NOT NULL, [WbsCode] [varchar](50) NULL, [DeviceCode] [varchar](50) NULL, [ProcessesCode] [varchar](50) NULL, [SubjectCode] [varchar](50) NULL, [Category] [varchar](50) NULL, [Tag] [varchar](50) NULL, [TagNumber] [varchar](50) NULL, [NameSpecifications] [varchar](500) NULL, [DrawingNo] [varchar](500) NULL, [Materials] [varchar](200) NULL, [NumOperate] [varchar](50) NULL, [NumStandby] [varchar](50) NULL, [WeightSingle] [varchar](50) NULL, [WeightSingleUnit] [varchar](50) NULL, [WeightTotal] [varchar](50) NULL, [Remark] [nvarchar](max) NULL, [DetailInfo] [varchar](max) NULL, CONSTRAINT [PK_IDP_PreRunData_Equipment] PRIMARY KEY CLUSTERED ( [ItemId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'ItemId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'五环项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'ProjId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'五环项目Code' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'ProjCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'智慧施工系统项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'ProjectId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后异动时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'LastTime' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'详细完整信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'DetailInfo' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'装置工序主项码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'WbsCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'装置码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'DeviceCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工序码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'ProcessesCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主项码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Equipment', @level2type=N'COLUMN',@level2name=N'SubjectCode' END GO --IDP试车工作包数据表——仪表索引表 IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'IDP_PreRunData_Instrumentation') AND type = N'U') BEGIN CREATE TABLE [dbo].[IDP_PreRunData_Instrumentation]( [ItemId] [varchar](50) NOT NULL, [ProjId] [varchar](50) NULL, [ProjCode] [varchar](50) NULL, [ProjectId] [varchar](50) NULL, [LastTime] [datetime] NOT NULL, [WbsCode] [varchar](50) NULL, [DeviceCode] [varchar](50) NULL, [ProcessesCode] [varchar](50) NULL, [SubjectCode] [varchar](50) NULL, [Category] [varchar](50) NULL, [Tag] [varchar](50) NULL, [InstrumentTag] [varchar](50) NULL, [UseTo] [varchar](50) NULL, [InstrumentName] [varchar](50) NULL, [Supplier] [varchar](50) NULL, [InstallationPosition] [varchar](50) NULL, [SignalType] [varchar](50) NULL, [AssociatedSystem] [varchar](50) NULL, [Cp25] [varchar](50) NULL, [In11] [varchar](50) NULL, [In40] [varchar](50) NULL, [Remark] [nvarchar](max) NULL, [DetailInfo] [varchar](max) NULL, CONSTRAINT [PK_IDP_PreRunData_Instrumentation] PRIMARY KEY CLUSTERED ( [ItemId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'ItemId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'五环项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'ProjId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'五环项目Code' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'ProjCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'智慧施工系统项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'ProjectId' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后异动时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'LastTime' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'装置工序主项码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'WbsCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'装置码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'DeviceCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工序码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'ProcessesCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主项码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IDP_PreRunData_Instrumentation', @level2type=N'COLUMN',@level2name=N'SubjectCode' END GO