--创建汇总表 CREATE TABLE [dbo].[Inspection_Summary]( [InspectionSummaryId] [nvarchar](50) NOT NULL, [InspectionSummaryMbId] [nvarchar](50) NULL, [ProjectId] [nvarchar](50) NULL, [SummeryResult] [nvarchar](50) NULL, [CompileDate] [datetime] NULL, [CompileDateMonth] [nvarchar](50) NULL, CONSTRAINT [PK_Inspection_Summary] PRIMARY KEY CLUSTERED ( [InspectionSummaryId] 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 --创建模板表 CREATE TABLE [dbo].[Inspection_SummaryMb]( [InspectionSummaryMbId] [nvarchar](50) NOT NULL, [SNumber] [nvarchar](50) NULL, [ModuleName] [nvarchar](50) NULL, [MenuP] [nvarchar](50) NULL, [MenuC] [nvarchar](50) NULL, [SortId] [int] NULL, CONSTRAINT [PK_Inspection_SummaryMb] PRIMARY KEY CLUSTERED ( [InspectionSummaryMbId] 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'序号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'InspectionSummaryMbId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'ProjectId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结果' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'SummeryResult' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生成日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'CompileDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生成年月' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'CompileDateMonth' GO --添加菜单各项目巡查汇总 delete From sys_menu where menuid='EA413D2A-8D29-4DE2-932D-8511BB7F6CB2' insert into sys_menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) values('EA413D2A-8D29-4DE2-932D-8511BB7F6CB2','各项目巡查汇总','ZHGL/InspectionSummary/InspectionSummary.aspx',140, '0','Menu_ZHGL','1','1','1') --模板表数据 INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'1', N'1.1', N'安全模块', N'人员信息', N'人员信息档案', 1) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'10', N'2.2', N'质量模块', N'WBS数据', N'WBS数据', 10) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'11', N'2.3', N'质量模块', N'综合管理', N'设备材料报验', 11) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'12', N'2.3', N'质量模块', N'综合管理', N'人员报验', 12) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'13', N'2.3', N'质量模块', N'综合管理', N'机具报验', 13) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'14', N'2.3', N'质量模块', N'综合管理', N'设计变更单管理', 14) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'15', N'2.3', N'质量模块', N'综合管理', N'施工方案管理', 15) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'16', N'2.3', N'质量模块', N'综合管理', N'设计交底管理', 16) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'17', N'2.3', N'质量模块', N'综合管理', N'NCR', 17) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'18', N'2.4', N'质量模块', N'质量报表管理', N'质量周报', 18) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'19', N'2.4', N'质量模块', N'质量报表管理', N'质量月报', 19) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'2', N'1.1', N'安全模块', N'人员信息', N'特种作业人员', 2) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'20', N'2.5', N'质量模块', N'过程控制管理', N'一次共检合格数', 20) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'21', N'2.5', N'质量模块', N'过程控制管理', N'总数', 21) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'22', N'2.5', N'质量模块', N'过程控制管理', N'一次共检合格合格率', 22) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'23', N'3', N'关键事项', N'关键事项', N'关键事项', 23) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'24', N'4.1', N'现场考勤', N'人脸考勤', N'人脸考勤', 24) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'25', N'4.2', N'现场考勤', N'集团实名制对接', N'集团实名制对接', 25) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'26', N'5', N'视频监控', N'视频监控', N'视频监控', 26) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'27', N'6', N'项目看板', N'项目看板', N'项目看板', 27) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'3', N'1.2', N'安全模块', N'安全巡检', N'安全巡检', 3) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'4', N'1.3', N'安全模块', N'会议', N'周例会', 4) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'5', N'1.3', N'安全模块', N'会议', N'月例会', 5) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'6', N'1.4', N'安全模块', N'作业票', N'作业票', 6) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'7', N'1.5', N'安全模块', N'工作报告', N'工程师日志', 7) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'8', N'1.5', N'安全模块', N'工作报告', N'HSE管理月报', 8) INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'9', N'2.1', N'质量模块', N'质量巡检', N'质量巡检', 9) GO --为WBS_BreakdownProject增加projectid索引 CREATE INDEX index_projectid ON WBS_BreakdownProject (projectid) --为Meeting_WeekMeeting 增加projectid索引 CREATE INDEX index_projectid ON Meeting_WeekMeeting (projectid) --为Meeting_MonthMeeting 增加projectid索引 CREATE INDEX index_projectid ON Meeting_MonthMeeting (projectid) --为Project_HSEDiary 增加projectid索引 CREATE INDEX index_projectid ON Project_HSEDiary (projectid) --为Manager_ManagerWeek 增加projectid索引 CREATE INDEX index_projectid ON Manager_ManagerWeek (projectid) --为Check_CheckControl 增加projectid索引 CREATE INDEX index_projectid ON Check_CheckControl (projectid) --为Comprehensive_InspectionEquipment 增加projectid索引 CREATE INDEX index_projectid ON Comprehensive_InspectionEquipment (projectid) --为Comprehensive_InspectionEquipment 增加projectid索引 CREATE INDEX index_projectid ON Comprehensive_InspectionPerson (projectid) --为Comprehensive_InspectionMachine 增加projectid索引 CREATE INDEX index_projectid ON Comprehensive_InspectionMachine (projectid) --为Comprehensive_DesignChangeOrder 增加projectid索引 CREATE INDEX index_projectid ON Comprehensive_DesignChangeOrder (projectid) --为施工方案管理 增加projectid索引 CREATE INDEX index_projectid ON Comprehensive_GeneralPlanApproval (projectid) --为Comprehensive_DesignDetails 增加projectid索引 CREATE INDEX index_projectid ON Comprehensive_DesignDetails (projectid) --为Comprehensive_NCRManagement 增加projectid索引 CREATE INDEX index_projectid ON Comprehensive_NCRManagement (projectid) --为Report_WeekAndMonthReport 增加projectid索引 CREATE INDEX index_projectid ON Report_WeekAndMonthReport (projectid) --为Inspection_Summary 增加projectid索引 CREATE INDEX index_projectid ON Inspection_Summary (projectid) CREATE INDEX index_InspectionSummaryMbId ON Inspection_Summary (InspectionSummaryMbId)