143 lines
6.7 KiB
Transact-SQL
143 lines
6.7 KiB
Transact-SQL
-- auto-generated definition
|
||
create table dbo.Supervise_UnitHazardRegister
|
||
(
|
||
UnitHazardRegisterId nvarchar(50) not null
|
||
primary key,
|
||
UnitHazardRegisterCode nvarchar(50) not null,
|
||
CheckDate datetime,
|
||
CheckMainType nvarchar(2),
|
||
CheckType nvarchar(50),
|
||
ProjectId nvarchar(50)
|
||
constraint FK_UnitHazardRegister_Project
|
||
references dbo.Base_Project,
|
||
UnitId nvarchar(50)
|
||
constraint FK_UnitHazardRegister_Unit
|
||
references dbo.Base_Unit,
|
||
CheckObjectId nvarchar(200),
|
||
CheckUnitId nvarchar(50)
|
||
constraint FK_UnitHazardRegister_CheckUnit
|
||
references dbo.Base_Unit,
|
||
CheckTeam nvarchar(200),
|
||
CheckManIds nvarchar(max),
|
||
CheckManNames nvarchar(max),
|
||
EvaluationResult nvarchar(max),
|
||
AttachUrl nvarchar(2000),
|
||
States int default 0,
|
||
CompileMan nvarchar(50),
|
||
CreateDate datetime,
|
||
UpdateDate datetime,
|
||
IsUpdate bit
|
||
)
|
||
go
|
||
|
||
create index IX_UnitHazardRegister_CheckDate
|
||
on dbo.Supervise_UnitHazardRegister (CheckDate desc)
|
||
go
|
||
|
||
create index IX_UnitHazardRegister_CheckMainType
|
||
on dbo.Supervise_UnitHazardRegister (CheckMainType)
|
||
go
|
||
|
||
create index IX_UnitHazardRegister_ProjectId
|
||
on dbo.Supervise_UnitHazardRegister (ProjectId)
|
||
go
|
||
|
||
-- auto-generated definition
|
||
create table dbo.Supervise_UnitHazardRegisterItem
|
||
(
|
||
UnitHazardRegisterItemId nvarchar(50) not null
|
||
primary key,
|
||
UnitHazardRegisterId nvarchar(50) not null
|
||
constraint FK_UnitHazardRegisterItem_Register
|
||
references dbo.Supervise_UnitHazardRegister
|
||
on delete cascade,
|
||
ProblemDescription nvarchar(max),
|
||
ProblemType nvarchar(50),
|
||
RiskLevel nvarchar(50),
|
||
RectifyRequirement nvarchar(max),
|
||
CompleteStatus int default 0,
|
||
CompletedDate datetime,
|
||
SortIndex int default 0,
|
||
RectificationMeasures nvarchar(100),
|
||
IsUpdate bit
|
||
)
|
||
go
|
||
|
||
create index IX_UnitHazardRegisterItem_RegisterId
|
||
on dbo.Supervise_UnitHazardRegisterItem (UnitHazardRegisterId)
|
||
go
|
||
|
||
/***************
|
||
|
||
delete Sys_Menu where MenuId='C46C007E-A100-4A52-9317-3B885442E130'
|
||
delete Sys_Menu where MenuId='73283863-CF67-44CA-9DF8-67071734A528'
|
||
delete Sys_Menu where MenuId='73283863-CF67-44CA-9DF8-67071734A529'
|
||
delete Sys_Menu where MenuId='FDA7722C-383E-4BB1-B29D-BB0BF87AA942'
|
||
delete Sys_Menu where MenuId='15511354-9822-4A21-AB24-2483D889FDB8'
|
||
delete Sys_Menu where MenuId='15511354-9822-4A21-AB24-2483D889FDB9'
|
||
|
||
delete Sys_ButtonToMenu where MenuId='C46C007E-A100-4A52-9317-3B885442E130'
|
||
delete Sys_ButtonToMenu where MenuId='FDA7722C-383E-4BB1-B29D-BB0BF87AA942'
|
||
|
||
********/
|
||
|
||
|
||
--<2D><><EFBFBD><EFBFBD>֮ǰ<D6AE><C7B0>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
update Sys_Menu set IsUsed=0 where MenuId='CD9FC4C8-4B02-4619-8B02-50DA6AE6146E' or SuperMenu='CD9FC4C8-4B02-4619-8B02-50DA6AE6146E'
|
||
GO
|
||
|
||
|
||
|
||
--<2D><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '8CA4A1EC-3218-4E6B-9CA2-125C814A8141')
|
||
BEGIN
|
||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||
VALUES (N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'<EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', N'', 40, N'0', N'Menu_ZHGL', 1,0, 1);
|
||
END
|
||
GO
|
||
|
||
--<2D><>˾<EFBFBD><CBBE>
|
||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||
VALUES (N'C46C007E-A100-4A52-9317-3B885442E130', N'<EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', null, N'ZHGL/Supervise/UnitHazardRegister.aspx?type=0', 10, N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'Menu_ZHGL', 1, 1, 1);
|
||
go
|
||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||
VALUES (N'73283863-CF67-44CA-9DF8-67071734A528', N'<EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼', null, N'ZHGL/Supervise/UnitHazardRegisterRecord.aspx?type=0', 20, N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'Menu_ZHGL', 1, 1, 1);
|
||
go
|
||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||
VALUES (N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'<EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', null, N'ZHGL/Supervise/UnitHazardRegister.aspx?type=1', 30, N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'Menu_ZHGL', 1, 1, 1);
|
||
go
|
||
|
||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||
VALUES (N'15511354-9822-4A21-AB24-2483D889FDB8', N'<EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼', null, N'ZHGL/Supervise/UnitHazardRegisterRecord.aspx?type=1', 40, N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'Menu_ZHGL', 1, 1, 1);
|
||
go
|
||
|
||
|
||
--<2D><>Ŀ<EFBFBD><C4BF>
|
||
|
||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||
VALUES (N'73283863-CF67-44CA-9DF8-67071734A529', N'<EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼', null, N'ZHGL/Supervise/UnitHazardRegisterRecord.aspx?type=0', 05, N'467A0CB9-737D-4451-965E-869EBC3A4BD6', N'Menu_HSSE', 1, 1, 1);
|
||
|
||
go
|
||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||
VALUES (N'15511354-9822-4A21-AB24-2483D889FDB9', N'<EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼', null, N'ZHGL/Supervise/UnitHazardRegisterRecord.aspx?type=1', 05, N'A54EC449-5F77-4068-83B9-AA305B721A0B', N'Menu_CQMS', 1, 1, 1);
|
||
go
|
||
|
||
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'D15F74F2-CD1A-4F45-9501-DF00ED845730', N'C46C007E-A100-4A52-9317-3B885442E130', N'<EFBFBD><EFBFBD>', 2);
|
||
go
|
||
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'A2CCDFF7-9593-4BCB-9425-769C99F8EFEE', N'C46C007E-A100-4A52-9317-3B885442E130', N'ɾ<EFBFBD><EFBFBD>', 3);
|
||
go
|
||
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'435F26E9-232F-4CAA-835F-CAF41DA2B175', N'C46C007E-A100-4A52-9317-3B885442E130', N'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 4);
|
||
go
|
||
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'B822D703-CFE3-422A-88F3-67B26B0A255A', N'C46C007E-A100-4A52-9317-3B885442E130', N'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 1);
|
||
|
||
go
|
||
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'B980C835-B079-4485-AE0E-EE721C191470', N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'<EFBFBD><EFBFBD>', 2);
|
||
go
|
||
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'9BABA2CE-2593-422A-A792-80E826D164AB', N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'ɾ<EFBFBD><EFBFBD>', 3);
|
||
go
|
||
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'5C9AF2B1-4AF0-4F16-BC5D-154055A6BF8F', N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 4);
|
||
go
|
||
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'E3CD6629-9B4B-4B26-A24B-97F9F3E4428F', N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 1);
|
||
go
|
||
|