alter table [dbo].[Sys_User] add MainCNProfessionalId nvarchar(50) null go alter table [dbo].[Sys_User] add ViceCNProfessionalId nvarchar(500) null go alter table [dbo].[Project_ProjectUser] add MainCNProfessionalId nvarchar(50) null go alter table [dbo].[Project_ProjectUser] add ViceCNProfessionalId nvarchar(500) null go alter table [dbo].[SitePerson_Person] add MainCNProfessionalId nvarchar(50) null go alter table [dbo].[SitePerson_Person] add ViceCNProfessionalId nvarchar(500) null GO ALTER VIEW [dbo].[View_Sys_User] AS /*用户信息列表视图*/ SELECT Users.UserId ,Users.Account ,Users.UserCode ,Users.Password ,Users.UserName ,Users.RoleId ,Users.UnitId ,Users.DepartId ,Users.IsPost ,Users.LoginProjectId ,Users.Sex ,Users.BirthDay ,Users.Marriage ,Users.Nation ,Users.IdentityCard ,ISNULL(Users.Email,'') AS Email ,ISNULL(Users.Telephone,'') AS Telephone ,Users.Education ,Users.Hometown ,Users.PositionId ,Users.PhotoUrl ,Users.Performance ,Users.PageSize ,Users.IsOffice ,Users.DeviceId ,Users.SessionString ,Users.RCount ,Users.MainCNProfessionalId ,Users.ViceCNProfessionalId ,'' as MainCNProfessionalName ,'' as ViceCNProfessionalName ,Users.DataSources ,CASE WHEN Users.IsPost=1 THEN '是' ELSE '否' END AS IsPostName ,Roles.RoleName ,Roles.RoleCode ,Unit.UnitCode ,Unit.UnitName ,Depart.DepartName ,Users.SignatureUrl ,(CASE WHEN Users.UserId='A8547452-751F-41B7-8E4B-5862EA4E9411' THEN '2' ELSE '1' END) AS UserType From dbo.Sys_User AS Users LEFT JOIN Sys_Role AS Roles ON Roles.RoleId=Users.RoleId LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId LEFT JOIN Base_Depart AS Depart ON Depart.DepartId=Users.DepartId GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('7F4D841D-E8A5-424A-BEDB-D46B6042092B','考勤统计(按岗位)','Door/InOutPoststatistics.aspx',50,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_HSSE',0,1,1) GO