安阳职业

Posted zyq-dan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安阳职业相关的知识,希望对你有一定的参考价值。

USE [AYZY]
GO

/****** Object:  StoredProcedure [dbo].[SP_InitWebSite]    Script Date: 08/22/2018 13:07:39 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[SP_InitWebSite] 
    @SiteId INT  --站点ID
AS
BEGIN
    DECLARE @SiteType INT;
    DECLARE @NewColumnId INT;
    DECLARE @NewModelId INT;
    
    --获取站点类型
    SELECT @SiteType=[SiteType] FROM [WebSites] WHERE [Id]=@SiteId; 
    
    IF(@SiteType=1)
        -- 初始化院系类网站栏目及首页模块
        BEGIN
            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N学院首页, NULL, 10, 1, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N首页Banner轮播图, @NewColumnId, 11, 0, @SiteId, 0, 5, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N首页Banner轮播图, 1, 5, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N横幅宣传图片, @NewColumnId, 12, 0, @SiteId, 0, 5, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N横幅宣传图片, 12, 5, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N友情链接, @NewColumnId, 13, 0, @SiteId, 0, 5, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N友情链接, 3, 5, @NewModelId, @SiteId, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N学院概况, NULL, 20, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N学院简介, @NewColumnId, 21, 0, @SiteId, 0, 1, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N学院管理, @NewColumnId, 22, 0, @SiteId, 1, 1, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N学院风采, @NewColumnId, 23, 0, @SiteId, 2, 2, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N学院风采, 11, 2, @NewModelId, @SiteId, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N新闻中心, NULL, 30, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N新闻资讯, @NewColumnId, 31, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N新闻资讯, 5, 1, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N最新公告, @NewColumnId, 32, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N最新公告, 2, 1, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N校务公开, @NewColumnId, 33, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N校务公开, 6, 1, @NewModelId, @SiteId, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N教学管理, NULL, 40, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N教师团队, @NewColumnId, 41, 0, @SiteId, 5, 4, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教师团队, 10, 4, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N教学科研, @NewColumnId, 42, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教学科研, 7, 1, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N实验实训, @NewColumnId, 43, 0, @SiteId, 2, 2, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N专业介绍, NULL, 50, 0, @SiteId, 1, 1, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N学生工作, NULL, 60, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N学生会, @NewColumnId, 61, 0, @SiteId, 5, 4, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N团委, @NewColumnId, 62, 0, @SiteId, 1, 1, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N校园活动, @NewColumnId, 63, 0, @SiteId, 2, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N图片新闻, 4, 1, @NewModelId, @SiteId, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N招生就业, NULL, 70, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N招生资讯, @NewColumnId, 71, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N招生资讯, 8, 1, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N就业指导, @NewColumnId, 72, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N就业指导, 9, 1, @NewModelId, @SiteId, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N电子资源, NULL, 80, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N精品课程, @NewColumnId, 81, 0, @SiteId, 1, 1, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N视频中心, @NewColumnId, 82, 0, @SiteId, 4, 3, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N资源下载, @NewColumnId, 83, 0, @SiteId, 1, 1, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N学术交流, NULL, 90, 0, @SiteId, 2, 2, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N联系我们, NULL, 100, 0, @SiteId, 0, 1, 0, GETDATE());
        END
    ELSE IF(@SiteType=2)
        -- 初始化部门类网站栏目及首页模块
        BEGIN
            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N首页, NULL, 10, 1, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N首页Banner轮播图, @NewColumnId, 11, 0, @SiteId, 0, 5, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N首页Banner轮播图, 1, 5, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N横幅宣传图片    , @NewColumnId, 12, 0, @SiteId, 0, 5, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N横幅宣传图片, 10, 5, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N友情链接, @NewColumnId, 13, 0, @SiteId, 0, 5, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N友情链接, 3, 5, @NewModelId, @SiteId, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N部门概况, NULL, 20, 0, @SiteId, 0, 1, 0, GETDATE());
            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N机构设置, NULL, 30, 0, @SiteId, 1, 1, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N新闻动态, NULL, 40, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N部门新闻, @NewColumnId, 41, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N新闻动态, 5, 1, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N最新资讯, @NewColumnId, 42, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N部门公告, 2, 1, @NewModelId, @SiteId, 0, GETDATE());
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N通知公告, 8, 1, @NewModelId, @SiteId, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N通知公告, NULL, 50, 0, @SiteId, 1, 1, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N日常管理, NULL, 60, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N管理制度, @NewColumnId, 61, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N管理制度, 6, 1, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N上级文件, @NewColumnId, 62, 0, @SiteId, -1, -1, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N工作流程, @NewColumnId, 63, 0, @SiteId, 1, 1, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N评优评先, @NewColumnId, 64, 0, @SiteId, 1, 1, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N思想教育, NULL, 70, 0, @SiteId, 1, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N思想教育, 7, 1, @NewModelId, @SiteId, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N队伍建设, NULL, 80, 0, @SiteId, -1, -1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N教师风采, @NewColumnId, 81, 0, @SiteId, 5, 4, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教师风采, 9, 4, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N培训培养, @NewColumnId, 82, 0, @SiteId, 2, 1, 0, GETDATE());
                    SET @NewModelId = @@IDENTITY;
                    INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N图片新闻, 4, 1, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N管理考核, @NewColumnId, 83, 0, @SiteId, 1, 1, 0, GETDATE());

            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N下载中心, NULL, 90, 0, @SiteId, 1, 1, 0, GETDATE());
            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N联系我们, NULL, 100, 0, @SiteId, 0, 1, 0, GETDATE());
        END
END

GO

 

以上是关于安阳职业的主要内容,如果未能解决你的问题,请参考以下文章

安阳支队开展通信设备性能测试工作

JavaScript知识点大全----来自安阳师范的攻城狮分享!!!

孙小强:林州市计算机协会会长

CSS知识点合集---来自安阳某师范!

安阳小吃-腐乳肉的做法

上海河南安阳web前端开发工程师小哥哥!3600号至今单身群成员