CNCEC_SUBQHSE_WUHUAN/DataBase/版本日志/已更新脚本/SGGLDB_V2020-12-01-001.sql

68 lines
2.0 KiB
MySQL
Raw Normal View History

2021-04-30 10:28:37 +08:00
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
/*<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>ͼ*/
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 '<EFBFBD><EFBFBD>' ELSE '<EFBFBD><EFBFBD>' 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','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>λ)','Door/InOutPoststatistics.aspx',50,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_HSSE',0,1,1)
GO