-- 自动获取总包检查数据
alter table Base_Project add IsAutoFetch bit  NULL;
 GO

--定制版放到公司级的【报表管理/数据管理】下的【项目数据分析】,父级菜单id和菜单类型根据实际情况进行替换
UPDATE [dbo].[Sys_Menu] SET [MenuName] = N'项目数据分析', [Icon] = NULL, [Url] = '', [SortIndex] = 125, [SuperMenu] = N'0', [MenuType] = N'Menu_SJTB', [IsOffice] = '1', [IsEnd] = '0', [IsUsed] = '1' WHERE CONVERT(NVARCHAR(MAX), [MenuId]) = N'96763EC0-6AFF-4FA2-BFA1-63CCF1FF65A9';


INSERT INTO [dbo].[Sys_Menu] ( [MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed] )
VALUES
  ( N'A9E94BE9-6F53-4A41-9A65-250F09D9E449', N'安全巡检统计分析', NULL, N'HSSE/HiddenInspection/CheckStatisticsAnalysis.aspx?Types=1', 50, N'96763EC0-6AFF-4FA2-BFA1-63CCF1FF65A9', N'Menu_SJTB', '0', '1', '1' );
  
 GO 
  

INSERT INTO [dbo].[Sys_Menu] ( [MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed] )
VALUES
  ( N'28848506-234F-4D21-8E79-A0F24F2B2DDA', N'质量巡检统计分析', NULL, N'HSSE/HiddenInspection/CheckStatisticsAnalysis.aspx?Types=2', 60, N'96763EC0-6AFF-4FA2-BFA1-63CCF1FF65A9', N'Menu_SJTB', '0', '1', '1' );
   GO
   
   
   
   
   
--加颁奖年份字段
alter table QCManage_QCGroupRegistration add AwardYear datetime
go

--【注意】
-----根据实际情况吧原本填写在过程字段(Process)上的年份数据移到新的新的字段(AwardYear)上
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'颁奖年份' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QCManage_QCGroupRegistration', @level2type=N'COLUMN',@level2name=N'AwardYear'
GO
--把原来的数据替换到新的字段上
update QCManage_QCGroupRegistration set AwardYear = Process where AwardYear is null and  LEN(Process) = 4

 GO