175 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Transact-SQL
		
	
	
	
			
		
		
	
	
			175 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Transact-SQL
		
	
	
	
|  
 | ||
|   alter table  Sys_HttpLog add  MeThod nvarchar(50)
 | ||
|   go
 | ||
| 
 | ||
| INSERT Sys_Menu (MenuId,MenuName,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
 | ||
| VALUES ( N'831FA803-E2E9-4674-9B56-44E5A5DDCB1A',N'自动上报集团对接',10,N'0',N'Menu_ZHGL',1,0,1)
 | ||
| 
 | ||
| INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
 | ||
| VALUES('FFD221D7-AE05-447F-8727-80058A04F401','接口设置','TaskScheduling/InterFace/InterFaceSet.aspx',20,'831FA803-E2E9-4674-9B56-44E5A5DDCB1A','Menu_ZHGL',1,1)
 | ||
| GO
 | ||
| INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) 
 | ||
| VALUES ( N'3D57D9D0-163A-493A-93B4-FF34F7ECD05A',N'FFD221D7-AE05-447F-8727-80058A04F401',N'增加',1)
 | ||
| INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) 
 | ||
| VALUES ( N'518962FE-4E79-4812-8CCD-2EC351DA1EB7',N'FFD221D7-AE05-447F-8727-80058A04F401',N'修改',2)
 | ||
| INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) 
 | ||
| VALUES ( N'65C09E8A-1C07-4155-A970-AE2D3DADA794',N'FFD221D7-AE05-447F-8727-80058A04F401',N'删除',3)
 | ||
| INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) 
 | ||
| VALUES ( N'A4617107-FF92-4446-B037-6D2E15CAAE5C',N'FFD221D7-AE05-447F-8727-80058A04F401',N'保存',4)
 | ||
| INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
 | ||
| VALUES('FFD221D7-AE05-447F-8727-80058A04F402','任务清单','TaskScheduling/InterFace/InterFaceTask.aspx',30,'831FA803-E2E9-4674-9B56-44E5A5DDCB1A','Menu_ZHGL',1,1)
 | ||
| GO
 | ||
| INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) 
 | ||
| VALUES ( N'0AA0B45D-28B8-4DEE-9BEE-0CFF08DB42BD',N'FFD221D7-AE05-447F-8727-80058A04F402',N'增加',1)
 | ||
| INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) 
 | ||
| VALUES ( N'77D8A100-82E3-4640-ABB9-61DDB66A1596',N'FFD221D7-AE05-447F-8727-80058A04F402',N'修改',2)
 | ||
| INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) 
 | ||
| VALUES ( N'D8621A85-7D2D-4AA8-9C80-321B82FAC36F',N'FFD221D7-AE05-447F-8727-80058A04F402',N'删除',3)
 | ||
| INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) 
 | ||
| VALUES ( N'9E233D11-8160-41A0-AAC6-FAA472E839BD',N'FFD221D7-AE05-447F-8727-80058A04F402',N'保存',4)
 | ||
| INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
 | ||
| VALUES('FFD221D7-AE05-447F-8727-80058A04F404','数据调用日志','TaskScheduling/InterFace/IFLogList.aspx',40,'831FA803-E2E9-4674-9B56-44E5A5DDCB1A','Menu_ZHGL',1,1)
 | ||
| GO
 | ||
|   go
 | ||
