 
USE [helpdesk]
GO
/****** Object:  View [dbo].[v_subcat]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_subcat]'))
DROP VIEW [dbo].[v_subcat]
GO
/****** Object:  View [dbo].[v_tickets]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_tickets]'))
DROP VIEW [dbo].[v_tickets]
GO
/****** Object:  View [dbo].[v_topcat]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_topcat]'))
DROP VIEW [dbo].[v_topcat]
GO
/****** Object:  View [dbo].[v_users]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_users]'))
DROP VIEW [dbo].[v_users]
GO
/****** Object:  View [dbo].[v_cat1]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_cat1]'))
DROP VIEW [dbo].[v_cat1]
GO
/****** Object:  View [dbo].[v_cat2]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_cat2]'))
DROP VIEW [dbo].[v_cat2]
GO
/****** Object:  View [dbo].[v_pc]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_pc]'))
DROP VIEW [dbo].[v_pc]
GO
/****** Object:  View [dbo].[v_priority]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_priority]'))
DROP VIEW [dbo].[v_priority]
GO
/****** Object:  View [dbo].[v_reportmonth]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_reportmonth]'))
DROP VIEW [dbo].[v_reportmonth]
GO
/****** Object:  View [dbo].[v_reportsdate]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_reportsdate]'))
DROP VIEW [dbo].[v_reportsdate]
GO
/****** Object:  View [dbo].[v_status]    Script Date: 12/30/2020 14:34:01 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_status]'))
DROP VIEW [dbo].[v_status]
GO
/****** Object:  StoredProcedure [dbo].[sp_kb_insertcategory]    Script Date: 12/30/2020 14:34:00 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_kb_insertcategory]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_kb_insertcategory]
GO
/****** Object:  StoredProcedure [dbo].[sp_kb_movecategory]    Script Date: 12/30/2020 14:34:00 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_kb_movecategory]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_kb_movecategory]
GO
/****** Object:  StoredProcedure [dbo].[sp_ScanInstall]    Script Date: 12/30/2020 14:34:00 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_ScanInstall]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_ScanInstall]
GO
/****** Object:  UserDefinedFunction [dbo].[GetdeptName]    Script Date: 12/30/2020 14:33:59 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetdeptName]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[GetdeptName]
GO
/****** Object:  UserDefinedFunction [dbo].[GetPcDetail]    Script Date: 12/30/2020 14:33:59 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetPcDetail]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[GetPcDetail]
GO
/****** Object:  Table [dbo].[helpdesk_assigntome]    Script Date: 12/30/2020 14:33:59 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_assigntome_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_assigntome] DROP CONSTRAINT [DF_helpdesk_assigntome_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_assigntome_isread]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_assigntome] DROP CONSTRAINT [DF_helpdesk_assigntome_isread]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_assigntome]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_assigntome]
GO
/****** Object:  Table [dbo].[helpdesk_autoscancache]    Script Date: 12/30/2020 14:33:59 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_autoscancache]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_autoscancache]
GO
/****** Object:  Table [dbo].[helpdesk_enum]    Script Date: 12/30/2020 14:33:59 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_enum]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_enum]
GO
/****** Object:  Table [dbo].[helpdesk_favourite]    Script Date: 12/30/2020 14:33:59 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_favourite_fcreatedate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_favourite] DROP CONSTRAINT [DF_helpdesk_favourite_fcreatedate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_favourite]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_favourite]
GO
/****** Object:  Table [dbo].[helpdesk_iassign]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_iassign_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_iassign] DROP CONSTRAINT [DF_helpdesk_iassign_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_iassign_isread]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_iassign] DROP CONSTRAINT [DF_helpdesk_iassign_isread]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_iassign]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_iassign]
GO
/****** Object:  Table [dbo].[helpdesk_kbase]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_updatedate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_updatedate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_click]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_good]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_good]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_updatetime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_updatetime]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_bad]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_bad]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_kbase]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_kbase]
GO
/****** Object:  Table [dbo].[helpdesk_kbcategory]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_kbcategory_parentid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbcategory] DROP CONSTRAINT [DF_portal_kbcategory_parentid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_kbcategory_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbcategory] DROP CONSTRAINT [DF_portal_kbcategory_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_kbcategory_depth]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbcategory] DROP CONSTRAINT [DF_portal_kbcategory_depth]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_hr2_kbcsscategory_path]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbcategory] DROP CONSTRAINT [DF_hr2_kbcsscategory_path]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_kbcategory]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_kbcategory]
GO
/****** Object:  Table [dbo].[helpdesk_lists]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__helpdesk___creat__0CBAE877]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF__helpdesk___creat__0CBAE877]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_islock]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_islock]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_ispublic]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_ispublic]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_hour]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_hour]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_isclose]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_isclose]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_ispop]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_ispop]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_ispoint]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_ispoint]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_lists]
GO
/****** Object:  Table [dbo].[helpdesk_loginscan_hardware]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_loginscan_hardware]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_loginscan_hardware]
GO
/****** Object:  Table [dbo].[helpdesk_loginscan_software]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_loginscan_software_guid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_loginscan_software] DROP CONSTRAINT [DF_helpdesk_loginscan_software_guid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_loginscan_software_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_loginscan_software] DROP CONSTRAINT [DF_helpdesk_loginscan_software_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_loginscan_software]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_loginscan_software]
GO
/****** Object:  Table [dbo].[helpdesk_logs]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_logs_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_logs] DROP CONSTRAINT [DF_helpdesk_logs_adddate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_logs]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_logs]
GO
/****** Object:  Table [dbo].[helpdesk_movelog]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_movelog_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_movelog] DROP CONSTRAINT [DF_helpdesk_movelog_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_movelog]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_movelog]
GO
/****** Object:  Table [dbo].[helpdesk_news]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_news_istop]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_news] DROP CONSTRAINT [DF_helpdesk_news_istop]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_news_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_news] DROP CONSTRAINT [DF_helpdesk_news_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_news]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_news]
GO
/****** Object:  Table [dbo].[helpdesk_newscat]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_newscat]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_newscat]
GO
/****** Object:  Table [dbo].[helpdesk_outlook_calendar]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_outlook_calendar]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_outlook_calendar]
GO
/****** Object:  Table [dbo].[helpdesk_pc]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_pc_ispopup]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_pc] DROP CONSTRAINT [DF_helpdesk_pc_ispopup]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_pc_ip10]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_pc] DROP CONSTRAINT [DF_helpdesk_pc_ip10]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc]
GO
/****** Object:  Table [dbo].[helpdesk_pc_asset]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_asset]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc_asset]
GO
/****** Object:  Table [dbo].[helpdesk_pc_details]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_details]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc_details]
GO
/****** Object:  Table [dbo].[helpdesk_pc_logs]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_logs]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc_logs]
GO
/****** Object:  Table [dbo].[helpdesk_pc_param]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_pc_param_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_pc_param] DROP CONSTRAINT [DF_helpdesk_pc_param_orderid]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_param]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc_param]
GO
/****** Object:  Table [dbo].[Helpdesk_PointList]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Helpdesk_PointList_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Helpdesk_PointList] DROP CONSTRAINT [DF_Helpdesk_PointList_adddate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Helpdesk_PointList_isprocess]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Helpdesk_PointList] DROP CONSTRAINT [DF_Helpdesk_PointList_isprocess]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Helpdesk_PointList]') AND type in (N'U'))
DROP TABLE [dbo].[Helpdesk_PointList]
GO
/****** Object:  Table [dbo].[helpdesk_repairlist]    Script Date: 12/30/2020 14:33:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_repairlist]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_repairlist]
GO
/****** Object:  Table [dbo].[helpdesk_report]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_outlook_report_createdate2]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_report] DROP CONSTRAINT [DF_outlook_report_createdate2]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_report]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_report]
GO
/****** Object:  Table [dbo].[helpdesk_reportcomm]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_reportcomm]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_reportcomm]
GO
/****** Object:  Table [dbo].[helpdesk_reportdetail]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_reportdetail]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_reportdetail]
GO
/****** Object:  Table [dbo].[helpdesk_scanlist]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_scanlist]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_scanlist]
GO
/****** Object:  Table [dbo].[helpdesk_sday]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_sday]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_sday]
GO
/****** Object:  Table [dbo].[helpdesk_searchkey]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_searchkey]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_searchkey]
GO
/****** Object:  Table [dbo].[helpdesk_software]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_software]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_software]
GO
/****** Object:  Table [dbo].[helpdesk_svr]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_svr_iswarning]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_svr] DROP CONSTRAINT [DF_helpdesk_svr_iswarning]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_svr_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_svr] DROP CONSTRAINT [DF_helpdesk_svr_adddate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_svr]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_svr]
GO
/****** Object:  Table [dbo].[helpdesk_svrdisk]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_svrdisk_guid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_svrdisk] DROP CONSTRAINT [DF_helpdesk_svrdisk_guid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_svrdisk_isalert]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_svrdisk] DROP CONSTRAINT [DF_helpdesk_svrdisk_isalert]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_svrdisk]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_svrdisk]
GO
/****** Object:  Table [dbo].[helphesk_categories]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helphesk_categories]') AND type in (N'U'))
DROP TABLE [dbo].[helphesk_categories]
GO
/****** Object:  Table [dbo].[helplist_reply]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helplist_reply]') AND type in (N'U'))
DROP TABLE [dbo].[helplist_reply]
GO
/****** Object:  Table [dbo].[purchase_session_lists]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__applying___creat__060DEAE8]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[purchase_session_lists] DROP CONSTRAINT [DF__applying___creat__060DEAE8]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_purchase_session_lists_auditstatus]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[purchase_session_lists] DROP CONSTRAINT [DF_purchase_session_lists_auditstatus]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_purchase_session_lists_isdelete]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[purchase_session_lists] DROP CONSTRAINT [DF_purchase_session_lists_isdelete]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[purchase_session_lists]') AND type in (N'U'))
DROP TABLE [dbo].[purchase_session_lists]
GO
/****** Object:  Table [dbo].[purchase_sessiondetails]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_purchase_sessiondetails_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[purchase_sessiondetails] DROP CONSTRAINT [DF_purchase_sessiondetails_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[purchase_sessiondetails]') AND type in (N'U'))
DROP TABLE [dbo].[purchase_sessiondetails]
GO
/****** Object:  Table [dbo].[qywx_dept]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[qywx_dept]') AND type in (N'U'))
DROP TABLE [dbo].[qywx_dept]
GO
/****** Object:  Table [dbo].[qywx_users]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[qywx_users]') AND type in (N'U'))
DROP TABLE [dbo].[qywx_users]
GO
/****** Object:  Table [dbo].[survery_defineactive]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_defineactive_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_defineactive_adddate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_allowmultivote]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_allowmultivote]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_ispublic]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_ispublic]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_ispublicresult]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_ispublicresult]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_defineactive]') AND type in (N'U'))
DROP TABLE [dbo].[survery_defineactive]
GO
/****** Object:  Table [dbo].[survery_lists]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_lists_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_lists_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_uid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_uid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_ispass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_ispass]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_isdeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_isdeleted]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_isfull]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_isfull]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_process]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_process]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_auditstatus]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_auditstatus]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_lists]') AND type in (N'U'))
DROP TABLE [dbo].[survery_lists]
GO
/****** Object:  Table [dbo].[survery_options]    Script Date: 12/30/2020 14:33:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_options]') AND type in (N'U'))
DROP TABLE [dbo].[survery_options]
GO
/****** Object:  Table [dbo].[survery_subjects]    Script Date: 12/30/2020 14:33:56 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_mustfilled]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_mustfilled]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_col]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_col]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_colspan]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_colspan]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_subjects]') AND type in (N'U'))
DROP TABLE [dbo].[survery_subjects]
GO
/****** Object:  Table [dbo].[users_dept]    Script Date: 12/30/2020 14:33:56 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_parentid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_parentid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_depth]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_depth]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_hr_csscategory_path]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_hr_csscategory_path]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_dept]') AND type in (N'U'))
DROP TABLE [dbo].[users_dept]
GO
/****** Object:  Table [dbo].[users_getpwd]    Script Date: 12/30/2020 14:33:56 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_getpwd_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_getpwd] DROP CONSTRAINT [DF_users_getpwd_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_getpwd]') AND type in (N'U'))
DROP TABLE [dbo].[users_getpwd]
GO
/****** Object:  Table [dbo].[users_releation]    Script Date: 12/30/2020 14:33:56 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_releation]') AND type in (N'U'))
DROP TABLE [dbo].[users_releation]
GO
/****** Object:  Table [dbo].[users_roles]    Script Date: 12/30/2020 14:33:56 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_roles_issystem]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_roles] DROP CONSTRAINT [DF_users_roles_issystem]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_roles]') AND type in (N'U'))
DROP TABLE [dbo].[users_roles]
GO
/****** Object:  Table [dbo].[users_users]    Script Date: 12/30/2020 14:33:56 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_users_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_portal_users_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_users_lastlogin]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_portal_users_lastlogin]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_avtor]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_avtor]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_logintime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_logintime]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_logintime_1]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_logintime_1]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_ismgr]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_ismgr]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_issec]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_issec]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_isstaff]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_isstaff]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_users]') AND type in (N'U'))
DROP TABLE [dbo].[users_users]
GO
/****** Object:  Table [dbo].[users_usersinroles]    Script Date: 12/30/2020 14:33:56 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_usersinroles]') AND type in (N'U'))
DROP TABLE [dbo].[users_usersinroles]
GO
/****** Object:  Table [dbo].[wx_id]    Script Date: 12/30/2020 14:33:56 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_wx_id_isdel]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[wx_id] DROP CONSTRAINT [DF_wx_id_isdel]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_wx_id_deletedate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[wx_id] DROP CONSTRAINT [DF_wx_id_deletedate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[wx_id]') AND type in (N'U'))
DROP TABLE [dbo].[wx_id]
GO
/****** Object:  Table [dbo].[wx_id]    Script Date: 12/30/2020 14:33:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[wx_id]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[wx_id](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NULL,
	[wxid] [nvarchar](500) NULL,
	[isdel] [int] NULL CONSTRAINT [DF_wx_id_isdel]  DEFAULT ((0)),
	[deletedate] [datetime] NULL CONSTRAINT [DF_wx_id_deletedate]  DEFAULT (getdate()),
 CONSTRAINT [PK_wx_id] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_usersinroles]    Script Date: 12/30/2020 14:33:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_usersinroles]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_usersinroles](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NULL,
	[rolename] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_usersinroles] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_usersinroles] ON
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (12, 18, N'supporter')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (13, 20, N'supervisor')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (14, 20, N'supporter')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (15, 19, N'supporter')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (16, 1, N'Administrators')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (17, 1, N'audit')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (18, 1, N'supervisor')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (19, 1, N'supporter')
SET IDENTITY_INSERT [dbo].[users_usersinroles] OFF
/****** Object:  Table [dbo].[users_users]    Script Date: 12/30/2020 14:33:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_users]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_users](
	[uid] [int] IDENTITY(1,1) NOT NULL,
	[username] [nvarchar](256) NOT NULL,
	[adpath] [nvarchar](1024) NULL,
	[firstname] [nvarchar](50) NULL,
	[lastname] [nvarchar](50) NULL,
	[city] [nvarchar](256) NULL,
	[Office] [nvarchar](256) NULL,
	[Description] [nvarchar](1024) NULL,
	[Tel] [nvarchar](128) NULL,
	[fax] [nvarchar](128) NULL,
	[email] [nvarchar](256) NULL,
	[MailType] [nvarchar](128) NULL,
	[Title] [nvarchar](128) NULL,
	[Department] [nvarchar](128) NULL,
	[Company] [nvarchar](128) NULL,
	[Password] [nvarchar](128) NULL,
	[displayname] [nvarchar](128) NULL,
	[StaffCode] [nvarchar](128) NULL,
	[IsAccountActive] [int] NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_users_createdate]  DEFAULT (getdate()),
	[lastlogin] [datetime] NULL CONSTRAINT [DF_portal_users_lastlogin]  DEFAULT (getdate()),
	[sex] [nvarchar](50) NULL,
	[avtor] [nvarchar](300) NULL CONSTRAINT [DF_users_users_avtor]  DEFAULT ('avtor.jpg'),
	[logintimes] [int] NULL CONSTRAINT [DF_users_users_logintime]  DEFAULT ((0)),
	[ip] [nvarchar](50) NULL,
	[logintime] [int] NULL CONSTRAINT [DF_users_users_logintime_1]  DEFAULT ((0)),
	[intro] [nvarchar](500) NULL,
	[ismgr] [int] NULL CONSTRAINT [DF_users_users_ismgr]  DEFAULT ((0)),
	[issec] [int] NULL CONSTRAINT [DF_users_users_issec]  DEFAULT ((0)),
	[isstaff] [int] NULL CONSTRAINT [DF_users_users_isstaff]  DEFAULT ((1)),
	[color] [nvarchar](50) NULL,
	[mobile] [nvarchar](50) NULL,
	[pinyin] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_users_1] PRIMARY KEY CLUSTERED 
(
	[uid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_users] ON
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (1, N'admin', NULL, NULL, NULL, NULL, N'北京', NULL, N'15001712100', N'123456', N'1939248766@qq.com', NULL, N'职员', N'环境部', N'', N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'管理员', N'', NULL, CAST(0x00009E4C013FE373 AS DateTime), CAST(0x0000AC4E0162CB2E AS DateTime), N'男', N'/helpdesk/uploads/2019-12/S20191205071702.jpg', 186, N'::1', 0, N'我是管理员，负责网络', 0, 0, 1, N'#FF0000', N'', N'GLY')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (15, N'李万宝', NULL, NULL, NULL, NULL, N'', NULL, N'12365895450', N'', N'983506039@qq.com', NULL, N'', N'', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李万宝', N'', NULL, CAST(0x0000A14C01637014 AS DateTime), CAST(0x0000A1500161084B AS DateTime), N'', N'images/avtor.jpg', 3, N'::1', 0, N'', 0, 0, 1, NULL, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (16, N'bob', NULL, NULL, NULL, NULL, N'', NULL, N'', N'', N'86813438@qq.com', NULL, N'职员', N'财务部', N'', N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'周海', N'', NULL, CAST(0x0000A14C016398D6 AS DateTime), CAST(0x0000A14C016398D6 AS DateTime), N'', N'/helpdesk/uploads/2019-12/S20191205071859.jpg', 0, N'::1', 0, N'负责硬件维护、网络布线等。', 0, 0, 1, NULL, N'', N'ZH')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (17, N'joly', NULL, NULL, NULL, NULL, N'', NULL, N'', N'', N'', NULL, N'', N'人事部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'joly', N'', NULL, CAST(0x0000A52200D051AF AS DateTime), CAST(0x0000AB1B006D208E AS DateTime), N'', N'images/avtor.jpg', 6, N'::1', 0, N'', 0, 0, 1, NULL, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (18, N'dream', NULL, NULL, NULL, NULL, N'', NULL, N'010-88584587', N'', N'dream@qq.com', NULL, N'职员', N'IT部门', N'', N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'dream', N'', NULL, CAST(0x0000A5C4008DD248 AS DateTime), CAST(0x0000A5C4011333B4 AS DateTime), N'', N'/helpdesk/uploads/2019-12/S20191205072215.jpg', 7, N'::1', 0, N'负责硬件、网络、打印设备等工作。', 0, 0, 1, NULL, N'', N'dream')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (19, N'sherry', NULL, NULL, NULL, NULL, N'', NULL, N'14852698565', N'', N'spring@127.0.0.1', NULL, N'', N'IT部门', N'', N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李丽', N'', NULL, CAST(0x0000AB1A00779D20 AS DateTime), CAST(0x0000AB1B00676DD9 AS DateTime), N'女', N'/helpdesk/uploads/2019-12/S20191205071630.jpg', 58, N'::1', 0, N'负责IT采购、OA、财务销售等系统。', 0, 0, 1, NULL, N'', N'LL')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (20, N'kevin', NULL, NULL, NULL, NULL, N'', NULL, N'14785698545', N'', N'kevin@qq.com', NULL, N'主管', N'IT部门', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'黄丽宇', N'', NULL, CAST(0x0000AB1A007877F6 AS DateTime), CAST(0x0000AB1A0083DE20 AS DateTime), N'', N'/helpdesk/uploads/2019-12/S20191205071805.jpg', 1, N'::1', 0, N'负责IT部门软件、应用系统。', 0, 0, 1, NULL, N'', N'HLY')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (21, N'tommy', NULL, NULL, NULL, NULL, N'', NULL, N'14785695856', N'', N'', NULL, N'经理', N'IT部门', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李成', N'', NULL, CAST(0x0000AB1A0079191E AS DateTime), CAST(0x0000AB1A0079191E AS DateTime), N'', N'/helpdesk/uploads/2019-12/S20191205072032.jpg', 0, N'::1', 0, N'全面负责IT工作。', 0, 0, 1, NULL, N'', N'LC')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (22, N'jack', NULL, NULL, NULL, NULL, N'', NULL, N'14785685695', N'', N'kx@127.0.0.1', NULL, N'', N'人事部', N'', N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'张华', N'', NULL, CAST(0x0000AB1A007BB70C AS DateTime), CAST(0x0000AB1A0088BFEC AS DateTime), N'', N'images/avtor.jpg', 3, N'::1', 0, N'', 0, 0, 1, NULL, N'', N'ZH')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (23, N'Adam', NULL, NULL, NULL, NULL, N'', NULL, N'', N'', N'', NULL, N'', N'财务部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'Adam', N'', NULL, CAST(0x0000AB1A007C2416 AS DateTime), CAST(0x0000AB1A007C2416 AS DateTime), N'', N'images/avtor.jpg', 0, N'::1', 0, N'', 0, 0, 1, NULL, N'', N'Adam')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (24, N'Jenny ', NULL, NULL, NULL, NULL, N'', NULL, N'14758569856', N'', N'Jenny@qq.com', NULL, N'', N'财务部', N'', N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'杰妮', N'', NULL, CAST(0x0000AB1A007C97EF AS DateTime), CAST(0x0000AB1A0087CF7E AS DateTime), N'', N'/helpdesk/uploads/2019-12/S20191205073229.jpg', 2, N'::1', 0, N'', 0, 0, 1, NULL, N'', N'JN')
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (25, N'spring', NULL, NULL, NULL, NULL, N'', NULL, N'', N'', N'', NULL, N'', N'人事部', N'', N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李红', N'', NULL, CAST(0x0000AB1A007D2035 AS DateTime), CAST(0x0000AB1A0083EBD2 AS DateTime), N'', N'/helpdesk/uploads/2019-12/S20191205073531.jpg', 3, N'::1', 0, N'', 0, 0, 1, NULL, N'', N'LH')
SET IDENTITY_INSERT [dbo].[users_users] OFF
/****** Object:  Table [dbo].[users_roles]    Script Date: 12/30/2020 14:33:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_roles]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_roles](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[rolename] [nvarchar](50) NULL,
	[issystem] [int] NULL CONSTRAINT [DF_users_roles_issystem]  DEFAULT ((0)),
	[roletype] [nvarchar](50) NULL,
 CONSTRAINT [PK_users_roles] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_roles] ON
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (1, N'administrators', 1, N'系统管理员')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (2, N'manager', 1, N'经理')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (3, N'supervisor', 1, N'主管')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (5, N'supporter', 1, N'技术工程师')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (6, N'audit', 1, N'审批')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (7, N'ad edit', 1, N'具有此角色的人员可以添加修改AD里人员')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (8, N'ad write', 1, N'具有此角色人可以删除AD里人员')
SET IDENTITY_INSERT [dbo].[users_roles] OFF
/****** Object:  Table [dbo].[users_releation]    Script Date: 12/30/2020 14:33:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_releation]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_releation](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[mgrid] [int] NULL,
	[secid] [int] NULL,
 CONSTRAINT [PK_users_releation] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_getpwd]    Script Date: 12/30/2020 14:33:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_getpwd]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_getpwd](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NOT NULL,
	[display] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_users_getpwd_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_users_getpwd] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_dept]    Script Date: 12/30/2020 14:33:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_dept]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_dept](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[parentid] [int] NULL CONSTRAINT [DF_portal_category_parentid]  DEFAULT ((0)),
	[orderid] [int] NULL CONSTRAINT [DF_portal_category_orderid]  DEFAULT ((0)),
	[depth] [int] NULL CONSTRAINT [DF_portal_category_depth]  DEFAULT ((1)),
	[note] [nvarchar](200) NULL,
	[path] [nvarchar](1000) NULL CONSTRAINT [DF_hr_csscategory_path]  DEFAULT (''),
	[types] [nvarchar](50) NULL,
 CONSTRAINT [PK_users_dept] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_dept] ON
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (1, N'人事部', 0, 0, 1, NULL, N'', NULL)
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (2, N'财务部', 0, 0, 1, NULL, N'', NULL)
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (3, N'IT部门', 0, 0, 1, NULL, N'', NULL)
SET IDENTITY_INSERT [dbo].[users_dept] OFF
/****** Object:  Table [dbo].[survery_subjects]    Script Date: 12/30/2020 14:33:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_subjects]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_subjects](
	[autoid] [int] IDENTITY(1,1) NOT NULL,
	[subject] [nvarchar](200) NULL,
	[types] [nvarchar](50) NULL,
	[id] [int] NULL,
	[activeid] [int] NULL,
	[mustfilled] [int] NULL CONSTRAINT [DF_survery_subjects_mustfilled]  DEFAULT ((0)),
	[typesname] [nvarchar](200) NULL,
	[col] [int] NULL CONSTRAINT [DF_survery_subjects_col]  DEFAULT ((1)),
	[IsSingleRow] [int] NULL CONSTRAINT [DF_survery_subjects_colspan]  DEFAULT ((0)),
	[bad] [nvarchar](50) NULL,
	[mid] [nvarchar](50) NULL,
	[good] [nvarchar](50) NULL,
	[coin] [int] NULL,
	[clientfun] [nvarchar](1000) NULL,
	[serverfun] [nvarchar](1000) NULL,
 CONSTRAINT [PK_subjects] PRIMARY KEY CLUSTERED 
(
	[autoid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_subjects] ON
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (1, N'1.一个完整的微型电脑系统应包括', N'RadioButtonList', 1, 1, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (2, N'2. 十六进制1000转换成十进制数是', N'RadioButtonList', 2, 1, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (3, N'3.微型电脑的运算器、控制器及内存存储器的总称是', N'RadioButtonList', 3, 1, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (4, N'4.目前我国使用较广泛的浏览器有', N'CheckBoxList', 4, 1, 0, N'复选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (5, N'5.下面文件格式是图形图像的存储格式', N'CheckBoxList', 5, 1, 0, N'复选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (6, N'问答题', N'Label', 6, 1, 0, N'标签', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (7, N'6.如何在windows上查看本机IP地址（请提供至少一种方法）', N'TextBox', 7, 1, 0, N'单行文本框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (8, N'7.如何开启windows防火墙？', N'MultiTextBox', 8, 1, 0, N'多行文本框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (9, N'8.论述一下您对网络安全的看法以及措施', N'MultiTextBox', 9, 1, 0, N'多行文本框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (10, N' 1 总体而言 您对企业满意度', N'RadioButtonList', 1, 2, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (11, N'2 您对公司的归属感', N'RadioButtonList', 2, 2, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (12, N' 3 您的工作量', N'RadioButtonList', 3, 2, 1, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (13, N' 4 您对自己的工作', N'RadioButtonList', 4, 2, 1, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (14, N'5 您对自己的工作与所得到的报酬', N'RadioButtonList', 5, 2, 1, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (15, N'6 您的兴趣', N'CheckBoxList', 6, 2, 1, N'复选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (16, N'7 您的工作年限', N'DropDownList', 7, 2, 1, N'下拉框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (17, N'8. 请描述您对您的领导或者下属的开发', N'MultiTextBox', 8, 2, 1, N'多行文本框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (18, N'您的职务', N'RadioButtonList', 1, 3, 1, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (19, N'您对IT的满意度', N'GroupOption', 2, 3, 1, N'分组选项', 4, 1, N'非常差', N'一般', N'非常好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (20, N'您认为我们需要改进', N'MultiTextBox', 3, 3, 0, N'多行文本框', 4, 1, N'非常差', N'一般', N'非常好', 5, NULL, NULL)
SET IDENTITY_INSERT [dbo].[survery_subjects] OFF
/****** Object:  Table [dbo].[survery_options]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_options]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_options](
	[itemid] [int] IDENTITY(1,1) NOT NULL,
	[id] [int] NULL,
	[item] [nvarchar](200) NULL,
	[activeid] [int] NULL,
	[subjectid] [int] NULL,
 CONSTRAINT [PK_options] PRIMARY KEY CLUSTERED 
(
	[itemid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_options] ON
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (1, 1, N'A. 电脑及外部设备', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (2, 1, N'B.主机箱、键盘、显示器和打印机', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (3, 1, N'C. 硬件系统和软件系统', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (4, 1, N'D.系统软件和系统硬件', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (5, 2, N'A. 4096', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (6, 2, N'B.1024', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (7, 2, N'C. 2048 ', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (8, 2, N'D.8192', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (9, 3, N'A. CPU', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (10, 3, N'B. ALU', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (11, 3, N'C. 主机', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (12, 3, N'D. MPU', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (13, 4, N'A. 微软浏览器', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (14, 4, N'B. 谷歌浏览器', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (15, 4, N'C. 火狐浏览器', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (16, 4, N'D. QQ聊天', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (17, 5, N'A. JPG', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (18, 5, N'B. PDF', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (19, 5, N'C. PNG', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (20, 5, N'D. DOC', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (21, 1, N'不满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (22, 1, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (23, 1, N'满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (24, 1, N'很满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (25, 2, N'不高', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (26, 2, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (27, 2, N'高', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (28, 2, N'很高', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (29, 3, N'超负荷', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (30, 3, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (31, 3, N'轻松', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (32, 3, N'很低', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (33, 4, N'不感兴趣', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (34, 4, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (35, 4, N'感兴趣', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (36, 4, N'很有兴趣', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (37, 5, N'很不满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (38, 5, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (39, 5, N'满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (40, 5, N'很满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (41, 6, N'运动', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (42, 6, N'唱歌', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (43, 6, N'表演', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (44, 6, N'摄影', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (45, 7, N'1年一下', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (46, 7, N'1-3年', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (47, 7, N'3-5年', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (48, 7, N'5-10年', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (49, 7, N'10年以上', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (50, 1, N'普通员工', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (51, 1, N'主管', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (52, 1, N'经理', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (53, 1, N'董事', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (54, 2, N'IT响应速度', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (55, 2, N'IT解决问题能力', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (56, 2, N'IT服务态度', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (57, 2, N'与用户沟通能力', 3, NULL)
SET IDENTITY_INSERT [dbo].[survery_options] OFF
/****** Object:  Table [dbo].[survery_lists]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_lists]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_lists](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[activeid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[dept] [nvarchar](50) NULL,
	[email] [nvarchar](50) NULL,
	[mobile] [nvarchar](50) NULL,
	[ctrl1] [nvarchar](1000) NULL,
	[ctrl2] [nvarchar](1000) NULL,
	[ctrl3] [nvarchar](1000) NULL,
	[ctrl4] [nvarchar](1000) NULL,
	[ctrl5] [nvarchar](1000) NULL,
	[ctrl6] [nvarchar](1000) NULL,
	[ctrl7] [nvarchar](1000) NULL,
	[ctrl8] [nvarchar](1000) NULL,
	[ctrl9] [nvarchar](1000) NULL,
	[ctrl10] [nvarchar](1000) NULL,
	[ctrl11] [nvarchar](1000) NULL,
	[ctrl12] [nvarchar](1000) NULL,
	[ctrl13] [nvarchar](1000) NULL,
	[ctrl14] [nvarchar](1000) NULL,
	[ctrl15] [nvarchar](1000) NULL,
	[ctrl16] [nvarchar](1000) NULL,
	[ctrl17] [nvarchar](1000) NULL,
	[ctrl18] [nvarchar](1000) NULL,
	[ctrl19] [nvarchar](1000) NULL,
	[ctrl20] [nvarchar](1000) NULL,
	[ctrl21] [nvarchar](1000) NULL,
	[ctrl22] [nvarchar](1000) NULL,
	[ctrl23] [nvarchar](1000) NULL,
	[ctrl24] [nvarchar](1000) NULL,
	[ctrl25] [nvarchar](1000) NULL,
	[ctrl26] [nvarchar](1000) NULL,
	[ctrl27] [nvarchar](1000) NULL,
	[ctrl28] [nvarchar](1000) NULL,
	[ctrl29] [nvarchar](1000) NULL,
	[ctrl30] [nvarchar](1000) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_lists_createdate]  DEFAULT (getdate()),
	[updatedate] [datetime] NULL,
	[note1] [nvarchar](50) NULL,
	[note2] [nvarchar](50) NULL,
	[note3] [nvarchar](50) NULL,
	[note4] [nvarchar](50) NULL,
	[note5] [nvarchar](50) NULL,
	[uid] [int] NULL CONSTRAINT [DF_survery_lists_uid]  DEFAULT ((0)),
	[ispass] [int] NULL CONSTRAINT [DF_survery_lists_ispass]  DEFAULT ((0)),
	[treeid] [int] NULL,
	[isdelete] [int] NULL CONSTRAINT [DF_survery_lists_isdeleted]  DEFAULT ((0)),
	[isfull] [int] NULL CONSTRAINT [DF_survery_lists_isfull]  DEFAULT ((0)),
	[orderno] [nvarchar](50) NULL,
	[process] [int] NULL CONSTRAINT [DF_survery_lists_process]  DEFAULT ((0)),
	[auditstatus] [int] NULL CONSTRAINT [DF_survery_lists_auditstatus]  DEFAULT ((0)),
 CONSTRAINT [PK_lists] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_lists] ON
INSERT [dbo].[survery_lists] ([id], [activeid], [username], [dept], [email], [mobile], [ctrl1], [ctrl2], [ctrl3], [ctrl4], [ctrl5], [ctrl6], [ctrl7], [ctrl8], [ctrl9], [ctrl10], [ctrl11], [ctrl12], [ctrl13], [ctrl14], [ctrl15], [ctrl16], [ctrl17], [ctrl18], [ctrl19], [ctrl20], [ctrl21], [ctrl22], [ctrl23], [ctrl24], [ctrl25], [ctrl26], [ctrl27], [ctrl28], [ctrl29], [ctrl30], [createdate], [updatedate], [note1], [note2], [note3], [note4], [note5], [uid], [ispass], [treeid], [isdelete], [isfull], [orderno], [process], [auditstatus]) VALUES (1, 1, N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', N'A. 电脑及外部设备', N'A. 4096', N'A. CPU', N'A. 微软浏览器;', N'A. JPG;', N'问答题', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', CAST(0x0000A42A01782A02 AS DateTime), NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 0, 0, 0, NULL, 0, 0)
SET IDENTITY_INSERT [dbo].[survery_lists] OFF
/****** Object:  Table [dbo].[survery_defineactive]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_defineactive]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_defineactive](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](200) NULL,
	[adddate] [datetime] NULL CONSTRAINT [DF_defineactive_adddate]  DEFAULT (getdate()),
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[status] [int] NULL,
	[begintime] [datetime] NULL,
	[endtime] [datetime] NULL,
	[allowmultivote] [int] NULL CONSTRAINT [DF_survery_defineactive_allowmultivote]  DEFAULT ((0)),
	[ispublic] [int] NULL CONSTRAINT [DF_survery_defineactive_ispublic]  DEFAULT ((0)),
	[ispublicresult] [int] NULL CONSTRAINT [DF_survery_defineactive_ispublicresult]  DEFAULT ((1)),
 CONSTRAINT [PK_defineactive] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_defineactive] ON
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult]) VALUES (1, N'内部员工计算机基础测试题（样本1）', CAST(0x0000A42A0173C38C AS DateTime), 1, N'管理员', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 0, 0, 1)
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult]) VALUES (2, N'企业员工满意度调查（样本2）', CAST(0x0000A42A0178DA79 AS DateTime), 1, N'管理员', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 0, 0, 1)
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult]) VALUES (3, N'IT服务满意度调查（样本3）', CAST(0x0000A42A017BDFE5 AS DateTime), 1, N'管理员', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 0, 0, 1)
SET IDENTITY_INSERT [dbo].[survery_defineactive] OFF
/****** Object:  Table [dbo].[qywx_users]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[qywx_users]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[qywx_users](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[username] [nvarchar](200) NULL,
	[displayname] [nvarchar](300) NULL,
	[title] [nvarchar](500) NULL,
	[deptid] [int] NULL,
	[mobile] [nvarchar](500) NULL,
	[email] [nvarchar](500) NULL,
	[pinyin] [nvarchar](500) NULL,
	[tel] [nvarchar](100) NULL,
 CONSTRAINT [PK_wx_users] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[qywx_dept]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[qywx_dept]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[qywx_dept](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[deptid] [int] NULL,
	[deptname] [nvarchar](200) NULL,
	[parentid] [int] NULL,
	[orderid] [int] NULL,
 CONSTRAINT [PK_wx_dept] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[purchase_sessiondetails]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[purchase_sessiondetails]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[purchase_sessiondetails](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[productname] [nvarchar](50) NULL,
	[number] [int] NULL,
	[spec] [nvarchar](50) NULL,
	[piece] [nvarchar](50) NULL,
	[intro] [nvarchar](500) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_purchase_sessiondetails_createdate]  DEFAULT (getdate()),
	[sid] [int] NULL,
	[appuid] [int] NULL,
	[appuname] [nvarchar](50) NULL,
 CONSTRAINT [PK_purchase_sessiondetails] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[purchase_sessiondetails] ON
INSERT [dbo].[purchase_sessiondetails] ([id], [catname], [productname], [number], [spec], [piece], [intro], [createdate], [sid], [appuid], [appuname]) VALUES (1, N'办公软件', N'Office2010', 1, NULL, NULL, N'222', CAST(0x0000A19800AB832B AS DateTime), 1, 1, N'管理员')
SET IDENTITY_INSERT [dbo].[purchase_sessiondetails] OFF
/****** Object:  Table [dbo].[purchase_session_lists]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[purchase_session_lists]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[purchase_session_lists](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF__applying___creat__060DEAE8]  DEFAULT (getdate()),
	[appusername] [nvarchar](50) NULL,
	[appdept] [nvarchar](50) NULL,
	[apptel] [nvarchar](50) NULL,
	[appemail] [nvarchar](500) NULL,
	[useritname] [nvarchar](50) NULL,
	[useritemail] [nvarchar](50) NULL,
	[useritdept] [nvarchar](50) NULL,
	[reason] [nvarchar](500) NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[auditstatus] [int] NULL CONSTRAINT [DF_purchase_session_lists_auditstatus]  DEFAULT ((0)),
	[process] [int] NULL,
	[types] [int] NULL,
	[isthesame] [int] NULL,
	[audituid] [int] NULL,
	[auditusername] [nvarchar](50) NULL,
	[auditdate] [datetime] NULL,
	[isdelete] [int] NULL CONSTRAINT [DF_purchase_session_lists_isdelete]  DEFAULT ((0)),
 CONSTRAINT [PK__applying_lists__0519C6AF] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[purchase_session_lists] ON
INSERT [dbo].[purchase_session_lists] ([id], [createdate], [appusername], [appdept], [apptel], [appemail], [useritname], [useritemail], [useritdept], [reason], [uid], [username], [auditstatus], [process], [types], [isthesame], [audituid], [auditusername], [auditdate], [isdelete]) VALUES (1, CAST(0x0000A19800AB8327 AS DateTime), N'管理员', N'环境部', N'15001712100', N'1939248766@qq.com', N'', N'', N'', N'', 1, N'管理员', 0, 1, NULL, 1, NULL, NULL, NULL, 0)
SET IDENTITY_INSERT [dbo].[purchase_session_lists] OFF
/****** Object:  Table [dbo].[helplist_reply]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helplist_reply]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helplist_reply](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ticketid] [int] NULL,
	[contents] [nvarchar](max) NULL,
	[replydate] [datetime] NULL,
	[replyuser] [nvarchar](50) NULL,
	[replyuserid] [int] NULL,
	[userrole] [nvarchar](50) NULL,
 CONSTRAINT [PK_helplist_reply] PRIMARY KEY CLUSTERED 
(
	[id] 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]
END
GO
SET IDENTITY_INSERT [dbo].[helplist_reply] ON
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (1, 21, N'<p>现在的仍然可以了吧</p>', CAST(0x0000A13F007B5CD7 AS DateTime), N'管理员', 1, N'Support')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (2, 21, N'<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>不行啊</div>
<div>&nbsp;</div>
<div><sign signid="0">
<div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div>
<div style="font-size:14px;font-family:Verdana;color:#000;">
<div>李万宝（Dream）</div>
<div>电话：15001712100&nbsp;</div>
<div>QQ：983506039&nbsp; Email:983506039@qq.com&nbsp;</div>
<div>启明星系统&nbsp; 官网 <a href="http://www.dotnetcms.org/">http://www.dotnetcms.org</a></div>
</div>
</sign></div>
<div>&nbsp;</div>
<div><br>
</div>
<div><br>
</div>
<div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------&nbsp;原始邮件&nbsp;------------------</div>
<div style="font-size: 12px;background:#efefef;padding:8px;">
<div><b>发件人:</b> &quot;test4&quot;<test4@lifung.com.hk>; </div>
<div><b>发送时间:</b> 2013年1月7日(星期一) 上午7:29</div>
<div><b>收件人:</b> &quot;983506039&quot;&lt;983506039@qq.com&gt;; &quot;983506039&quot;&lt;983506039@qq.com&gt;; </div>
<div><b>主题:</b> 管理员答复了【TicketID:21】 问题,请帮助我把IE6升级为IE9</div>
</div>
<div><br>
</div>
<style>



.subtitle{ font-size:14px; font-weight:bold}
</style><b>Ticket ID号:21 &nbsp; 查看该问题请单击<a href="http://localhost:2772/helpdesk/helpdesk/ticket_view.aspx?id=21" target="_blank">http://localhost:2772/helpdesk/helpdesk/ticket_view.aspx?id=21</a><br>
<br>
</b>
<table class="gwTableClass" border="0" cellspacing="0" cellpadding="0" width="95%" align="center">
<tbody>
<tr>
<td>
<div class="subtitle">1.回复者信息 Reply Information</div>
<table border="0" cellspacing="1" borderColorDark="#ffffff" cellpadding="8" width="90%" bgcolor="#a1a3ad" align="center">
<tbody>
<tr bgcolor="#ffffff">
<td class="gwTdLabel" width="20%">显示名 Display Name</td>
<td width="30%">管理员 </td>
<td class="gwTdLabel" width="20%">部门 Department</td>
<td width="30%">环境部 </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<table class="gwTableClass" border="0" cellspacing="0" cellpadding="0" width="95%" align="center">
<tbody>
<tr>
<td>
<div class="subtitle">2.问题信息 Ticket Information</div>
<table border="0" cellspacing="1" borderColorDark="#ffffff" cellpadding="8" width="90%" bgcolor="#a1a3ad" align="center">
<tbody>
<tr bgcolor="#ffffff">
<td width="25%">时间 </td>
<td colspan="3">回复时间:1/7/2013 7:29:09 AM </td>
</tr>
<tr bgcolor="#ffffff">
<td width="25%">主题 </td>
<td colspan="3">请帮助我把IE6升级为IE9 </td>
</tr>
<tr bgcolor="#ffffff">
<td width="25%">补充/回复内容 </td>
<td colspan="3">
<p>现在的仍然可以了吧</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>
', CAST(0x0000A13F007AE1D0 AS DateTime), N'管理员', 1, N'--')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (3, 45, N'<div>升级为PS4 </div><div><div><br></div><div><br></div><div style="padding: 2px 0px; font-family: Arial Narrow; font-size: 12px;">------------------&nbsp;原始邮件&nbsp;------------------</div><div style="background: rgb(239, 239, 239); padding: 8px; font-size: 12px;"><div><b>发件人:</b>&nbsp;"test"&lt;test@dotnetcms.org&gt;;</div><div><b>发送时间:</b>&nbsp;2013年1月20日(星期天) 晚上9:47</div><div><b>收件人:</b>&nbsp;"983506039"&lt;983506039@qq.com&gt;; "86813438"&lt;86813438@qq.com&gt;; "1939248766"&lt;1939248766@qq.com&gt;; <wbr></div><div></div><div><b>主题:</b>&nbsp;李万宝【TicketID:45】PS</div></div><div><br></div>Dear 李万宝:<br>  您的问题已经提交，请单击如下链接查看,如果您对本问题有疑问或者补充，请直接回复此邮件或者到Helpdesk进行查看.<br><a href="http://localhost/helpdesk/helpdesk/ticket_view.aspx?id=45">http://localhost/helpdesk/helpdesk/ticket_view.aspx?id=45</a><br>

<style>



.subtitle{ font-size:14px; font-weight:bold}
</style>



<b>
Ticket ID号:45   &nbsp; 查看该问题请单击<a href="http://localhost/helpdesk/" target="_blank">http://localhost/helpdesk/</a><br><br>
</b>
 
  <table class="gwTableClass" border="0" cellSpacing="0" cellPadding="0" width="95%" align="center">
  <tbody>
   
  <tr>
    <td>

      <div class="subtitle">1.提交者信息 User Information</div>

      <table border="0" cellSpacing="1" borderColorDark="#ffffff" cellPadding="8" width="90%" bgColor="#a1a3ad" align="center">
        <tbody>
           
           
              <tr bgColor="#ffffff">     
               
               
                   
          <td class="gwTdLabel" width="20%">显示名 Display Name</td>
          <td width="30%"> 
         
         
          李万宝 
         
         
          </td>
    
    
    
     
         <td class="gwTdLabel" width="20%">部门 Department</td>
          <td width="30%"> 
          
           </td>
           
           
           
     
           
          
           
           </tr>
 

        <tr bgColor="#ffffff">
        
        
     
       
          <td class="gwTdLabel" width="20%">电话 Tel </td>
          <td width="30%">
          
           12365895450
           </td>
          
    
    
        <td class="gwTdLabel" width="20%">邮件  Email</td>
          <td width="30%"> 
       983506039@qq.com  
          </td>
          
          </tr>
          
          
      
           
             
             <tr bgColor="#ffffff">
           
              <td class="gwTdLabel" width="20%">优先级 Priority </td>
          <td width="30%"> 
         medium  
          </td>
          
      
            <td class="gwTdLabel" width="20%">问题提交登录名</td>
          <td width="30%"> 
     李万宝
          </td>
          </tr>
          
          
           
           
            
           
           
           
           
           
          
             
         
            
       </tbody>
       </table>
       </td>
       </tr>
       
  </tbody>
    </table> 
 

       
       
    
       <br><br>
       
          
     <table class="gwTableClass" border="0" cellSpacing="0" cellPadding="0" width="95%" align="center">
  <tbody>
  
   
  <tr>
    <td>
    <div class="subtitle">2.问题信息  Ticket Information</div>
    <table border="0" cellSpacing="1" borderColorDark="#ffffff" cellPadding="8" width="90%" bgColor="#a1a3ad" align="center">
        <tbody>
       
       
         
      <tr bgColor="#ffffff">
   
 <td width="25%">类别 

 </td>
  <td colSpan="3">
    未分类 未分类 未分类
  </td>
  
  </tr>  
  
        <tr bgColor="#ffffff">
   
 <td width="25%">时间 

 </td>
  <td colSpan="3">
  提交时间:2013/1/20 21:43:05   
  </td>
  
  </tr>  


        <tr bgColor="#ffffff">
   
 <td width="25%">主题 

 </td>
  <td colSpan="3">
    李万宝【TicketID:45】PS
  </td>
  
  </tr>  
           
       <tr bgColor="#ffffff">
   
 <td width="25%">具体内容 

 </td>
  <td colSpan="3">
    <br>我要PS<br><div><div style="color: rgb(144, 144, 144); font-family: Arial Narrow; font-size: 12px;">------------------</div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px;"><div>李万宝（Dream）</div>
<div>电话：15001712100 </div>
<div>QQ：983506039&nbsp; Email:983506039@qq.com </div>
<div>启明星系统&nbsp; 官网 <a href="http://www.dotnetcms.org/">http://www.dotnetcms.org</a></div></div></div><div>&nbsp;</div>
  </td>
  
  </tr>  
       
 </tbody>
    </table> 
      </td>
    </tr>
    </tbody>
    </table></div>', CAST(0x0000A14C01673F94 AS DateTime), N'管理员', 1, N'--')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (4, 45, N'<div>升级为PS4 </div><div><div><br></div><div><br></div><div style="padding: 2px 0px; font-family: Arial Narrow; font-size: 12px;">------------------&nbsp;原始邮件&nbsp;------------------</div><div style="background: rgb(239, 239, 239); padding: 8px; font-size: 12px;"><div><b>发件人:</b>&nbsp;"test"&lt;test@dotnetcms.org&gt;;</div><div><b>发送时间:</b>&nbsp;2013年1月20日(星期天) 晚上9:47</div><div><b>收件人:</b>&nbsp;"983506039"&lt;983506039@qq.com&gt;; "86813438"&lt;86813438@qq.com&gt;; "1939248766"&lt;1939248766@qq.com&gt;; <wbr></div><div></div><div><b>主题:</b>&nbsp;李万宝【TicketID:45】PS</div></div><div><br></div>Dear 李万宝:<br>  您的问题已经提交，请单击如下链接查看,如果您对本问题有疑问或者补充，请直接回复此邮件或者到Helpdesk进行查看.<br><a href="http://localhost/helpdesk/helpdesk/ticket_view.aspx?id=45">http://localhost/helpdesk/helpdesk/ticket_view.aspx?id=45</a><br>

<style>



.subtitle{ font-size:14px; font-weight:bold}
</style>



<b>
Ticket ID号:45   &nbsp; 查看该问题请单击<a href="http://localhost/helpdesk/" target="_blank">http://localhost/helpdesk/</a><br><br>
</b>
 
  <table class="gwTableClass" border="0" cellSpacing="0" cellPadding="0" width="95%" align="center">
  <tbody>
   
  <tr>
    <td>

      <div class="subtitle">1.提交者信息 User Information</div>

      <table border="0" cellSpacing="1" borderColorDark="#ffffff" cellPadding="8" width="90%" bgColor="#a1a3ad" align="center">
        <tbody>
           
           
              <tr bgColor="#ffffff">     
               
               
                   
          <td class="gwTdLabel" width="20%">显示名 Display Name</td>
          <td width="30%"> 
         
         
          李万宝 
         
         
          </td>
    
    
    
     
         <td class="gwTdLabel" width="20%">部门 Department</td>
          <td width="30%"> 
          
           </td>
           
           
           
     
           
          
           
           </tr>
 

        <tr bgColor="#ffffff">
        
        
     
       
          <td class="gwTdLabel" width="20%">电话 Tel </td>
          <td width="30%">
          
           12365895450
           </td>
          
    
    
        <td class="gwTdLabel" width="20%">邮件  Email</td>
          <td width="30%"> 
       983506039@qq.com  
          </td>
          
          </tr>
          
          
      
           
             
             <tr bgColor="#ffffff">
           
              <td class="gwTdLabel" width="20%">优先级 Priority </td>
          <td width="30%"> 
         medium  
          </td>
          
      
            <td class="gwTdLabel" width="20%">问题提交登录名</td>
          <td width="30%"> 
     李万宝
          </td>
          </tr>
          
          
           
           
            
           
           
           
           
           
          
             
         
            
       </tbody>
       </table>
       </td>
       </tr>
       
  </tbody>
    </table> 
 

       
       
    
       <br><br>
       
          
     <table class="gwTableClass" border="0" cellSpacing="0" cellPadding="0" width="95%" align="center">
  <tbody>
  
   
  <tr>
    <td>
    <div class="subtitle">2.问题信息  Ticket Information</div>
    <table border="0" cellSpacing="1" borderColorDark="#ffffff" cellPadding="8" width="90%" bgColor="#a1a3ad" align="center">
        <tbody>
       
       
         
      <tr bgColor="#ffffff">
   
 <td width="25%">类别 

 </td>
  <td colSpan="3">
    未分类 未分类 未分类
  </td>
  
  </tr>  
  
        <tr bgColor="#ffffff">
   
 <td width="25%">时间 

 </td>
  <td colSpan="3">
  提交时间:2013/1/20 21:43:05   
  </td>
  
  </tr>  


        <tr bgColor="#ffffff">
   
 <td width="25%">主题 

 </td>
  <td colSpan="3">
    李万宝【TicketID:45】PS
  </td>
  
  </tr>  
           
       <tr bgColor="#ffffff">
   
 <td width="25%">具体内容 

 </td>
  <td colSpan="3">
    <br>我要PS<br><div><div style="color: rgb(144, 144, 144); font-family: Arial Narrow; font-size: 12px;">------------------</div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px;"><div>李万宝（Dream）</div>
<div>电话：15001712100 </div>
<div>QQ：983506039&nbsp; Email:983506039@qq.com </div>
<div>启明星系统&nbsp; 官网 <a href="http://www.dotnetcms.org/">http://www.dotnetcms.org</a></div></div></div><div>&nbsp;</div>
  </td>
  
  </tr>  
       
 </tbody>
    </table> 
      </td>
    </tr>
    </tbody>
    </table></div>', CAST(0x0000A14C01673F94 AS DateTime), N'管理员', 1, N'--')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (6, 71, N'管理员跟进了此问题', CAST(0x0000A5C50161A660 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (7, 71, N'管理员跟进了此问题', CAST(0x0000A5C50162A380 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (8, 71, N'管理员跟进了此问题', CAST(0x0000A5C5016925E8 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (9, 71, N'管理员跟进了此问题', CAST(0x0000A5C50169EBF4 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (10, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016BD11C AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (11, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016C5204 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (12, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016CF998 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (13, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016D850C AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (14, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016E1788 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (15, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016EE5C8 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (16, 69, N'管理员跟进了此问题', CAST(0x0000A5C501722CD8 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (17, 71, N'管理员跟进了此问题', CAST(0x0000A5C50172F8C0 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (18, 71, N'管理员跟进了此问题', CAST(0x0000A5C501735EB4 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (19, 71, N'管理员跟进了此问题', CAST(0x0000A5C50173B7C4 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (20, 71, N'管理员跟进了此问题', CAST(0x0000A5C50175C974 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (21, 76, N'管理员跟进了此问题', CAST(0x0000A5C60097B2C4 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (22, 76, N'管理员跟进了此问题', CAST(0x0000A5C60097FA40 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (23, 76, N'管理员跟进了此问题', CAST(0x0000A5C6009805F8 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (24, 74, N'管理员跟进了此问题', CAST(0x0000A5C600999B70 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (25, 78, N'管理员跟进了此问题', CAST(0x0000A5C600A7790C AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (26, 91, N'管理员跟进了此问题', CAST(0x0000AB1A00894888 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (27, 91, N'<p>处理完毕。重启电脑</p>', CAST(0x0000AB1A00895C0A AS DateTime), N'管理员', 1, N'Support')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (28, 92, N'李丽跟进了此问题', CAST(0x0000AB1B006A5A2C AS DateTime), N'李丽', 19, NULL)
SET IDENTITY_INSERT [dbo].[helplist_reply] OFF
/****** Object:  Table [dbo].[helphesk_categories]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helphesk_categories]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helphesk_categories](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](300) NULL,
	[parentid] [int] NULL,
	[orderid] [int] NULL,
	[note] [nvarchar](500) NULL,
	[depth] [int] NULL,
	[uids] [nvarchar](500) NULL,
	[usernames] [nvarchar](500) NULL,
 CONSTRAINT [PK__supplying_catego__0425A276] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helphesk_categories] ON
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (1, N'操作系统与标准软件', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (2, N'应用系统', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (3, N'硬件与外设', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (4, N'网络与设备故障', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (5, N'权限与账户', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (6, N'其他', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (7, N'操作系统', 1, 0, NULL, 1, N';', N';')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (8, N'办公Office', 1, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (9, N'常规软件', 1, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (10, N'财务系统', 2, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (11, N'人事系统', 2, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (12, N'电脑硬件', 3, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (13, N'手机硬件', 3, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (14, N'扫描仪', 3, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (15, N'网络线路', 4, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (16, N'网站相关', 4, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (17, N'申请账户', 5, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (18, N'注销权限', 5, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (19, N'windows', 7, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (21, N'Android', 7, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (22, N'iOS', 7, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (23, N'手机软件', 1, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (28, N'Word', 8, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (29, N'杀毒软件', 9, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (30, N'PDF', 9, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (31, N'Autocad', 9, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (32, N'金蝶账户相关', 10, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (33, N'HR账户', 11, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (34, N'培训系统', 11, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (35, N'主机与显示器', 12, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (36, N'屏幕与存储', 13, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (37, N'扫描仪', 14, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (38, N'IP分配与绑定', 15, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (39, N'网页打不开', 16, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (40, N'Active Directory账户申请', 17, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (41, N'Active Directory账户注销', 18, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (42, N'邮件申请', 17, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (43, N'邮件注销', 18, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (44, N'其他', 18, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (45, N'其他', 6, 0, NULL, 1, N';', N';')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (46, N'其他', 45, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (47, N'Excel', 8, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (48, N'PowerPoint', 8, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (49, N'Outlook', 8, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (50, N'新App安装', 23, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (51, N'App卸载', 23, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (52, N'企业邮箱App', 23, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (53, N'其他', 23, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (54, N'打印机', 3, 0, NULL, 1, N';', N';')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (55, N'电话传真', 3, 0, NULL, 1, N';', N';')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (56, N'鼠标与键盘', 12, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (57, N'声音与通话故障', 13, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (58, N'电话传真', 55, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (59, N'机器故障', 54, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (60, N'磨合纸张', 54, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (61, N'网络无法连接', 15, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (62, N'线路故障', 15, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (63, N'账户与密码', 16, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (64, N'VPN', 16, 0, NULL, 2, NULL, NULL)
SET IDENTITY_INSERT [dbo].[helphesk_categories] OFF
/****** Object:  Table [dbo].[helpdesk_svrdisk]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_svrdisk]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_svrdisk](
	[guid] [uniqueidentifier] NOT NULL CONSTRAINT [DF_helpdesk_svrdisk_guid]  DEFAULT (newid()),
	[ip] [nvarchar](50) NULL,
	[diskname] [nvarchar](50) NULL,
	[total] [decimal](18, 2) NULL,
	[used] [decimal](18, 2) NULL,
	[free] [decimal](18, 2) NULL,
	[isalert] [int] NULL CONSTRAINT [DF_helpdesk_svrdisk_isalert]  DEFAULT ((0)),
 CONSTRAINT [PK_helpdesk_svrdisk] PRIMARY KEY CLUSTERED 
(
	[guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
INSERT [dbo].[helpdesk_svrdisk] ([guid], [ip], [diskname], [total], [used], [free], [isalert]) VALUES (N'7b2513b5-0919-4841-afa9-21e0bfa34f14', N'192.168.1.102', N'C:\', CAST(100.00 AS Decimal(18, 2)), CAST(59.00 AS Decimal(18, 2)), CAST(41.00 AS Decimal(18, 2)), 1)
INSERT [dbo].[helpdesk_svrdisk] ([guid], [ip], [diskname], [total], [used], [free], [isalert]) VALUES (N'6a577e95-35a4-4068-9f85-9c58dfac0926', N'192.168.1.102', N'F:\', CAST(121.00 AS Decimal(18, 2)), CAST(15.00 AS Decimal(18, 2)), CAST(106.00 AS Decimal(18, 2)), 0)
INSERT [dbo].[helpdesk_svrdisk] ([guid], [ip], [diskname], [total], [used], [free], [isalert]) VALUES (N'21228182-3fa4-4405-a189-bacba3bced2e', N'192.168.1.102', N'E:\', CAST(122.00 AS Decimal(18, 2)), CAST(16.00 AS Decimal(18, 2)), CAST(106.00 AS Decimal(18, 2)), 0)
INSERT [dbo].[helpdesk_svrdisk] ([guid], [ip], [diskname], [total], [used], [free], [isalert]) VALUES (N'996c1b38-4b9f-4e7b-9b4e-e696464aefc6', N'192.168.1.102', N'D:\', CAST(122.00 AS Decimal(18, 2)), CAST(51.00 AS Decimal(18, 2)), CAST(71.00 AS Decimal(18, 2)), 0)
/****** Object:  Table [dbo].[helpdesk_svr]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_svr]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_svr](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ip] [nvarchar](50) NULL,
	[friendname] [nvarchar](500) NULL,
	[bios_serialnumber] [nvarchar](200) NULL,
	[bios_manufacturer] [nvarchar](200) NULL,
	[bd_serialnumber] [nvarchar](200) NULL,
	[bd_manufacturer] [nvarchar](200) NULL,
	[processor] [nvarchar](200) NULL,
	[processorcount] [int] NULL,
	[mem] [nvarchar](50) NULL,
	[os] [nvarchar](200) NULL,
	[svrname] [nvarchar](500) NULL,
	[is64] [int] NULL,
	[osversion] [nvarchar](200) NULL,
	[lastbootuptime] [nvarchar](50) NULL,
	[svrtype] [nvarchar](50) NULL,
	[ip10] [bigint] NULL,
	[note] [nvarchar](1000) NULL,
	[loginname] [nvarchar](50) NULL,
	[password] [nvarchar](500) NULL,
	[isalert] [int] NULL CONSTRAINT [DF_helpdesk_svr_iswarning]  DEFAULT ((0)),
	[adddate] [datetime] NULL CONSTRAINT [DF_helpdesk_svr_adddate]  DEFAULT (getdate()),
 CONSTRAINT [PK_helpdesk_svr] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_svr] ON
INSERT [dbo].[helpdesk_svr] ([id], [ip], [friendname], [bios_serialnumber], [bios_manufacturer], [bd_serialnumber], [bd_manufacturer], [processor], [processorcount], [mem], [os], [svrname], [is64], [osversion], [lastbootuptime], [svrtype], [ip10], [note], [loginname], [password], [isalert], [adddate]) VALUES (1, N'10.1.11.11', N'共享服务器', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'File服务器', 825241137, N'主要存放文件共享', NULL, NULL, 0, CAST(0x0000A5C200B2232C AS DateTime))
INSERT [dbo].[helpdesk_svr] ([id], [ip], [friendname], [bios_serialnumber], [bios_manufacturer], [bd_serialnumber], [bd_manufacturer], [processor], [processorcount], [mem], [os], [svrname], [is64], [osversion], [lastbootuptime], [svrtype], [ip10], [note], [loginname], [password], [isalert], [adddate]) VALUES (2, N'10.1.12.2', N'网站数据库', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'Database服务器', 825241137, N'主要存放网站数据库', NULL, NULL, 1, CAST(0x0000A5C200B2232C AS DateTime))
INSERT [dbo].[helpdesk_svr] ([id], [ip], [friendname], [bios_serialnumber], [bios_manufacturer], [bd_serialnumber], [bd_manufacturer], [processor], [processorcount], [mem], [os], [svrname], [is64], [osversion], [lastbootuptime], [svrtype], [ip10], [note], [loginname], [password], [isalert], [adddate]) VALUES (3, N'192.168.1.102', N'File01', N'F0KQKP1', N'Dell Inc.', N'Dell Inc.', N'Dell Inc.', N'Intel64 Family 6 Model 42 Stepping 7', 4, N'3.909344G', N'Microsoft Windows 7 旗舰版 ', N'PC-20150710RZJT', 1, N'Microsoft Windows NT 6.1.7601 Service Pack 1', N'03  7 2016  8:40AM', N'File服务器', 825241137, N'日常服务器。', NULL, NULL, 0, CAST(0x0000A5C200B2232C AS DateTime))
SET IDENTITY_INSERT [dbo].[helpdesk_svr] OFF
/****** Object:  Table [dbo].[helpdesk_software]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_software]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_software](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[softwarename] [nvarchar](50) NULL,
	[serialno] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
	[manufacturer] [nvarchar](50) NULL,
	[buydate] [datetime] NULL,
	[notes] [nvarchar](500) NULL,
	[lastopusername] [nvarchar](50) NULL,
	[prev1] [nvarchar](50) NULL,
	[prev2] [nvarchar](50) NULL,
	[belongto] [nvarchar](50) NULL,
	[dept] [nvarchar](50) NULL,
	[version] [nvarchar](50) NULL,
	[limitedusers] [nvarchar](50) NULL,
	[expiredate] [datetime] NULL,
	[contactname] [nvarchar](50) NULL,
	[contacttel] [nvarchar](50) NULL,
	[price] [nvarchar](50) NULL,
	[lng] [nvarchar](500) NULL,
	[os] [nvarchar](500) NULL,
	[db] [nvarchar](500) NULL,
	[opusername] [nvarchar](500) NULL,
	[opdate] [datetime] NULL,
	[lastopdate] [datetime] NULL,
 CONSTRAINT [PK_helpdesk_software] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_software] ON
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (2, N'AutoCAD2014', N'', N'专业软件', N'AutoDesk', CAST(0x0000A4ED00000000 AS DateTime), N'', NULL, N'', N'', N'集团使用', N'工程部', N'2014', N'10', CAST(0x0000000000000000 AS DateTime), N'', N'', N'', N'', N'Windows;', N'', NULL, NULL, NULL)
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (3, N'MSSQL2008', N'2F7A-EDDX-3333-XD3HJ-KJFE', N'专业软件', N'微软', CAST(0x0000000000000000 AS DateTime), N'', N'管理员', N'', N'', N'集团使用', N'IT部门', N'专业版', N'50', CAST(0x0000000000000000 AS DateTime), N'', N'', N'', N'C++;', N'Windows;', N'MSSQL;', NULL, NULL, CAST(0x0000A4E900900873 AS DateTime))
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (4, N'金蝶2010', N'', N'人事软件', N'金蝶', CAST(0x0000A4EA00000000 AS DateTime), N'', N'管理员', N'', N'', N'部门使用', N'财务部', N'专业版', N'', CAST(0x0000000000000000 AS DateTime), N'', N'', N'0', N'', N'Windows;', N'', NULL, NULL, CAST(0x0000A93A0058804F AS DateTime))
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (5, N'会议系统', N'XESD-4564-CFR567C', N'办公软件', N'启明星', CAST(0x0000A93900000000 AS DateTime), N'企业官网见www.dotnetcms.org', N'管理员', NULL, NULL, N'', N'', N'v22.0', N'50', CAST(0x0000AAA600000000 AS DateTime), N'李万宝', N'18155261033', N'5000', N'Net;', N'Windows Server;', N'Mssql;', N'管理员', CAST(0x0000A9390117830A AS DateTime), CAST(0x0000A939015D96FF AS DateTime))
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (6, N'启明星Helpdesk', N'', N'办公软件', N'启明星工作室', CAST(0x0000000000000000 AS DateTime), N'', N'管理员', NULL, NULL, N'集团使用', N'', N'v22.0', N'', CAST(0x0000000000000000 AS DateTime), N'', N'', N'8000', N'Java;', N'Windows Server;', N'MySql;', N'管理员', CAST(0x0000A939015DD893 AS DateTime), CAST(0x0000A93A004AD93C AS DateTime))
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (7, N'OA', N'', N'人事软件', N'上海懿扬', CAST(0x0000000000000000 AS DateTime), N'', N'管理员', NULL, NULL, N'', N'公司部门', N'专业版', N'', CAST(0x0000000000000000 AS DateTime), N'张军', N'', N'0', N'C++;C;', N'Linux;', N'Oracle;Mssql;', N'管理员', CAST(0x0000A939015E25ED AS DateTime), CAST(0x0000A939015E40AB AS DateTime))
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (9, N'SSL证书', N'', N'开发软件', N'AWSSSL', CAST(0x0000A93A00000000 AS DateTime), N'用于网站Https协议', NULL, NULL, NULL, N'集团使用', N'', N'512位', N'', CAST(0x0000A95A00000000 AS DateTime), N'', N'', N'300', N'', N'', N'', N'管理员', CAST(0x0000A93A0059912C AS DateTime), NULL)
SET IDENTITY_INSERT [dbo].[helpdesk_software] OFF
/****** Object:  Table [dbo].[helpdesk_searchkey]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_searchkey]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_searchkey](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[keyword] [nvarchar](50) NOT NULL,
	[count] [int] NULL,
 CONSTRAINT [PK_helpdesk_searchkey] PRIMARY KEY CLUSTERED 
(
	[keyword] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_sday]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_sday]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_sday](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[calid] [int] NULL,
	[sdate] [datetime] NULL,
	[isworkday] [int] NOT NULL,
 CONSTRAINT [PK_appform_sday] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_sday]') AND name = N'idx_sdate')
CREATE NONCLUSTERED INDEX [idx_sdate] ON [dbo].[helpdesk_sday] 
(
	[sdate] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[helpdesk_scanlist]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_scanlist]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_scanlist](
	[scanpcname] [nvarchar](50) NULL,
	[scanpcip] [nvarchar](50) NULL,
	[scandate] [nvarchar](50) NULL,
	[guid] [nvarchar](50) NULL
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_reportdetail]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_reportdetail]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_reportdetail](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[rid] [int] NULL,
	[contents] [nvarchar](500) NULL,
	[types] [nvarchar](50) NULL,
	[per] [nvarchar](50) NULL,
 CONSTRAINT [PK_outlook_reportdetail] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_reportdetail] ON
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (6, 1, N'ssss', N'worklog', N'40')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (7, 1, N'dddd', N'worklog', N'20')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (8, 1, N'ff', N'worklog', N'0')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (9, 1, N'xxx', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (10, 1, N'fff', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (11, 2, N'1.修改helpdesk修改账户页面问题', N'worklog', N'100')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (12, 2, N'2.整合代码，优化报表', N'worklog', N'100')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (13, 2, N'3.增加资产管理功能', N'worklog', N'80')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (14, 2, N'1.优化book系统', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (15, 2, N'2.优化请假系统', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (26, 3, N'1.数据库升级', N'worklog', N'40')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (27, 3, N'2.更新操作系统', N'worklog', N'60')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (28, 3, N'3.更新office系统', N'worklog', N'60')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (29, 3, N'1.将2008升级到2012', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (30, 3, N'2.将office升级到2016', N'plan', N'')
SET IDENTITY_INSERT [dbo].[helpdesk_reportdetail] OFF
/****** Object:  Table [dbo].[helpdesk_reportcomm]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_reportcomm]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_reportcomm](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[rid] [int] NULL,
	[commid] [int] NULL,
	[comments] [nvarchar](500) NULL,
	[commdate] [datetime] NULL,
	[commusername] [nvarchar](50) NULL,
 CONSTRAINT [PK_outlook_reportcomm] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_report]    Script Date: 12/30/2020 14:33:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_report]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_report](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[contents] [nvarchar](3000) NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[reportstart] [datetime] NULL,
	[reportend] [datetime] NULL,
	[types] [nvarchar](50) NULL,
	[planstart] [datetime] NULL,
	[planend] [datetime] NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_outlook_report_createdate2]  DEFAULT (getdate()),
	[subject] [nvarchar](300) NULL,
	[commstatus] [nvarchar](10) NULL,
	[comments] [nvarchar](500) NULL,
	[commdate] [datetime] NULL,
	[commuid] [int] NULL,
	[commusername] [nvarchar](50) NULL,
	[keypoint] [nvarchar](1000) NULL,
	[summary] [nvarchar](1000) NULL,
	[nextplan] [nvarchar](1000) NULL,
	[title] [nvarchar](50) NULL,
 CONSTRAINT [PK_outlook_report2] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_report] ON
INSERT [dbo].[helpdesk_report] ([id], [contents], [uid], [username], [reportstart], [reportend], [types], [planstart], [planend], [createdate], [subject], [commstatus], [comments], [commdate], [commuid], [commusername], [keypoint], [summary], [nextplan], [title]) VALUES (2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>本次对helpdesk更新，最核心的是对系统那些了优化。</p>
<p>包括对报表，页面优化等</p>
</body>
</html>', 1, N'管理员', CAST(0x0000A52100000000 AS DateTime), CAST(0x0000A52500000000 AS DateTime), N'周报', CAST(0x0000A52800000000 AS DateTime), CAST(0x0000A52C00000000 AS DateTime), CAST(0x0000A5230178D78C AS DateTime), N'李万宝工作周报', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_report] ([id], [contents], [uid], [username], [reportstart], [reportend], [types], [planstart], [planend], [createdate], [subject], [commstatus], [comments], [commdate], [commuid], [commusername], [keypoint], [summary], [nextplan], [title]) VALUES (3, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><strong>本次更新，主要是对数据库进行操作，对系统优化。</strong></p>
</body>
</html>', 1, N'管理员', CAST(0x0000A52100000000 AS DateTime), CAST(0x0000A52500000000 AS DateTime), N'周报', CAST(0x0000A52800000000 AS DateTime), CAST(0x0000A52C00000000 AS DateTime), CAST(0x0000A5230179BA29 AS DateTime), N'李万宝周报', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[helpdesk_report] OFF
/****** Object:  Table [dbo].[helpdesk_repairlist]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_repairlist]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_repairlist](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[assettype] [nvarchar](50) NULL,
	[assetname] [nvarchar](50) NULL,
	[repairmethod] [nvarchar](500) NULL,
	[opuser] [nvarchar](50) NULL,
	[opdate] [datetime] NULL,
	[note] [nvarchar](1000) NULL,
	[tid] [int] NULL,
	[dept] [nvarchar](50) NULL,
	[money] [float] NULL,
	[prev1] [nvarchar](100) NULL,
	[prev2] [nvarchar](1000) NULL,
 CONSTRAINT [PK_helpdesk_repairlist] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[Helpdesk_PointList]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Helpdesk_PointList]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Helpdesk_PointList](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[tid] [int] NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[respoint] [int] NULL,
	[techpoint] [int] NULL,
	[serpoint] [int] NULL,
	[totalpoint] [int] NULL,
	[supportid] [int] NULL,
	[supportuser] [nvarchar](50) NULL,
	[note] [nvarchar](200) NULL,
	[adddate] [datetime] NULL CONSTRAINT [DF_Helpdesk_PointList_adddate]  DEFAULT (getdate()),
	[category1id] [int] NULL,
	[category1name] [nvarchar](200) NULL,
	[category2id] [int] NULL,
	[category2name] [nvarchar](200) NULL,
	[isprocess] [int] NULL CONSTRAINT [DF_Helpdesk_PointList_isprocess]  DEFAULT ((1)),
	[totaltext] [nvarchar](100) NULL,
 CONSTRAINT [PK_Helpdesk_PointList] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[Helpdesk_PointList] ON
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (1, 76, 1, N'管理员', 0, 0, 0, 1, NULL, NULL, N'', CAST(0x0000A5220113706A AS DateTime), 1, N'操作系统与标准软件', 9, N'常规软件', 1, N'非常满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (2, 73, 1, N'管理员', 0, 0, 0, 1, NULL, NULL, N'', CAST(0x0000A5C400C10354 AS DateTime), 1, N'操作系统与标准软件', 23, N'手机移动软件', 1, N'非常满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (3, 89, 1, N'管理员', 0, 0, 0, 4, NULL, NULL, N'good', CAST(0x0000A5C400DEDA11 AS DateTime), 4, N'网络故障', 16, N'线路故障', 1, N'满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (4, 89, 1, N'管理员', 0, 0, 0, 4, NULL, NULL, N'', CAST(0x0000A5C400F79713 AS DateTime), 4, N'网络故障', 16, N'线路故障', 1, N'满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (5, 80, 1, N'管理员', 0, 0, 0, 1, NULL, NULL, N'非常差劲', CAST(0x0000A5C40118086C AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 1, N'非常不满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (6, 78, 1, N'管理员', 0, 0, 0, 5, NULL, NULL, N'good', CAST(0x0000A5C4011810A2 AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 1, N'非常满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (7, 75, 1, N'管理员', 0, 0, 0, 3, NULL, NULL, N'', CAST(0x0000A5C401181854 AS DateTime), 1, N'操作系统与标准软件', 8, N'办公软件', 1, N'一般')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (8, 72, 1, N'管理员', 0, 0, 0, 2, NULL, NULL, N'no', CAST(0x0000A5C401182098 AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 1, N'不满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (9, 71, 1, N'管理员', 0, 0, 0, 4, NULL, NULL, N'', CAST(0x0000A5C401182587 AS DateTime), 3, N'硬件与外设', 12, N'PC外设', 1, N'满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (10, 70, 1, N'管理员', 0, 0, 0, 4, NULL, NULL, N'', CAST(0x0000A5C401182B77 AS DateTime), 2, N'应用系统', 11, N'人事系统', 1, N'满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (11, 88, 22, N'张华', 0, 0, 0, 5, NULL, NULL, N'', CAST(0x0000AB1A00887A2C AS DateTime), 3, N'硬件与外设', 12, N'电脑硬件', 1, N'非常满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (12, 91, 1, N'管理员', 0, 0, 0, 5, 1, N'管理员', N'', CAST(0x0000AB1A00896E42 AS DateTime), 1, N'操作系统与标准软件', 8, N'办公Office', 1, N'非常满意')
SET IDENTITY_INSERT [dbo].[Helpdesk_PointList] OFF
/****** Object:  Table [dbo].[helpdesk_pc_param]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_param]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc_param](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[paramname] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
	[paramvalue] [nvarchar](50) NULL,
	[parentvalue] [nvarchar](50) NULL,
	[parentname] [nvarchar](50) NULL,
	[orderid] [int] NULL CONSTRAINT [DF_helpdesk_pc_param_orderid]  DEFAULT ((0)),
 CONSTRAINT [PK_helpdesk_pc_spec] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc_param] ON
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (2, N'DELL OptiPlex 380', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (3, N'DELL OptiPlex 580', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (4, N'DELL OptiPlex 780', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (5, N'DELL OptiPlex 980', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (6, N'DELL OptiPlex 960', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (7, N'DELL OptiPlex FX160', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (9, N'Office2007', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (10, N'WPS Office', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (13, N'Windows', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (16, N'Windows Server', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (17, N'Linux', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (18, N'Android', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (19, N'Mac OS', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (20, N'其它', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (22, N'其它', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (23, N'台式机', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (24, N'笔记本', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (25, N'平板电脑', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (26, N'服务器', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (27, N'其它', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (28, N'在用', N'usestatus', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (29, N'在库', N'usestatus', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (30, N'报废', N'usestatus', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (31, N'Winrar', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (32, N'Photoshop', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (34, N'Adobe PDF', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (45, N'MSSQL', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (46, N'Symantec', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (95, N'操作系统', N'purchase_bigclass', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (96, N'办公软件', N'purchase_bigclass', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (97, N'电脑硬件', N'purchase_bigclass', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (101, N'Office2010', N'purchase_smallclass', NULL, NULL, N'办公软件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (102, N'Photoshop', N'purchase_smallclass', NULL, NULL, N'办公软件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (103, N'硬盘', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (104, N'内存', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (105, N'鼠标', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (106, N'键盘', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (107, N'主机', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (108, N'其它硬件', N'purchase_bigclass', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (109, N'打印机', N'purchase_smallclass', NULL, NULL, N'其它硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (110, N'扫描仪', N'purchase_smallclass', NULL, NULL, N'其它硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (111, N'投影仪', N'purchase_smallclass', NULL, NULL, N'其它硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (115, N'维修', N'usestatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (116, N'操作系统', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (117, N'办公软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (118, N'财务软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (119, N'人事软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (121, N'常用软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (122, N'更换内存', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (123, N'更换主板', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (124, N'更换鼠标', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (125, N'更换键盘', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (126, N'更换显示器', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (127, N'更换硬盘', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (128, N'更换光驱', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (129, N'其它', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (130, N'打印机', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (131, N'扫描仪', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (132, N'路由器', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (133, N'投影仪', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (134, N'个人使用', N'belongto', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (135, N'所属部门', N'belongto', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (136, N'所属公司', N'belongto', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (137, N'所属集团', N'belongto', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (138, N'总公司仓库', N'storeplace', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (139, N'IT仓库', N'storeplace', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (140, N'行政仓库', N'storeplace', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (141, N'2F 杂物仓库', N'storeplace', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (142, N'串行接口', N'hardware', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (143, N'风扇', N'hardware', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (144, N'数据库', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (145, N'专业软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (146, N'开发软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (147, N'录音设备', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (148, N'Java', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (149, N'C++', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (150, N'C', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (151, N'Net', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (152, N'Php', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (153, N'Python', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (154, N'Javascript', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (155, N'Perl', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (156, N'Ruby', N'lng', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (157, N'Oracle', N'db', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (158, N'MySql', N'db', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (159, N'Mssql', N'db', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (160, N'Sqlite', N'db', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (161, N'PostgreSQL', N'db', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (162, N'Redis', N'db', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (163, N'MongoDB', N'db', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (164, N'Memcache', N'db', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (166, N'CentOS', N'os', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (167, N'Ubuntu', N'os', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (168, N'Office2010', N'office', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (169, N'Office2013', N'office', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (170, N'Office2016', N'office', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (171, N'读卡器', N'hardware', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (172, N'机器老化', N'discardreason', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (173, N'硬盘损坏', N'discardreason', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (174, N'过保', N'discardreason', NULL, NULL, NULL, 0)
GO
print 'Processed 100 total records'
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (175, N'速度慢', N'discardreason', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (176, N'无法满足软件需求', N'discardreason', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (177, N'其它', N'discardreason', NULL, NULL, NULL, 0)
SET IDENTITY_INSERT [dbo].[helpdesk_pc_param] OFF
/****** Object:  Table [dbo].[helpdesk_pc_logs]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_logs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc_logs](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pcid] [int] NULL,
	[pcname] [nvarchar](50) NULL,
	[optype] [nvarchar](50) NULL,
	[opdate] [datetime] NULL,
	[contents] [nvarchar](3000) NULL,
	[opuser] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_pc_logs] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc_logs] ON
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (1, 1, N'PC01', N'add', CAST(0x0000AC4E01617C78 AS DateTime), N'新增PC', N'管理员')
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (2, 2, N'Server02', N'add', CAST(0x0000AC4E01633452 AS DateTime), N'新增PC', N'管理员')
SET IDENTITY_INSERT [dbo].[helpdesk_pc_logs] OFF
/****** Object:  Table [dbo].[helpdesk_pc_details]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_details]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc_details](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pcid] [int] NULL,
	[pname] [nvarchar](50) NULL,
	[pvalue] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_pc_details] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc_details] ON
INSERT [dbo].[helpdesk_pc_details] ([id], [pcid], [pname], [pvalue], [types]) VALUES (1, 4, N'串行接口', N'C3', N'hardware')
INSERT [dbo].[helpdesk_pc_details] ([id], [pcid], [pname], [pvalue], [types]) VALUES (2, 4, N'风扇', N'F3', N'hardware')
INSERT [dbo].[helpdesk_pc_details] ([id], [pcid], [pname], [pvalue], [types]) VALUES (3, 4, N'Winrar', N'W3', N'software')
INSERT [dbo].[helpdesk_pc_details] ([id], [pcid], [pname], [pvalue], [types]) VALUES (4, 4, N'Photoshop', N'P2', N'software')
SET IDENTITY_INSERT [dbo].[helpdesk_pc_details] OFF
/****** Object:  Table [dbo].[helpdesk_pc_asset]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_asset]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc_asset](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[assetname] [nvarchar](50) NULL,
	[manufacturer] [nvarchar](50) NULL,
	[serialno] [nvarchar](50) NULL,
	[buydate] [datetime] NULL,
	[storeplace] [nvarchar](50) NULL,
	[usestatus] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
	[prev1] [nvarchar](50) NULL,
	[prev2] [nvarchar](50) NULL,
	[notes] [nvarchar](500) NULL,
	[expiredate] [datetime] NULL,
	[lastopusername] [nvarchar](50) NULL,
	[ip] [nvarchar](50) NULL,
	[mac] [nvarchar](250) NULL,
	[belongto] [nvarchar](50) NULL,
	[dept] [nvarchar](50) NULL,
	[enduser] [nvarchar](50) NULL,
	[connecttype] [nvarchar](50) NULL,
	[provider] [nvarchar](50) NULL,
	[price] [nvarchar](50) NULL,
	[contactname] [nvarchar](50) NULL,
	[contacttel] [nvarchar](50) NULL,
	[opusername] [nvarchar](50) NULL,
	[lastopdate] [datetime] NULL,
	[opdate] [datetime] NULL,
	[ip10] [bigint] NULL,
 CONSTRAINT [PK_helpdesk_pc_asset] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc_asset] ON
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (1, N'HPXDE433', N'HPXDE433', N'HPXDE433', CAST(0x0000A19E00000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (2, N'HPXD222', N'HPXD222', N'HPXDE433', CAST(0x0000A19E00000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), N'管理员', N'', N'', N'集团使用', N'财务部', N'李万宝', N'', N'', N'', N'', N'', NULL, CAST(0x0000A4E9008F3A4C AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (3, N'针式打印机', N'DELL', N'', CAST(0x0000000000000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), N'管理员', N'192.168.1.30', N'', N'', N'', N'', N'', N'', N'', N'', N'', NULL, CAST(0x0000A4E9008F265B AS DateTime), NULL, 3232235806)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (4, N'LQ300K+II 针式打印机', N'HP', N'', CAST(0x0000A21400000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.22', N'', N'部门使用', N'服务部', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E900877E74 AS DateTime), 3232235798)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (5, N'LQ300K+II 针式打印机', N'HP', N'', CAST(0x0000A4EB00000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.23', N'', N'部门使用', N'财务部', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E90087A162 AS DateTime), 3232235799)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (6, N'HP CP1025C 彩色打印机', N'', N'', CAST(0x0000000000000000 AS DateTime), N'文印室', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.25', N'', N'集团使用', N'文印室', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E90087E642 AS DateTime), 3232235801)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (7, N'hp1212 一体机', N'HP', N'', CAST(0x0000000000000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.26', N'', N'集团使用', N'销售部', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E900896307 AS DateTime), 3232235802)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (8, N'路由器 32口', N'', N'', CAST(0x0000000000000000 AS DateTime), N'', N'在用', N'路由器', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.0', N'66:D4:FE:XD:RE', N'部门使用', N'财务部', N'', N'服务器', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E9008F9DF3 AS DateTime), 3232235776)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (10, N'交换机', N'中控', N'', CAST(0x0000000000000000 AS DateTime), N'', N'在用', N'路由器', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A93A00463110 AS DateTime), NULL)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (11, N'佳能打印机', N'', N'', CAST(0x0000A0A000000000 AS DateTime), N'二楼走到口', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), N'管理员', N'', N'', N'', N'人事部', N'张军', N'', N'', N'', N'', N'', N'管理员', CAST(0x0000A93A004C7EF2 AS DateTime), CAST(0x0000A93A004658AA AS DateTime), NULL)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (12, N'启明星硬件', N'HPXDE433', N'HPXDE433', CAST(0x0000A44E00000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x00011C2700000000 AS DateTime), NULL, N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', NULL, NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[helpdesk_pc_asset] OFF
/****** Object:  Table [dbo].[helpdesk_pc]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pcname] [nvarchar](500) NULL,
	[assettag] [nvarchar](500) NULL,
	[spec] [nvarchar](500) NULL,
	[serial] [nvarchar](500) NULL,
	[dept] [nvarchar](500) NULL,
	[enduser] [nvarchar](500) NULL,
	[usetype] [nvarchar](500) NULL,
	[usestatus] [nvarchar](500) NULL,
	[os] [nvarchar](500) NULL,
	[office] [nvarchar](500) NULL,
	[buydate] [datetime] NULL,
	[expiredate] [datetime] NULL,
	[storeplace] [nvarchar](500) NULL,
	[ip] [nvarchar](500) NULL,
	[prezver1] [nvarchar](500) NULL,
	[prezver2] [nvarchar](500) NULL,
	[note] [nvarchar](500) NULL,
	[addby] [nvarchar](500) NULL,
	[adduid] [int] NULL,
	[adddate] [datetime] NULL,
	[ispopup] [int] NULL CONSTRAINT [DF_helpdesk_pc_ispopup]  DEFAULT ((1)),
	[mainboardserialno] [nvarchar](500) NULL,
	[mainboardmanufacture] [nvarchar](500) NULL,
	[display] [nvarchar](500) NULL,
	[mac] [nvarchar](500) NULL,
	[belongto] [nvarchar](500) NULL,
	[cpu] [nvarchar](500) NULL,
	[mem] [nvarchar](500) NULL,
	[harddisk] [nvarchar](500) NULL,
	[mouse] [nvarchar](500) NULL,
	[keyboard] [nvarchar](500) NULL,
	[cd] [nvarchar](500) NULL,
	[netcard] [nvarchar](500) NULL,
	[sound] [nvarchar](500) NULL,
	[lastupdatedate] [datetime] NULL,
	[lastupdateusername] [nvarchar](500) NULL,
	[lastupdateuid] [int] NULL,
	[attach] [nvarchar](1000) NULL,
	[attachedit] [nvarchar](1000) NULL,
	[ip10] [bigint] NULL CONSTRAINT [DF_helpdesk_pc_ip10]  DEFAULT ((0)),
	[money] [decimal](18, 2) NULL,
	[discarddate] [datetime] NULL,
	[discardreason] [nvarchar](500) NULL,
	[itasset] [nvarchar](500) NULL,
	[supply] [nvarchar](500) NULL,
	[ispd] [nvarchar](500) NULL,
	[staffcode] [nvarchar](500) NULL,
	[wifimac] [nvarchar](500) NULL,
	[isInternet] [nvarchar](500) NULL,
	[usbright] [nvarchar](500) NULL,
	[num] [nvarchar](500) NULL,
	[pdnum] [nvarchar](500) NULL,
	[sign] [nvarchar](500) NULL,
	[reason] [nvarchar](500) NULL,
	[tag] [nvarchar](500) NULL,
 CONSTRAINT [PK_helpdesk_pc] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc] ON
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [attach], [attachedit], [ip10], [money], [discarddate], [discardreason], [itasset], [supply], [ispd], [staffcode], [wifimac], [isInternet], [usbright], [num], [pdnum], [sign], [reason], [tag]) VALUES (1, N'PC01', N'ZC001', N'DELL OptiPlex 380', N'', N'人事部', N'张华', N'笔记本', N'在用', N'Android', N'Office2007', CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), N'2F 杂物仓库', N'', NULL, NULL, N'', N'管理员', 1, CAST(0x0000AC4E01617C75 AS DateTime), 1, N'', N'', N'', N'', N'所属集团', N'', N'', N'', N'', N'', N'', N'', N'', CAST(0x0000AC4E01618592 AS DateTime), N'管理员', NULL, N'
                           
                       ', N'<span></span>', 0, CAST(0.00 AS Decimal(18, 2)), CAST(0x0000000000000000 AS DateTime), N'', N'IT001', N'', NULL, N'001', N'', N'是', N'是', NULL, NULL, NULL, NULL, N'Y')
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [attach], [attachedit], [ip10], [money], [discarddate], [discardreason], [itasset], [supply], [ispd], [staffcode], [wifimac], [isInternet], [usbright], [num], [pdnum], [sign], [reason], [tag]) VALUES (2, N'Server02', N'Fin02', N'', N'Serv002', N'财务部', N'', N'', N'在用', N'', N'', CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), N'', N'1.1.1.1', NULL, NULL, N'', N'管理员', 1, CAST(0x0000AC4E01633451 AS DateTime), 1, N'', N'', N'', N'', N'所属部门', N'', N'', N'', N'', N'', N'', N'', N'', NULL, NULL, NULL, N'', N'', 0, CAST(0.00 AS Decimal(18, 2)), CAST(0x0000000000000000 AS DateTime), N'', N'002', N'', NULL, N'', N'', N'是', N'是', NULL, NULL, NULL, NULL, N'Y')
SET IDENTITY_INSERT [dbo].[helpdesk_pc] OFF
/****** Object:  Table [dbo].[helpdesk_outlook_calendar]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_outlook_calendar]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_outlook_calendar](
	[username] [nvarchar](50) NULL,
	[begintime] [datetime] NULL,
	[endtime] [datetime] NULL,
	[title] [nvarchar](50) NULL,
	[id] [int] IDENTITY(1,1) NOT NULL
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_newscat]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_newscat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_newscat](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_newscat] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_newscat] ON
INSERT [dbo].[helpdesk_newscat] ([id], [catname]) VALUES (1, N'最新新闻')
INSERT [dbo].[helpdesk_newscat] ([id], [catname]) VALUES (2, N'内部通知')
SET IDENTITY_INSERT [dbo].[helpdesk_newscat] OFF
/****** Object:  Table [dbo].[helpdesk_news]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_news]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_news](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catid] [int] NULL,
	[title] [nvarchar](100) NULL,
	[contents] [nvarchar](max) NULL,
	[istop] [int] NULL CONSTRAINT [DF_helpdesk_news_istop]  DEFAULT ((0)),
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_news_createdate]  DEFAULT (getdate()),
	[addby] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_news] PRIMARY KEY CLUSTERED 
(
	[id] 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]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_news] ON
INSERT [dbo].[helpdesk_news] ([id], [catid], [title], [contents], [istop], [createdate], [addby]) VALUES (1, 1, N'关于2012.12.1日系统升级暂停网络的通知', N'<p>关于2012.12.1日系统升级暂停网络的通知</p>', 2, CAST(0x0000A0FE00C40D10 AS DateTime), N'管理员')
INSERT [dbo].[helpdesk_news] ([id], [catid], [title], [contents], [istop], [createdate], [addby]) VALUES (2, 1, N'Intel出现漏洞 微软更新补丁及时安装', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>今年年初英特尔曾爆出过两个重大安全漏洞Meltdown（熔断）和Spectre（幽灵），风波刚过去不久，Intel昨日又发现了一种新的CPU安全漏洞，Foreshadow（官方称其为L1TF、L1 Terminal Fault）。这次的L1TF漏洞影响的是CPU安全等级最高的SGX部分，而这块独立的安全区域曾帮助Skylake/Kaby Lake架构的Intel CPU免于Meltdown和Spectre的大部分攻击。</p>
<p><img src="../uploads/2018-08/201808200951560.jpg" alt=" Intel又出漏洞 " width="640" height="427" /><br /><strong>英特尔</strong></p>
<p>Foreshadow主要攻击CPU的一级缓存，而这里一般会储存密码等隐私内容，因此这次的危险级别是&ldquo;高危&rdquo;。并且Foreshadow的攻击将会对Skylake/Kaby Lake架构的CPU产生影响。不过用户也不用担心，这次Intel已经提前得知该漏洞，并且在昨天已经通过推送代码补丁修补了Foreshadow漏洞。</p>
<p><br /><strong>CPU</strong></p>
<p>Foreshadow共三个子体，分别影响SGX、OS/SMM和VMM（<a class="hui14_line" href="http://xiazai.zol.com.cn/detail/4/37058.shtml">虚拟机</a>平台），尤其对企业级云平台将造成重大危机，不过这次Intel和微软都及时更新了补丁，微软最近更新的17134.228和16299.611两个版本主要就是应对Foreshadow漏洞，英特尔表示，此次修补不会对平台性能造成显著影响。</p>
</body>
</html>', 0, CAST(0x0000A94200A29528 AS DateTime), N'管理员')
INSERT [dbo].[helpdesk_news] ([id], [catid], [title], [contents], [istop], [createdate], [addby]) VALUES (3, 2, N'关于操作系统升级通知', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>各位人员：</p>
<p>&nbsp; &nbsp; &nbsp; IT部门将于2018-8-20 18:00-20:00更新公司内部OA系统，其间，OA系统将无法登录、查看。</p>
<p>请知悉。</p>
<p>&nbsp; &nbsp; &nbsp;如有紧急问题，请联系：010-12345678 李先生</p>
<p>&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IT信息部</p>
</body>
</html>', 0, CAST(0x0000A94200A58239 AS DateTime), N'管理员')
INSERT [dbo].[helpdesk_news] ([id], [catid], [title], [contents], [istop], [createdate], [addby]) VALUES (4, 2, N'关于服务器系统升级的通知', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>各位同事：</p>
<p>&nbsp; &nbsp; &nbsp;IT部门将于2018-8-20 18:00--21:00 更新服务器配置，更新其间，共享文件夹、部分网络将无法使用。</p>
<p>请知悉。</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IT信息部</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2018-8-19</p>
</body>
</html>', 0, CAST(0x0000A94200A62DA6 AS DateTime), N'管理员')
SET IDENTITY_INSERT [dbo].[helpdesk_news] OFF
/****** Object:  Table [dbo].[helpdesk_movelog]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_movelog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_movelog](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[opusername] [nvarchar](50) NULL,
	[pcid] [int] NULL,
	[fromuid] [int] NULL,
	[fromusername] [nvarchar](50) NULL,
	[fromdept] [nvarchar](50) NULL,
	[touid] [int] NULL,
	[tousername] [nvarchar](50) NULL,
	[todeptname] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_movelog_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_helpdesk_movelog] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_logs]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_logs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_logs](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[types] [nvarchar](50) NULL,
	[title] [nvarchar](500) NULL,
	[contents] [nvarchar](500) NULL,
	[adddate] [datetime] NULL CONSTRAINT [DF_helpdesk_logs_adddate]  DEFAULT (getdate()),
	[tid] [int] NULL,
	[username] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_logs] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_logs] ON
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (1, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000AB1A00895EC4 AS DateTime), 91, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (2, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000AB1B006A647B AS DateTime), 92, N'李丽')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (3, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000AB1B006D43A8 AS DateTime), 87, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (4, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000AB1B006D6787 AS DateTime), 87, N'管理员')
SET IDENTITY_INSERT [dbo].[helpdesk_logs] OFF
/****** Object:  Table [dbo].[helpdesk_loginscan_software]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_loginscan_software]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_loginscan_software](
	[guid] [uniqueidentifier] NOT NULL CONSTRAINT [DF_helpdesk_loginscan_software_guid]  DEFAULT (newid()),
	[pcname] [nvarchar](50) NULL,
	[ip] [nvarchar](50) NULL,
	[loginname] [nvarchar](50) NULL,
	[softwarename] [nvarchar](500) NULL,
	[installLocation] [nvarchar](500) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_loginscan_software_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_helpdesk_loginscan_software] PRIMARY KEY CLUSTERED 
(
	[guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'ff60e791-6efd-45e3-ad18-2a07c799b35b', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'NVIDIA Install Application', N'C:\Program Files\NVIDIA Corporation\Installer2\installer.{CB697631-AD87-4E1D-B6BC-DE07CC619F3C}', CAST(0x0000A4E900772132 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'9c001211-109f-4f89-8aaf-2a83a676dadd', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'WinRAR 5.21 (64-位)', N'C:\Program Files\WinRAR\', CAST(0x0000A4E900772131 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'070c6339-b05c-4175-bfb2-3b9be06a583d', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'Microsoft Silverlight', N'C:\Program Files\Microsoft Silverlight\', CAST(0x0000A4E900772131 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'3175167c-6eaa-48bf-8647-b675dca687bc', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'Microsoft .NET Framework 4.5.1', N'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SetupCache\v4.5.51078\', CAST(0x0000A4E900772131 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'b79fa3a2-702c-4018-9dc8-c7f8c179b1a7', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'Microsoft SQL Server Compact 4.0 SP1 x64 ENU', N'C:\Program Files\Microsoft SQL Server Compact Edition\', CAST(0x0000A4E900772131 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'fd909b81-12f6-4e40-9442-e04bf45fb81b', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'NVIDIA 控制面板 320.18', N'C:\Program Files\NVIDIA Corporation\Control Panel Client', CAST(0x0000A4E900772132 AS DateTime))
/****** Object:  Table [dbo].[helpdesk_loginscan_hardware]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_loginscan_hardware]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_loginscan_hardware](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pcname] [nvarchar](200) NULL,
	[loginname] [nvarchar](200) NULL,
	[ip] [nvarchar](50) NULL,
	[bios_manufacturer] [nvarchar](200) NULL,
	[bios_serialnumber] [nvarchar](200) NULL,
	[bios_smbiosbiosversion] [nvarchar](200) NULL,
	[bios_version] [nvarchar](200) NULL,
	[bios_caption] [nvarchar](200) NULL,
	[board_caption] [nvarchar](200) NULL,
	[board_manufacturer] [nvarchar](200) NULL,
	[board_serialnumber] [nvarchar](200) NULL,
	[board_tag] [nvarchar](200) NULL,
	[board_product] [nvarchar](200) NULL,
	[os_caption] [nvarchar](200) NULL,
	[os_installdate] [nvarchar](200) NULL,
	[os_lastbootuptime] [nvarchar](200) NULL,
	[os_serialnumber] [nvarchar](200) NULL,
	[os_totalvirtualmemorysize] [nvarchar](200) NULL,
	[os_version] [nvarchar](200) NULL,
	[os_windowsdirectory] [nvarchar](200) NULL,
	[createdate] [datetime] NULL,
	[os_csdversion] [nvarchar](200) NULL,
	[mac] [nvarchar](200) NULL,
	[processor] [nvarchar](50) NULL,
	[processorcount] [nvarchar](50) NULL,
	[is64] [nvarchar](50) NULL,
	[disks] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_loginscan] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_loginscan_hardware] ON
INSERT [dbo].[helpdesk_loginscan_hardware] ([id], [pcname], [loginname], [ip], [bios_manufacturer], [bios_serialnumber], [bios_smbiosbiosversion], [bios_version], [bios_caption], [board_caption], [board_manufacturer], [board_serialnumber], [board_tag], [board_product], [os_caption], [os_installdate], [os_lastbootuptime], [os_serialnumber], [os_totalvirtualmemorysize], [os_version], [os_windowsdirectory], [createdate], [os_csdversion], [mac], [processor], [processorcount], [is64], [disks]) VALUES (1, N'PC-20150710RZJT', N'Administrator', N'192.168.0.123', N'Dell Inc.', N'F0KQKP1', N'A06', N'DELL   - 1072009', N'BIOS Date: 05/26/11 10:02:35 Ver: 04.06.04', N'Base Board', N'Dell Inc.', N'.F0KQKP1.CN7016617L024F.', N'Base Board', N'0FXK2Y', N'Microsoft Windows 7 旗舰版 ', N'20150710112552.000000+480', N'20150803055451.125599+480', N'00426-OEM-8992662-00400', N'8.196632', N'6.1.7601', N'C:\Windows', CAST(0x0000A4E900772023 AS DateTime), N'Service Pack 1', N'AC:72:89:23:5C:3A', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_loginscan_hardware] ([id], [pcname], [loginname], [ip], [bios_manufacturer], [bios_serialnumber], [bios_smbiosbiosversion], [bios_version], [bios_caption], [board_caption], [board_manufacturer], [board_serialnumber], [board_tag], [board_product], [os_caption], [os_installdate], [os_lastbootuptime], [os_serialnumber], [os_totalvirtualmemorysize], [os_version], [os_windowsdirectory], [createdate], [os_csdversion], [mac], [processor], [processorcount], [is64], [disks]) VALUES (12, N'DREAM', N'admin', N'192.168.206.1', N'Dell Inc.', N'5PJYW32', N'1.1.2', N'DELL   - 1072009', N'1.1.2', NULL, N'Dell Inc.', N'/5PJYW32/CN1296678100DF/', N'Base Board', N'05VRRG', N'Microsoft Windows 10 家庭中文版', N'20180523151155.000000+480', N'20180810145742.490072+480', N'00342-30262-00002-AAOEM', N'8', N'6.2.9200.0', N'C:\WINDOWS', CAST(0x0000A94201493A71 AS DateTime), N'', N'50:9A:4C:BC:B6:35 ; 00:50:56:C0:00:01 ; 00:50:56:C0:00:08 ; ', N'Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz', N'2', N'是', N'224')
SET IDENTITY_INSERT [dbo].[helpdesk_loginscan_hardware] OFF
/****** Object:  Table [dbo].[helpdesk_lists]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_lists](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF__helpdesk___creat__0CBAE877]  DEFAULT (getdate()),
	[category1id] [int] NULL,
	[category1name] [nvarchar](50) NULL,
	[category2id] [int] NULL,
	[category2name] [nvarchar](50) NULL,
	[category3id] [int] NULL,
	[category3name] [nvarchar](50) NULL,
	[title] [nvarchar](500) NULL,
	[priority] [nvarchar](50) NULL,
	[method] [nvarchar](50) NULL,
	[status] [nvarchar](50) NULL,
	[contents] [nvarchar](max) NULL,
	[assettag] [nvarchar](50) NULL,
	[serial] [nvarchar](50) NULL,
	[os] [nvarchar](50) NULL,
	[pcname] [nvarchar](50) NULL,
	[ip] [nvarchar](50) NULL,
	[bit32] [nvarchar](50) NULL,
	[Usercheck] [nvarchar](50) NULL,
	[ie] [nvarchar](50) NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[islock] [int] NULL CONSTRAINT [DF_helpdesk_lists_islock]  DEFAULT ((0)),
	[ispublic] [int] NULL CONSTRAINT [DF_helpdesk_lists_ispublic]  DEFAULT ((0)),
	[handleby] [nvarchar](50) NULL,
	[handleid] [int] NULL,
	[handledate] [datetime] NULL,
	[hour] [nvarchar](50) NULL CONSTRAINT [DF_helpdesk_lists_hour]  DEFAULT ((0)),
	[closedate] [datetime] NULL,
	[isclose] [nvarchar](10) NULL CONSTRAINT [DF_helpdesk_lists_isclose]  DEFAULT ((0)),
	[closeby] [nvarchar](50) NULL,
	[sladate] [datetime] NULL,
	[ispop] [int] NULL CONSTRAINT [DF_helpdesk_lists_ispop]  DEFAULT ((1)),
	[email] [nvarchar](500) NULL,
	[mainboardserialno] [nvarchar](50) NULL,
	[mainboardmanufacturer] [nvarchar](50) NULL,
	[contactname] [nvarchar](50) NULL,
	[contactdept] [nvarchar](50) NULL,
	[contactemail] [nvarchar](50) NULL,
	[contacttel] [nvarchar](50) NULL,
	[assignuid] [int] NULL,
	[ispoint] [int] NULL CONSTRAINT [DF_helpdesk_lists_ispoint]  DEFAULT ((0)),
	[starttime] [datetime] NULL,
 CONSTRAINT [PK__helpdesk_lists__0BC6C43E] PRIMARY KEY CLUSTERED 
(
	[id] 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]
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND name = N'index_category1name')
CREATE NONCLUSTERED INDEX [index_category1name] ON [dbo].[helpdesk_lists] 
(
	[category1name] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND name = N'index_category2name')
CREATE NONCLUSTERED INDEX [index_category2name] ON [dbo].[helpdesk_lists] 
(
	[category2name] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND name = N'index_date')
CREATE NONCLUSTERED INDEX [index_date] ON [dbo].[helpdesk_lists] 
(
	[createdate] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[helpdesk_lists] ON
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (64, CAST(0x0000A593015FAFA4 AS DateTime), 3, N'硬件与外设', 13, N'打印机', 36, N'打印机', N'解决IE兼容性', N'high', N'远程桌面', N'unsolved', N'<p>解决IE兼容性</p>', N'Fin01', N'Fin01', N'WinNT', N'Fin01', N'::1', N'是', N'管理员', N'IE9.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A198009BD7C2 AS DateTime), N'1.5', CAST(0x0000A198009AA339 AS DateTime), N'0', N'管理员', CAST(0x0000A19900878998 AS DateTime), 1, N'1939248766@qq.com', N'Fin01XXXXXX', N'', N'管理员', N'Admin部', N'1939248766@qq.com', N'15001712100', NULL, 1, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (68, CAST(0x0000A70F007F43CD AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows系列', N'windows XP升级到 windows10', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, NULL, NULL, NULL, N'1', NULL, N'0', NULL, CAST(0x0000A4EA007F43C1 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'审计部', N'1939248766@qq.com', N'15001712100', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (69, CAST(0x0000A898007F9631 AS DateTime), 5, N'权限与账户', 17, N'申请账户', 40, N'Active Directory账户申请', N'申请部门邮件组 dept-it@dotnetcms.org', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>你好IT，因工作需要，申请部门邮件组。<a href="mailto:dept-it@dotnetcms.org">dept-it@dotnetcms.org</a></p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, NULL, N'2', NULL, N'0', NULL, CAST(0x0000A4EA007F9630 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (70, CAST(0x0000A768008010E6 AS DateTime), 2, N'应用系统', 11, N'人事系统', 33, N'HR账户', N'请开通服务器共享盘 HR 文件夹读写权限', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>你好，我的新来的Jojo，请帮助开通部门文件夹读写权限</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, NULL, NULL, NULL, N'1', NULL, N'0', NULL, CAST(0x0000A4EA008010E1 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'生产部', N'1939248766@qq.com', N'15001712100', NULL, 4, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (71, CAST(0x0000ABB000804AEF AS DateTime), 3, N'硬件与外设', 12, N'PC外设', 35, N'鼠标键盘U盘', N'更换鼠标，目前的鼠标坏了', N'medium', NULL, N'solved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>RT</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C6009F9C83 AS DateTime), N'1', CAST(0x0000A5C6009F9C7D AS DateTime), N'1', N'管理员', CAST(0x0000A4EA00804AED AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'生产部', N'1939248766@qq.com', N'15001712100', NULL, 4, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (72, CAST(0x0000AB3700808AAA AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows系列', N'IE升级到IE10后，财务插件无法使用', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C50170AF1B AS DateTime), N'3', CAST(0x0000A5C50170AF1B AS DateTime), N'1', N'管理员', CAST(0x0000A4EA00808AA9 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 2, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (74, CAST(0x0000AB560080E8FC AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 22, N'iOS', N'请帮助我配置一下iOS邮件，以便接收公司邮箱', N'medium', NULL, N'pending', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>公司SMTP多少的？</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C6009BCA4C AS DateTime), N'0.5', CAST(0x0000A5C6009B929C AS DateTime), N'0', N'管理员', CAST(0x0000A4EA0080E8FA AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (75, CAST(0x0000A9CA00812AC0 AS DateTime), 1, N'操作系统与标准软件', 8, N'办公软件', 28, N'Office2007', N'Outlook每次接收邮件，总是弹出登录对话框', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>请帮助解决。</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, NULL, NULL, NULL, N'0.3', NULL, N'0', NULL, CAST(0x0000A4EA00812ABE AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'总经理', N'1939248766@qq.com', N'15001712100', NULL, 3, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (76, CAST(0x0000A9E900814CEE AS DateTime), 1, N'操作系统与标准软件', 9, N'常规软件', 31, N'Autocad', N'请帮助我安装一下AutoCAD2014，工作需要', N'medium', N'邮件支持', N'pending', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C60098EC87 AS DateTime), N'8', CAST(0x0000A5C60098CCAB AS DateTime), N'0', N'管理员', CAST(0x0000A4EA00814CED AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 1, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (78, CAST(0x0000AA050081A95B AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows系列', N'增加磁盘空间，目前只有10G了，不够了', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, NULL, N'0', NULL, N'0', NULL, CAST(0x0000A4EA0081A95C AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'生产部', N'1939248766@qq.com', N'15001712100', NULL, 5, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (80, CAST(0x0000AA05008214DB AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows系列', N'请帮助我windows安装Office2013吧，急！急！急！', N'critical', NULL, N'solved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C600B9A8B4 AS DateTime), N'3.500000', CAST(0x0000A5C40161DF9F AS DateTime), N'1', N'管理员', CAST(0x0000A4EA008214D9 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 1, CAST(0x0000A5C6007F8055 AS DateTime))
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (81, CAST(0x0000AA810077674D AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows', N' win server 2008文件服务器如何升级或修复', N'medium', NULL, N'unsolved', N'<div>目前公司一台文件服务器，上面有几个T的文件，操作系统是WIN server2008的，注意不是R2，</div>
<div>现在这台系统很多软件双击没有反应，除了共享文件功能正常，好像其它的都不正常了，连控制面板都打不开，我想修复或换系统，但问题是公司几百号人的文件访问权限如何迁移，这很麻烦，这么多人，要是换了系统，又得重新设置文件访问权限，</div>', N'ZC16', N'XH16', N'WinNT', N'HRPC16', N'::1', N'是', N'李万宝', N'Chrome57.0', 1, N'李万宝', 0, 0, NULL, NULL, NULL, N'0', NULL, N'0', NULL, CAST(0x0000AB1B0077674D AS DateTime), 1, N'1939248766@qq.com', N'BORD015', N'DELL', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (82, CAST(0x0000AAC0007DAC23 AS DateTime), 5, N'权限与账户', 17, N'申请账户', 42, N'邮件申请', N'申请一个OA邮件组', N'medium', NULL, N'unsolved', N'申请一个邮件组', N'ZC09', N'XH09', N'WinNT', N'HRPC09', N'::1', N'是', N'李红', N'Chrome57.0', 25, N'李红', 0, 0, N'管理员', NULL, CAST(0x0000A9EC006D6786 AS DateTime), N'10', NULL, N'0', NULL, CAST(0x0000AB1B007DAC23 AS DateTime), 1, N'', N'BORD008', N'DELL', N'李红', N'人事部', N'spring@qq.com', N'14855655566', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (83, CAST(0x0000AAFE007DE1A3 AS DateTime), 2, N'应用系统', 11, N'人事系统', 33, N'HR账户', N'人事系统，最近速度有点慢', N'medium', NULL, N'unsolved', N'希望能够尽快解决。', N'ZC09', N'XH09', N'WinNT', N'HRPC09', N'::1', N'是', N'李红', N'Chrome57.0', 25, N'李红', 0, 0, N'李万宝', NULL, CAST(0x0000ABB3006D6786 AS DateTime), N'10', NULL, N'0', NULL, CAST(0x0000AB1B007DE1A2 AS DateTime), 1, N'', N'BORD008', N'DELL', N'李红', N'交通部', N'kk@127.0.0.1', N'1234444', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (84, CAST(0x0000AB1F007E25F1 AS DateTime), 3, N'硬件与外设', 54, N'打印机', 59, N'机器故障', N'[手机提交]打印机无法打印', N'medium', NULL, N'unsolved', N'卡纸', N'', N'', N'WinNT', N'', N'::1', N'是', N'', N'Chrome57.0', 25, N'李红', 0, 0, N'李丽', NULL, CAST(0x0000AB76006D6786 AS DateTime), N'3', NULL, N'0', NULL, CAST(0x0000AB1B007E25F1 AS DateTime), 1, N'spring@qq.com', N'', N'', N'李红', N'人事部', N'spring@qq.com', N'147852369', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (85, CAST(0x0000AB240087914B AS DateTime), 2, N'应用系统', 10, N'财务系统', 32, N'金蝶账户相关', N'账户新申请', N'medium', NULL, N'unsolved', N'新申请账户', N'', N'', N'WinNT', N'', N'::1', N'是', N'杰妮', N'Chrome57.0', 24, N'杰妮', 0, 0, N'管理员', NULL, CAST(0x0000ABB3006D6786 AS DateTime), N'4', NULL, N'0', NULL, CAST(0x0000AB1B0087914B AS DateTime), 1, N'', N'', N'', N'杰妮', N'财务部', N'jinne@127.0.0.1', N'1233334343', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (86, CAST(0x0000AB2E0087E01B AS DateTime), 2, N'应用系统', 10, N'财务系统', 32, N'金蝶账户相关', N'文件夹权限', N'medium', NULL, N'unsolved', N'权限不足', N'', N'', N'WinNT', N'', N'::1', N'是', N'杰妮', N'Chrome57.0', 24, N'杰妮', 0, 0, N'李万宝', NULL, CAST(0x0000AC89006D6786 AS DateTime), N'2', NULL, N'0', NULL, CAST(0x0000AB1B0087E01B AS DateTime), 1, N'Jenny@qq.com', N'', N'', N'杰妮', N'财务部', N'Jenny@qq.com', N'14758569856', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (87, CAST(0x0000AB3100880B51 AS DateTime), 6, N'其他', 45, N'其他', 46, N'其他', N'[手机提交]OA系统升级', N'low', N'远程桌面', N'solved', N'OA系统升级', N'', N'', N'WinNT', N'', N'::1', N'是', N'', N'Chrome57.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000AB1B006D6786 AS DateTime), N'2', CAST(0x0000AB1B006D6786 AS DateTime), N'1', N'管理员', CAST(0x0000AB1B00880B51 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (88, CAST(0x0000AB2300886E4E AS DateTime), 3, N'硬件与外设', 12, N'电脑硬件', 35, N'主机与显示器', N'[手机提交]显示器问题', N'medium', NULL, N'unsolved', N'无法显示', N'', N'', N'WinNT', N'', N'::1', N'是', N'', N'Chrome57.0', 22, N'张华', 0, 0, N'李万宝', NULL, CAST(0x0000AA64006D6786 AS DateTime), N'1', NULL, N'0', NULL, CAST(0x0000AB1B00886E4D AS DateTime), 1, N'', N'', N'', N'张华', N'品质部', N'', N'11111111', NULL, 5, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (89, CAST(0x0000AB9F0088F431 AS DateTime), 2, N'应用系统', 11, N'人事系统', 34, N'培训系统', N'培训系统无法访问', N'medium', NULL, N'solved', N'网站打不开', N'', N'', N'WinNT', N'', N'::1', N'是', N'张华', N'Chrome57.0', 22, N'张华', 0, 0, N'李丽', 19, CAST(0x0000AB1A008A67A2 AS DateTime), N'2', CAST(0x0000AB1A008A67A2 AS DateTime), N'1', N'李丽', CAST(0x0000AB1B0088F431 AS DateTime), 1, N'kx@127.0.0.1', N'', N'', N'张华', N'人事部', N'kx@127.0.0.1', N'14785685695', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (90, CAST(0x0000AB8100890616 AS DateTime), 2, N'应用系统', 10, N'财务系统', 32, N'金蝶账户相关', N'发票提交', N'medium', NULL, N'solved', N'', N'', N'', N'WinNT', N'', N'::1', N'是', N'张华', N'Chrome57.0', 22, N'张华', 0, 0, N'李丽', 19, CAST(0x0000AB1A008A67A2 AS DateTime), N'5', CAST(0x0000AB1A008A67A2 AS DateTime), N'1', N'李丽', CAST(0x0000AB1B00890616 AS DateTime), 1, N'kx@127.0.0.1', N'', N'', N'张华', N'环境部', N'kx@127.0.0.1', N'14785685695', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (91, CAST(0x0000AB39008922FB AS DateTime), 1, N'操作系统与标准软件', 8, N'办公Office', 28, N'Word', N'Word导出Pdf出错', N'medium', NULL, N'solved', N'无法导出', N'', N'', N'WinNT', N'', N'::1', N'是', N'张华', N'Chrome57.0', 22, N'张华', 0, 0, N'管理员', 1, CAST(0x0000AB1A00895EC2 AS DateTime), N'10', CAST(0x0000AB1A00895EC0 AS DateTime), N'1', N'管理员', CAST(0x0000AB1B008922FA AS DateTime), 1, N'kx@127.0.0.1', N'', N'', N'张华', N'人事部', N'kx@127.0.0.1', N'14785685695', NULL, 5, CAST(0x0000AB1A0089499C AS DateTime))
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (92, CAST(0x0000A566006A4EE0 AS DateTime), 3, N'硬件与外设', 14, N'扫描仪', 37, N'扫描仪', N'服务器更新', N'medium', NULL, N'solved', N'更新服务器', N'', N'', N'WinNT', N'', N'::1', N'是', N'李丽', N'Chrome57.0', 19, N'李丽', 0, 0, N'李丽', 19, CAST(0x0000AB1B006A647A AS DateTime), N'6', CAST(0x0000A566006A6479 AS DateTime), N'1', N'李丽', CAST(0x0000AB1C006A4EE0 AS DateTime), 1, N'spring@127.0.0.1', N'', N'', N'李丽', N'IT部门', N'spring@127.0.0.1', N'14852698565', NULL, 0, CAST(0x0000AB1B006A5A4A AS DateTime))
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (93, CAST(0x0000AB59006B5BA8 AS DateTime), 4, N'网络与设备故障', 16, N'网站相关', 39, N'网页打不开', N'电脑黑屏', N'medium', NULL, N'unsolved', N'无法开机', N'ZC003', N'X0RR50C0R5', N'WinNT', N'IT-03E', N'::1', N'是', N'joly', N'Chrome57.0', 17, N'joly', 0, 0, N'黄丽宇', NULL, CAST(0x0000AB1B006A647A AS DateTime), N'1', NULL, N'0', NULL, CAST(0x0000AB1C006B5BA8 AS DateTime), 1, N'', N'', N'', N'joly', N'人事部', N'2588@qq.com', N'1011144', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (94, CAST(0x0000ABB3006B7ED6 AS DateTime), 6, N'其他', 45, N'其他', 46, N'其他', N'网络无法访问', N'medium', NULL, N'unsolved', N'上网失败', N'ZC003', N'X0RR50C0R5', N'WinNT', N'IT-03E', N'::1', N'是', N'joly', N'Chrome57.0', 17, N'joly', 0, 0, N'李丽', NULL, CAST(0x0000AB3A006A647A AS DateTime), N'2', NULL, N'0', NULL, CAST(0x0000AB1C006B7ED7 AS DateTime), 1, N'', N'', N'', N'joly', N'人事部', N'2588@qq.com', N'111', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (95, CAST(0x0000AB76006BB3E2 AS DateTime), 2, N'应用系统', 11, N'人事系统', 33, N'HR账户', N'采购系统开通账户', N'medium', NULL, N'unsolved', N'如题', N'ZC003', N'X0RR50C0R5', N'WinNT', N'IT-03E', N'::1', N'是', N'joly', N'Chrome57.0', 17, N'joly', 0, 0, N'管理员', NULL, CAST(0x0000AB76006A647A AS DateTime), N'4', NULL, N'0', NULL, CAST(0x0000AB1C006BB3E2 AS DateTime), 1, N'', N'', N'', N'joly', N'人事部', N'2588@qq.com', N'1234444', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (96, CAST(0x0000AC0F006BEA82 AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows', N'[手机提交]开通服务器共享权限', N'medium', NULL, N'unsolved', N'对filesver访问', N'', N'', N'WinNT', N'', N'::1', N'是', N'', N'Chrome57.0', 17, N'joly', 0, 0, N'管理员', NULL, CAST(0x0000AB76006A647A AS DateTime), N'8', NULL, N'0', NULL, CAST(0x0000AB1C006BEA80 AS DateTime), 1, N'', N'', N'', N'joly', N'人事部', N'', N'', NULL, 0, NULL)
SET IDENTITY_INSERT [dbo].[helpdesk_lists] OFF
/****** Object:  Table [dbo].[helpdesk_kbcategory]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_kbcategory]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_kbcategory](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[parentid] [int] NULL CONSTRAINT [DF_portal_kbcategory_parentid]  DEFAULT ((0)),
	[orderid] [int] NULL CONSTRAINT [DF_portal_kbcategory_orderid]  DEFAULT ((0)),
	[depth] [int] NULL CONSTRAINT [DF_portal_kbcategory_depth]  DEFAULT ((1)),
	[note] [nvarchar](200) NULL,
	[path] [nvarchar](1000) NULL CONSTRAINT [DF_hr2_kbcsscategory_path]  DEFAULT (''),
	[types] [nvarchar](50) NULL,
 CONSTRAINT [PK_kb_category] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_kbcategory] ON
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (1, N'IT软件使用文档', 0, 0, 1, N'All Roles;', N'.1.', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (2, N'技巧分享', 0, 0, 1, N'All Roles;', N'.2.', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (3, N'Office相关', 1, 0, 1, N'All Roles;', N'.1.3.', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (4, N'金蝶软件手册', 1, 0, 1, N'All Roles;', N'.1.4.', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (5, N'Outlook技巧', 3, 0, 1, N'All Roles;', N'.1.3.5.', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (7, N'Word使用技巧', 3, 0, 1, N'All Roles;', N'.1.3.7.', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (8, N'Windows10使用技巧', 2, 0, 1, N'All Roles;', N'.2.8.', N'')
SET IDENTITY_INSERT [dbo].[helpdesk_kbcategory] OFF
/****** Object:  Table [dbo].[helpdesk_kbase]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_kbase]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_kbase](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](200) NULL,
	[contents] [nvarchar](max) NULL,
	[keyword] [nvarchar](50) NULL,
	[intro] [nvarchar](200) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_kbase_createdate]  DEFAULT (getdate()),
	[updatedate] [datetime] NULL CONSTRAINT [DF_helpdesk_kbase_updatedate]  DEFAULT (getdate()),
	[click] [int] NULL CONSTRAINT [DF_helpdesk_kbase_click]  DEFAULT ((0)),
	[good] [int] NULL CONSTRAINT [DF_helpdesk_kbase_good]  DEFAULT ((0)),
	[addby] [nvarchar](50) NULL,
	[updatetime] [int] NULL CONSTRAINT [DF_helpdesk_kbase_updatetime]  DEFAULT ((0)),
	[kcatid] [int] NULL,
	[uid] [int] NULL,
	[bad] [int] NULL CONSTRAINT [DF_helpdesk_kbase_bad]  DEFAULT ((0)),
 CONSTRAINT [PK_helpdesk_kbase] PRIMARY KEY CLUSTERED 
(
	[id] 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]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_kbase] ON
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (1, N'使用Office 2010截图、抠图实用技巧', N'<p>巧一：截取当前窗口 &nbsp; 我们知道，WindowsVista开始，系统已经内置一个名为&ldquo;抓图工具&rdquo;的组件，可以部分替换第三方的截屏工具，不过现在我们可以在 Office2010中直接完成截屏操作，可以说更为方便。 &nbsp; 切换到Word2010或Excel2010的&ldquo;Insert&rdquo;选项卡，我们可以在&ldquo;Illustrations&rdquo;功能组中发现一个名为 &ldquo;Screenshot&rdquo;的按钮，这里支持多种截屏模式，单击&ldquo;Screenshot&rdquo;按钮，我们可以在这里发现当前打开窗口的截屏画面，单击选定之后即可插入当前文档。 &nbsp; 如果选择&ldquo;ScreenClipping&rdquo;，返回桌面时可以发现鼠标光标已经变成一个细十字形，按下鼠标左键即可截取相应画面，松开鼠标可以返回文档窗口，刚才截取的画面会自动进入当前文档。 &nbsp; 如果是在PowerPoint2010的演示文稿窗口，切换到&ldquo;Insert&rdquo;选项卡，&ldquo;Screenshot&rdquo;按钮的位置转移到了 &ldquo;Images&rdquo;功能组中，我们同样可以在这里快速插入当前窗口的缩略图或截取窗口。 &nbsp; 技巧二：移除图片中的背景 &nbsp; 对于已插入Word文档的图片，我们可以很方便的去除图片中的背景，这样就不需要动用庞大的PhotoShop，更妙的是还可以添加或去除水印。 &nbsp; 选择图片，切换到&ldquo;PictureTools&rdquo;选项卡，可以在这里发现名为&ldquo;BackgroundRemoval&rdquo;的按钮，单击 &ldquo;BackgroundRemoval&rdquo;按钮，很快就可以把想要的图片抠出来，是不是很神奇? &nbsp; 技巧三：自定义用户界面 &nbsp; Office2010的用户界面可以根据我们的需要自行定义，操作也是相当的简单。单击左上角的Office按钮进入配置面板，选择 &ldquo;CustomRibbon&rdquo;，在这里可以对所有的标签页、按钮进行定制，例如可以调整各个选项卡的位置、删除选项卡，也可以将原本显示为英文的对象更改为中文，只要选定之后单击右下角的&ldquo;Rename&rdquo;按钮即可重命名，利用这一功能可以对用户界面进行&ldquo;汉化&rdquo;。 &nbsp; 切换到&ldquo;QuickAccessToolbar&rdquo;面板，我们可以在这里对快捷工具栏进行自定义，包括添加新的按钮，移去原有的按钮。更妙的是，通过窗口底部的&ldquo;Import/Export&rdquo;按钮，可以导入或导出自定义配置，这样就可以将他人提供的界面配置文件导入系统，省去不少麻烦事。</p>', N'Office2010,技巧', N'Office2010发布后，受到了不少用户的肯定，这里介绍几则比较实用的技巧： 技巧一：截取当前窗口我们知道，WindowsVista开始，系统已经内置一个名为“抓图工具”的组件，可以部分替换第三方的截屏工具，不过现在我们可以在 Office2010中直接完成截屏操作，可以说更为方便。切换到Word2010或Excel2010的“Insert”选项卡', CAST(0x0000A0FE00C32817 AS DateTime), CAST(0x0000A0FE00C32817 AS DateTime), 24, 1, N'管理员', 0, 3, 1, 0)
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (2, N'金蝶软件使用说明书', N'<p>单击此处下载</p>', N'说明书', N'金蝶软件使用说明书', CAST(0x0000A0FE00C35754 AS DateTime), CAST(0x0000A0FE00C35754 AS DateTime), 5, 0, N'管理员', 0, 4, 1, 0)
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (3, N'Outlook如何出入图片', N'<p>Outlook如何出入图片</p>', N'Outlook', N'Outlook如何出入图片', CAST(0x0000A0FE00C3BC43 AS DateTime), CAST(0x0000A0FE00C3BC43 AS DateTime), 11, 0, N'管理员', 0, 5, 1, 0)
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (5, N'三招去掉页眉那条横线', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>(1)在页眉中，在&ldquo;格式&rdquo;－&ldquo;边框和底纹&rdquo;中设置表格和边框为&ldquo;无&rdquo;，应用于&ldquo;段落&rdquo;<br /> (2)同上，只是把边框的颜色设置为白色（其实并没有删的，只是看起来没有了，呵呵）<br /> (3)在&ldquo;样式&rdquo;栏里把&ldquo;页眉&rdquo;换成&ldquo;正文&rdquo;就行了--强烈推荐！<br />会多出--(两个横杠) 这是用户不愿看到的,又要多出一步作删除--<br />解决方法：替换时在前引号前加上一个空格 问题就解决了</p>
</body>
</html>', N'Word 页眉', N'', CAST(0x0000A9420103D700 AS DateTime), CAST(0x0000A9420103D700 AS DateTime), 7, 0, N'管理员', 6, 8, 1, 0)
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (6, N'Outtlook用颜色「类别」做邮件情境分派', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>「类别」可以帮邮件加上特殊色彩的标签，让特殊情境的邮件有特殊颜色，并且在收件箱中改成用「类别排列」，就可以「收纳折叠」不同类别的邮件。</p>
</body>
</html>', N'', N'', CAST(0x0000A942011FB7BA AS DateTime), CAST(0x0000A942011FB7BA AS DateTime), 1, 0, N'管理员', 0, 5, 1, 0)
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (7, N'正确使用邮箱规则', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>相信这是大家平时用的最多的邮件整理方法，所以就简单介绍一下并举上一些栗子！</p>
<p>与邮件规则配套的是需要建立一些子文件夹，子文件夹不但可以帮助分类方便后期查找邮件，还能避免所有邮件都堆在收件箱这个问题。</p>
<p>根据产品设定，当收件箱的内容大于3.9GB时，会影响outlook下载新的邮件，也就是有可能会影响你接受新的邮件。1.1根据发件人域名来设置邮件规则将邮件分类。栗子1：条件：发件人的域名为abc.com时行为：将邮件放入abc的文件夹当中。这样这个公司的所有发件人的邮件都会进入到这个abc文件夹中，当你有很多客户时，这会是一个很好的分类方法。</p>
<p>&nbsp;</p>
<p>1.2 根据邮件的标题或者内容中的关键词将邮件归类。栗子2:条件：邮件的标题或者内容中含有&ldquo;雪糕&rdquo;两个字行为：将邮件移到命名为雪糕的文件夹当中。这个方法适合当您拥有很多客户时，不宜一个个客户都分类，但可以按照他们下单的产品或者对应的关键词来分类。＊这个方法不但可以帮忙分类邮件，还能对付一些直接进入你的收件箱的垃圾邮件。比如当你不停的收到&ldquo;邀请您来我们赌场&rdquo;之类的垃圾邮件时，你可以使用&ldquo;赌场&rdquo;作为关键词直接将这类邮件放入垃圾邮箱当中。</p>
<p>&nbsp;</p>
</body>
</html>', N'', N'', CAST(0x0000A94201200FC0 AS DateTime), CAST(0x0000A94201200FC0 AS DateTime), 7, 1, N'管理员', 0, 1, 1, 0)
SET IDENTITY_INSERT [dbo].[helpdesk_kbase] OFF
/****** Object:  Table [dbo].[helpdesk_iassign]    Script Date: 12/30/2020 14:33:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_iassign]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_iassign](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[tid] [int] NULL,
	[fromuid] [int] NULL,
	[fromusername] [nvarchar](50) NULL,
	[touid] [int] NULL,
	[tousername] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_iassign_createdate]  DEFAULT (getdate()),
	[notes] [nvarchar](50) NULL,
	[isread] [int] NULL CONSTRAINT [DF_helpdesk_iassign_isread]  DEFAULT ((1)),
 CONSTRAINT [PK_helpdesk_iassign] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_favourite]    Script Date: 12/30/2020 14:33:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_favourite]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_favourite](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NULL,
	[tid] [int] NULL,
	[fcreatedate] [datetime] NULL CONSTRAINT [DF_helpdesk_favourite_fcreatedate]  DEFAULT (getdate()),
	[priority] [nvarchar](50) NULL,
	[favtitle] [nvarchar](500) NULL,
	[subname] [nvarchar](500) NULL,
 CONSTRAINT [PK_helpdesk_favourite] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_enum]    Script Date: 12/30/2020 14:33:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_enum]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_enum](
	[id] [int] NOT NULL,
	[name] [nvarchar](50) NULL,
	[color] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
	[orders] [int] NULL,
	[sla] [int] NULL,
 CONSTRAINT [PK_helpdesk_enum] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (1, N'unsolved', N'red', N'status', 0, NULL)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (2, N'pending', N'orange', N'status', 1, NULL)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (3, N'solved', N'green', N'status', 2, NULL)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (6, N'low', N'gray', N'priority', 0, 72)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (7, N'medium', N'black', N'priority', 1, 24)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (8, N'high', N'#990000', N'priority', 2, 12)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (9, N'critical', N'red', N'priority', 3, 6)
/****** Object:  Table [dbo].[helpdesk_autoscancache]    Script Date: 12/30/2020 14:33:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_autoscancache]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_autoscancache](
	[id] [int] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_helpdesk_autoscancache] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_assigntome]    Script Date: 12/30/2020 14:33:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_assigntome]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_assigntome](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_assigntome_createdate]  DEFAULT (getdate()),
	[tid] [int] NULL,
	[fromuid] [int] NULL,
	[fromusername] [nvarchar](50) NULL,
	[touid] [int] NULL,
	[tousername] [nvarchar](50) NULL,
	[notes] [nvarchar](500) NULL,
	[isread] [int] NULL CONSTRAINT [DF_helpdesk_assigntome_isread]  DEFAULT ((0)),
 CONSTRAINT [PK_helpdesk_assigntome] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  UserDefinedFunction [dbo].[GetPcDetail]    Script Date: 12/30/2020 14:33:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetPcDetail]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
execute dbo.sp_executesql @statement = N'
CREATE  function   [dbo].[GetPcDetail](@id   int, @types nvarchar(50))   
    returns   nvarchar(3000)   
 as   
begin
declare @thelistname nvarchar(3000)
set @thelistname=''''
select @thelistname=@thelistname+listname+'' ; ''
from
( 
select  top 100   percent   pname+'':''+pvalue  as listname  from helpdesk_pc_details where pcid=@id and types=@types order by pname asc
) PD 

return @thelistname
end




' 
END
GO
/****** Object:  UserDefinedFunction [dbo].[GetdeptName]    Script Date: 12/30/2020 14:33:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetdeptName]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
execute dbo.sp_executesql @statement = N'CREATE FUNCTION [dbo].[GetdeptName]( @id int)
 
 
 RETURNS  nvarchar(50)
begin
declare @c nvarchar(50)
 select @c= catname from users_dept    where id=@id 
   RETURN @c
end

 

' 
END
GO
/****** Object:  StoredProcedure [dbo].[sp_ScanInstall]    Script Date: 12/30/2020 14:34:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_ScanInstall]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE proc [dbo].[sp_ScanInstall] 

(
    @pcname  nvarchar(100) ,
	@loginname  nvarchar(100) ,
	@ip  nvarchar(100) ,
	@mac  nvarchar(100) ,
	@bios_manufacturer  nvarchar(100) ,  
	@bios_serialnumber  nvarchar(100) ,
	@bios_smbiosbiosversion  nvarchar(100) , 
	@bios_version  nvarchar(100) ,
	@bios_caption  nvarchar(100) ,
	@board_caption  nvarchar(100) ,
	@board_manufacturer  nvarchar(100) ,
	@board_serialnumber  nvarchar(100) ,
	@board_tag  nvarchar(100) ,
	@board_product  nvarchar(100) ,
	@os_caption  nvarchar(100) ,
	@os_installdate  nvarchar(100) ,
	@os_lastbootuptime  nvarchar(100) ,
	@os_serialnumber  nvarchar(100) ,
	@os_totalvirtualmemorysize  nvarchar(100) ,
	@os_version  nvarchar(100) ,
	@os_windowsdirectory  nvarchar(100) , 
	@os_csdversion    nvarchar(100) ,
	@is64 nvarchar(50) ,
	@processor nvarchar(50),
	@processorcount nvarchar(20),
	@disks nvarchar(50)

)

as
if(not exists(select * from helpdesk_loginscan_hardware where pcname=@pcname) )
begin

insert into helpdesk_loginscan_hardware
(	 
	[pcname], 
	[loginname], 
	[ip]  ,
     [mac]  ,
	[bios_manufacturer],  
	[bios_serialnumber] , 
	[bios_smbiosbiosversion], 
	[bios_version] ,
	[bios_caption]  ,
	[board_caption]  ,
	[board_manufacturer], 
	[board_serialnumber] , 
	[board_tag] ,
	[board_product],  
	[os_caption]  ,
	[os_installdate],  
	[os_lastbootuptime], 
	[os_serialnumber]  ,
	os_totalvirtualmemorysize ,
	[os_version], 
	[os_windowsdirectory],  
	[createdate] ,
	[os_csdversion]  ,
	is64,
	processor,
	processorcount,
	disks
)
values
(

 
	@pcname,
	@loginname, 
	@ip,
    @mac,
	@bios_manufacturer,  
	@bios_serialnumber,
	@bios_smbiosbiosversion, 
	@bios_version,
	@bios_caption,
	@board_caption,
	@board_manufacturer, 
	@board_serialnumber,  
	@board_tag,
	@board_product,  
	@os_caption,
	@os_installdate,
	@os_lastbootuptime, 
	@os_serialnumber,  
	@os_totalvirtualmemorysize,
	@os_version,
	@os_windowsdirectory,  
    getdate(),
	@os_csdversion  ,
	@is64,
	@processor,
	@processorcount,
	@disks

)

end
else
begin
update helpdesk_loginscan_hardware
set loginname=@loginname,
ip=@ip,
mac=@mac,
bios_manufacturer=@bios_manufacturer,
bios_serialnumber=@bios_serialnumber,
bios_smbiosbiosversion=@bios_smbiosbiosversion,
bios_version=@bios_version,
bios_caption=@bios_caption,
board_manufacturer=@board_manufacturer,
board_serialnumber=@board_serialnumber,
board_tag=@board_tag,
board_product=@board_product,
os_caption=@os_caption,
os_installdate=@os_installdate,
os_lastbootuptime=@os_lastbootuptime,
os_serialnumber=@os_serialnumber,
os_totalvirtualmemorysize=@os_totalvirtualmemorysize,
os_version=@os_version,
os_windowsdirectory=@os_windowsdirectory,
os_csdversion=@os_csdversion,
createdate=getdate(),
is64=@is64,
processor=@processor,
processorcount=@processorcount,
disks=@disks
where pcname=@pcname
 
end

' 
END
GO
/****** Object:  StoredProcedure [dbo].[sp_kb_movecategory]    Script Date: 12/30/2020 14:34:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_kb_movecategory]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create    PROCEDURE  [dbo].[sp_kb_movecategory] 
(
    @ParentID int,--新父节点
    @CataID int,--要移动的节点编号
    @CataPath varchar(20) output,--新移动后的节点路径
    @orderid int,
    @note nvarchar(500),
    @types nvarchar(50),
    @catname nvarchar(50) 

)
AS

if (not exists(select 1 from helpdesk_kbcategory where ID = @ParentID))
    set @CataPath = '''' -- 如果新父节点不存在，则设置错误信息
else 
    begin

        declare @oldParentID int -- 原来的父节点
        select @oldParentID = ParentID from helpdesk_kbcategory where ID = @CataID
      


  if @oldParentID = @ParentID -- 没有移动，只更新内容即可
             begin
                update helpdesk_kbcategory set orderid=@orderid, note=@note,types=@types,catname=@catname  where id=@cataid
                select @CataPath = path from helpdesk_kbcategory where ID = @CataID
            end 
       
       else
			begin
	            
				declare @pathLength  int
				declare @path varchar(20)
				select @path = max(Path) from helpdesk_kbcategory  where parentID =@parentId --order by Path desc
				
            select @pathLength = len(@path) 
				 
			
   	declare @newpath varchar(20)-- 计算移动到新分类后的节点路径
				if @pathLength > 0 -- 已经存在该父类
						select @newpath = substring(@path,1,@pathLength -1)+CHAR(ASCII(REVERSE(@path))+1) 
				else
						select @newpath = path + ''A'' from helpdesk_kbcategory where ID = @parentID
	        
				if len(@newpath) > 0
					begin
						declare @oldPath varchar(20)-- 记录原来的节点路径
						select @oldPath = Path from helpdesk_kbcategory where ID = @CataID
						set @CataPath = @newpath;
						update helpdesk_kbcategory set orderid=@orderid,   ParentID = @ParentID,Path = @newpath, types=@types,catname=@catname,note=@note where ID = @CataID
						-- 替换子类的Path
						update helpdesk_kbcategory set Path = stuff(path,1,len(@oldPath),@CataPath) where Path like @oldPath+''%'' AND types=@types
					end
				else
					set @CataPath = ''''
			end
     end


' 
END
GO
/****** Object:  StoredProcedure [dbo].[sp_kb_insertcategory]    Script Date: 12/30/2020 14:34:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_kb_insertcategory]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
Create   PROCEDURE [dbo].[sp_kb_insertcategory] 
(
    @ParentID int, 
    @CatName varchar(20), 
    @Note nvarchar(200),
    @OrderId int,
    @Types nvarchar(50),
    @ID int output  
)
AS

if (@ParentID=0)
  begin
    insert into 
    helpdesk_kbcategory(catName,ParentID,Path,Note,OrderId,types) 
    values(@CatName,@ParentID,'''',@Note,@OrderId,@types)
    select @ID = scope_identity();
 end


else
    begin
        declare @pathLength  int --路径长度
        declare @path varchar(20) --该父节点下最后一个节点的路径
        select @path = max(Path) from helpdesk_kbcategory  where parentID = @parentId  
        select @pathLength = len(@path) 
        print @pathLength
        declare @newpath varchar(20)--新加节点的路径
        if @pathLength > 0 -- 该父类节点下已经存在有子类
                select @newpath = substring(@path,1,@pathLength -1)+CHAR(ASCII(REVERSE(@path))+1) 
        else
                select @newpath = path + ''A'' from helpdesk_kbcategory where ID = @parentID
        
        if len(@newpath) > 0
            begin
            insert into helpdesk_kbcategory(catName,ParentID,Path,note,OrderId,types) values(@CatName,@ParentID,@newpath,@Note,@OrderId,@types)
            select @ID = scope_identity();
            end
        else
            set @ID = -1
    end


 



' 
END
GO
/****** Object:  View [dbo].[v_status]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_status]'))
EXEC dbo.sp_executesql @statement = N'
create view [dbo].[v_status] as
select * from helpdesk_enum where types=''status''
'
GO
/****** Object:  View [dbo].[v_reportsdate]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_reportsdate]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_reportsdate]
as 
select   convert(char(10),createdate,21)  as Createdate ,    count(*) as count   
 from helpdesk_lists  group by  Createdate '
GO
/****** Object:  View [dbo].[v_reportmonth]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_reportmonth]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_reportmonth]
as
SELECT     CONVERT(char(7), createdate, 21)+''-1'' AS createdate, COUNT(*) AS count
FROM         dbo.helpdesk_lists
GROUP BY createdate'
GO
/****** Object:  View [dbo].[v_priority]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_priority]'))
EXEC dbo.sp_executesql @statement = N'
CREATE VIEW [dbo].[v_priority]
AS
SELECT     id, name, color, types, orders, sla
FROM         dbo.helpdesk_enum
WHERE     (types = ''priority'')

'
GO
/****** Object:  View [dbo].[v_pc]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_pc]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_pc]
AS
SELECT     id, pcname, assettag, spec, Serial, dept, enduser, usetype, usestatus, os, office, buydate, expiredate, storeplace, ip, prezver1, prezver2, note, addby, 
                      adduid, adddate, ispopup, mainboardserialno, mainboardmanufacture, display
FROM         dbo.helpdesk_pc
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_pc', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "helpdesk_pc"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 242
               Right = 269
            End
            DisplayFlags = 280
            TopColumn = 13
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_pc'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_pc', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_pc'
GO
/****** Object:  View [dbo].[v_cat2]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_cat2]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_cat2] as
select * from helphesk_categories where depth=2'
GO
/****** Object:  View [dbo].[v_cat1]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_cat1]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_cat1] as 
select * from helphesk_categories where depth=1'
GO
/****** Object:  View [dbo].[v_users]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_users]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_users]
AS
SELECT     dbo.users_users.uid, dbo.users_users.username, dbo.users_users.adpath, dbo.users_users.firstname, dbo.users_users.lastname, 
                      dbo.users_users.city, dbo.users_users.Office, dbo.users_users.Description, dbo.users_users.Tel, dbo.users_users.fax, dbo.users_users.email, 
                      dbo.users_users.MailType, dbo.users_users.Title, dbo.users_users.Department, dbo.users_users.Company, dbo.users_users.Password, 
                      dbo.users_users.displayname, dbo.users_users.StaffCode, dbo.users_users.IsAccountActive, dbo.users_users.createdate, dbo.users_users.lastlogin, 
                      dbo.users_users.sex, dbo.users_users.avtor, dbo.users_users.logintimes, dbo.users_users.ip, dbo.users_users.logintime, dbo.users_users.intro, 
                      dbo.users_users.ismgr, dbo.users_users.issec, dbo.users_users.isstaff, dbo.users_usersinroles.rolename
FROM         dbo.users_users LEFT OUTER JOIN
                      dbo.users_usersinroles ON dbo.users_users.uid = dbo.users_usersinroles.uid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_users', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "users_users"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 197
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "users_usersinroles"
            Begin Extent = 
               Top = 6
               Left = 235
               Bottom = 106
               Right = 366
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 9
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_users'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_users', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_users'
GO
/****** Object:  View [dbo].[v_topcat]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_topcat]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_topcat]
AS
SELECT     TOP (100) PERCENT id, catname, parentid, orderid, note, depth
FROM         dbo.helphesk_categories
WHERE     (depth = 1)
ORDER BY orderid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_topcat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "helphesk_categories"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 172
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_topcat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_topcat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_topcat'
GO
/****** Object:  View [dbo].[v_tickets]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_tickets]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_tickets]
AS
SELECT     dbo.helpdesk_lists.id, dbo.helpdesk_lists.createdate, dbo.helpdesk_lists.category1id, dbo.helpdesk_lists.category1name, dbo.helpdesk_lists.category2id, 
                      dbo.helpdesk_lists.category2name, dbo.helpdesk_lists.title, dbo.helpdesk_lists.priority, dbo.helpdesk_lists.method, dbo.helpdesk_lists.status, 
                      dbo.helpdesk_lists.contents, dbo.helpdesk_lists.assettag, dbo.helpdesk_lists.serial, dbo.helpdesk_lists.os, dbo.helpdesk_lists.pcname, dbo.helpdesk_lists.ip, 
                      dbo.helpdesk_lists.bit32, dbo.helpdesk_lists.Usercheck, dbo.helpdesk_lists.ie, dbo.helpdesk_lists.uid, dbo.helpdesk_lists.username, dbo.helpdesk_lists.islock, 
                      dbo.helpdesk_lists.ispublic, dbo.helpdesk_lists.handleby, dbo.helpdesk_lists.handleid, dbo.helpdesk_lists.handledate, dbo.helpdesk_lists.hour, 
                      dbo.helpdesk_lists.closedate, dbo.helpdesk_lists.isclose, dbo.helpdesk_lists.closeby, dbo.helpdesk_lists.sladate, dbo.helpdesk_lists.ispop, 
                      dbo.v_status.color AS statuscolor, dbo.v_priority.color AS priocolor, dbo.helpdesk_lists.email, dbo.helpdesk_lists.mainboardserialno, 
                      dbo.helpdesk_lists.mainboardmanufacturer, dbo.helpdesk_lists.contactname, dbo.helpdesk_lists.contactdept, dbo.helpdesk_lists.contactemail, 
                      dbo.helpdesk_lists.contacttel, dbo.helpdesk_lists.assignuid, dbo.helpdesk_lists.category3id, dbo.helpdesk_lists.category3name, dbo.helpdesk_lists.ispoint, 
                      dbo.helpdesk_lists.starttime
FROM         dbo.helpdesk_lists LEFT OUTER JOIN
                      dbo.v_status ON dbo.helpdesk_lists.status = dbo.v_status.name LEFT OUTER JOIN
                      dbo.v_priority ON dbo.helpdesk_lists.priority = dbo.v_priority.name
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_tickets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[61] 4[3] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "helpdesk_lists"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 298
               Right = 194
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "v_status"
            Begin Extent = 
               Top = 6
               Left = 232
               Bottom = 121
               Right = 363
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "v_priority"
            Begin Extent = 
               Top = 185
               Left = 397
               Bottom = 300
               Right = 528
            End
            DisplayFlags = 280
            TopColumn = 1
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 3555
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_tickets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_tickets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_tickets'
GO
/****** Object:  View [dbo].[v_subcat]    Script Date: 12/30/2020 14:34:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_subcat]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_subcat]
AS
SELECT     TOP (100) PERCENT dbo.v_cat2.id, dbo.v_cat2.catname, dbo.v_cat2.parentid, dbo.v_cat2.orderid, dbo.v_cat2.note, dbo.v_cat2.depth, 
                      dbo.v_cat1.catname AS parentname
FROM         dbo.v_cat2 LEFT OUTER JOIN
                      dbo.v_cat1 ON dbo.v_cat2.parentid = dbo.v_cat1.id
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_subcat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "v_cat2"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 172
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "v_cat1"
            Begin Extent = 
               Top = 6
               Left = 210
               Bottom = 121
               Right = 344
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_subcat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_subcat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_subcat'
GO