|  CREATE TABLE [dbo].[InterFaceLog](
 | ||
| 	[InterFaceLogId] [nvarchar](50) NOT NULL,
 | ||
| 	[UserId] [nvarchar](50) NULL,
 | ||
| 	[UnitId] [nvarchar](50) NULL,
 | ||
| 	[InterFaceName] [nchar](10) NULL,
 | ||
| 	[InterFaceUrl] [varchar](max) NULL,
 | ||
| 	[InterFaceMehtod] [nchar](10) NULL,
 | ||
| 	[InterFaceBody] [varchar](max) NULL,
 | ||
| 	[InterFaceReturnData] [varchar](max) NULL,
 | ||
| 	[InterFaceLogDate] [datetime] NULL,
 | ||
| 	[InterFaceType] [nvarchar](50) NULL,
 | ||
| 	[LogSate] [bit] NULL,
 | ||
| 	[IP] [nvarchar](50) NULL,
 | ||
|  CONSTRAINT [PK_InterFaceLog] PRIMARY KEY CLUSTERED 
 | ||
| (
 | ||
| 	[InterFaceLogId] ASC
 | ||
| )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
 | ||
| ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 | ||
| 
 | ||
| GO
 | ||
| 
 | ||
| SET ANSI_PADDING OFF
 | ||
| GO
 | ||
| 
 | ||
|  
 | ||
| 
 | ||
| CREATE TABLE [dbo].[InterFaceSet](
 | ||
| 	[InterFaceSetId] [nvarchar](50) NOT NULL,
 | ||
| 	[InterFaceName] [nvarchar](100) NULL,
 | ||
| 	[InterFaceUrl] [nvarchar](500) NULL,
 | ||
| 	[UrlReqMethod] [varchar](50) NULL,
 | ||
| 	[UnitId] [nvarchar](50) NULL,
 | ||
| 	[AuthUnitIds] [nvarchar](1020) NULL,
 | ||
| 	[AuthUnitName] [nvarchar](2000) NULL,
 | ||
| 	[IsOpen] [bit] NULL,
 | ||
| 	[ValidPeriod] [nvarchar](20) NULL,
 | ||
| 	[TxtRemarks] [nvarchar](2000) NULL,
 | ||
| 	[InterFaceForUrl] [nvarchar](500) NULL,
 | ||
| 	[ForUrlReqMethod] [varchar](50) NULL,
 | ||
| 	[IsCallBack] [bit] NULL,
 | ||
| 	[InterFaceCallBackUrl] [nvarchar](500) NULL,
 | ||
| 	[CallBackUrlReqMethod] [varchar](50) NULL,
 | ||
|  CONSTRAINT [PK_InterFaceSet] PRIMARY KEY CLUSTERED 
 | ||
| (
 | ||
| 	[InterFaceSetId] 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
 | ||
| 
 | ||
| SET ANSI_PADDING OFF
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口设置表主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceSet', @level2type=N'COLUMN',@level2name=N'InterFaceSetId'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceSet', @level2type=N'COLUMN',@level2name=N'InterFaceName'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceSet', @level2type=N'COLUMN',@level2name=N'InterFaceUrl'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据来源单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceSet', @level2type=N'COLUMN',@level2name=N'UnitId'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'授权单位(可多选使用,拼接最大20个)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceSet', @level2type=N'COLUMN',@level2name=N'AuthUnitIds'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceSet', @level2type=N'COLUMN',@level2name=N'IsOpen'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'频率(拼接最高可以设置三个时间段如:08-12,15-18,22-24)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceSet', @level2type=N'COLUMN',@level2name=N'ValidPeriod'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceSet', @level2type=N'COLUMN',@level2name=N'TxtRemarks'
 | ||
| GO
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| CREATE TABLE [dbo].[InterFaceTask](
 | ||
| 	[InterFaceTaskId] [nvarchar](50) NOT NULL,
 | ||
| 	[InterFaceName] [nvarchar](100) NULL,
 | ||
| 	[InterFaceSetLists] [nvarchar](max) NULL,
 | ||
| 	[Frequency] [nchar](10) NULL,
 | ||
| 	[CreateTime] [datetime] NULL,
 | ||
| 	[Enable] [bit] NULL,
 | ||
|  CONSTRAINT [PK_InterFaceDetail] PRIMARY KEY CLUSTERED 
 | ||
| (
 | ||
| 	[InterFaceTaskId] ASC
 | ||
| )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
 | ||
| ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 | ||
| 
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口任务名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceTask', @level2type=N'COLUMN',@level2name=N'InterFaceName'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口信息组' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceTask', @level2type=N'COLUMN',@level2name=N'InterFaceSetLists'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'频率' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceTask', @level2type=N'COLUMN',@level2name=N'Frequency'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceTask', @level2type=N'COLUMN',@level2name=N'CreateTime'
 | ||
| GO
 | ||
| 
 | ||
| EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InterFaceTask', @level2type=N'COLUMN',@level2name=N'Enable'
 | ||
| GO
 | ||
| 
 | ||
| 
 | ||
| delete from Sys_Const where GroupId='InterfacePopup';
 | ||
| 
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'AccidentEvent', '/DataShow/Accident.aspx',1,'InterfacePopup') --事故事件数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'ConstructionEquipment', '/DataShow/ConstructionEquipment.aspx',1,'InterfacePopup')--施工机具设备
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'EmergencyManagement', '/DataShow/Emergency.aspx',1,'InterfacePopup')--应急管理数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'EnvironmentalData', '/DataShow/Environmental.aspx',1,'InterfacePopup')--环保数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'HiddenRectification', '/DataShow/HiddenRectification.aspx',1,'InterfacePopup')--隐患排查
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'HighRiskWorkPermit', '/DataShow/License.aspx',1,'InterfacePopup')--高风险作业许可
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'LargeDangerousProject', '/DataShow/LargeEngineering.aspx',1,'InterfacePopup')--危大工程
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'ProjectInfomation', '/DataShow/Project.aspx',1,'InterfacePopup')--项目信息
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'SafeCheck', '/DataShow/Check.aspx',1,'InterfacePopup')--安全监督检查数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'SafeCost', '/DataShow/SecurityCost.aspx',1,'InterfacePopup')--安全费用
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'SafePerson_Branch', '/DataShow/CompanyPerson.aspx',1,'InterfacePopup')--分支机构
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'SafePerson_HeadOffice', '/DataShow/CompanyPerson.aspx',1,'InterfacePopup')--企业总部
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'SafePerson_ProjectPerson', '/DataShow/ProjectPerson.aspx',1,'InterfacePopup')--项目人员
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'SafeRiskData', '/DataShow/SecurityRisk.aspx',1,'InterfacePopup')--安全风险数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'SafeTrainData', '/DataShow/EduTrain.aspx',1,'InterfacePopup')--安全教育培训数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'SafetyMeetingData', '/DataShow/Meeting.aspx',1,'InterfacePopup')--安全会议
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'WorkingHourData', '/DataShow/WorkingHours.aspx',1,'InterfacePopup')--工时数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'QualityTrainingData', '/DataShow/QualityTraining.aspx',1,'InterfacePopup')--质量培训数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'MeasuringInstrumentsData', '/DataShow/QualityInstruments.aspx',1,'InterfacePopup')--计量器具数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'ManagerData', '/DataShow/QualityPerson.aspx',1,'InterfacePopup')--管理人员数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'QualityProblem', '/DataShow/QualityProblem.aspx',1,'InterfacePopup')--质量问题数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'QualityControlPoint', '/DataShow/QualityControlPoint.aspx',1,'InterfacePopup')--质量控制点数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'QualityAcceptance', '/DataShow/QualityAcceptance.aspx',1,'InterfacePopup')--质量验收数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'ProjectDivision', '/DataShow/ProjectDivision.aspx',1,'InterfacePopup')--工程划分数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'HjData', '/DataShow/HJGLWelding.aspx',1,'InterfacePopup')--焊接数据
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'DefectAnalysis', '/DataShow/HJGLDefect.aspx',1,'InterfacePopup')--缺陷分析
 | ||
| 
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'集团', 'http://114.247.88.97:20080/',1,'SafeReferer')--referer白名单
 | ||
| insert into Sys_Const ([ID],[ConstText],[ConstValue],[SortIndex],[GroupId]) values (NEWID(),'nbd测试', 'https://lygcgs.com.cn/',1,'SafeReferer')--referer白名单
 |