Delete from LeftMenuInfo where id=100156
GO
Delete from LeftMenuConfig where infoid=100156
GO

CREATE TABLE [JCL_ORG_CHARTVERSION] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [RECORDDATE] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [DESCRIPTION] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [CREATOR] int  NULL,
  [DELETETYPE] int  NULL,
  [CREATETIME] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [FCLASS] int  NULL
)
GO

ALTER TABLE [JCL_ORG_CHARTVERSION] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_ORG_CHARTVERSION] ADD CONSTRAINT [JCL_ORG_CHARTVERSION_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO

CREATE TABLE [JCL_CHART_COMPANYVIRTUAL] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [COMPANYVIRTUALID] int NULL,
  [CREATER] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [COMPANYNAME] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [COMPANYCODE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [COMPANYDESC] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SHOWORDER] int NULL,
  [CANCELED] int NULL,
  [VIRTUALTYPE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [VIRTUALTYPEDESC] varchar(1000) COLLATE Chinese_PRC_CI_AS  NULL,
  [VERSIONID] int NULL,
  [VERSIONDATE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FONJOB] int NULL
)
GO

ALTER TABLE [JCL_CHART_COMPANYVIRTUAL] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_CHART_COMPANYVIRTUAL] ADD CONSTRAINT [JCL_CHART_COMPANYVIRTUAL_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO


CREATE TABLE [JCL_CHART_DEPARTMENT] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [CREATER] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [DEPARTMENTID] int NULL DEFAULT NULL,
  [DEPARTMENTMARK] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [DEPARTMENTNAME] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYID] int NULL DEFAULT NULL,
  [SUBCOMPANY] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUPDEPARTMENTID] int NULL DEFAULT NULL,
  [SUPDEPARTMENT] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [CANCELED] int NULL DEFAULT NULL,
  [DEPARTMENTCODE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [COADJUTANT] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [TLEVEL] int NULL DEFAULT NULL,
  [VERSIONID] int NULL,
  [VERSIONDATE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FONJOB] int NULL DEFAULT NULL,
  [ISVIRTUAL] int NULL DEFAULT NULL,
  [FLEADER] varchar(500) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [JCL_CHART_DEPARTMENT] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_CHART_DEPARTMENT] ADD CONSTRAINT [JCL_CHART_DEPARTMENT_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO

CREATE TABLE [JCL_CHART_DEPARTMENTVIRTUAL] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [DEPARTMENTVIRTUALID] int NULL DEFAULT NULL,
  [CREATER] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [DEPARTMENTNAME] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DEPARTMENTCODE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DEPARTMENTMARK] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUPDEPTMENT] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUPDEPID] int NULL DEFAULT NULL,
  [ALLSUPDEPID] varchar(1000) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANY] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYID] int NULL DEFAULT NULL,
  [CANCELED] int NULL DEFAULT NULL,
  [VIRTUALTYPE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TLEVEL] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SHOWORDER] int NULL DEFAULT NULL,
  [VERSIONID] int NULL,
  [VERSIONDATE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FONJOB] int NULL DEFAULT NULL
)
GO

ALTER TABLE [JCL_CHART_DEPARTMENTVIRTUAL] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_CHART_DEPARTMENTVIRTUAL] ADD CONSTRAINT [JCL_CHART_DEPARTMENTVIRTUAL_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO

CREATE TABLE [JCL_CHART_JOB] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [JOBID] int NULL DEFAULT NULL,
  [CREATER] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [JOBNAME] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [DEPARTMENTID] int NULL DEFAULT NULL,
  [DEPARTMENT] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYID] int NULL DEFAULT NULL,
  [SUBCOMPANY] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [JOBRESPONSIBILITY] varchar(1000) COLLATE Chinese_PRC_CI_AS  NULL,
  [CANCELED] int NULL DEFAULT NULL,
  [JOBCODE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DESCRIPTION] varchar(1000) COLLATE Chinese_PRC_CI_AS  NULL,
  [VERSIONID] int NULL,
  [VERSIONDATE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FONJOB] int NULL DEFAULT NULL
)
GO

ALTER TABLE [JCL_CHART_JOB] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_CHART_JOB] ADD CONSTRAINT [JCL_CHART_JOB_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO

CREATE TABLE [JCL_CHART_RESOURCE] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [RESOURCEID] int NULL DEFAULT NULL,
  [LASTNAME] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [CREATER] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [WORKYEAR] varchar(50) NULL DEFAULT NULL,
  [COMPANYWORKYEAR] varchar(50) NULL DEFAULT NULL,
  [USEKIND] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [MANAGERSTR] varchar(500) COLLATE Chinese_PRC_CI_AS  NULL,
  [STATUS] int NULL DEFAULT NULL,
  [SEX] char(1) NULL DEFAULT NULL,
  [ACCOUNTTYPE] int NULL DEFAULT NULL,
  [BELONGTO] int NULL DEFAULT NULL,
  [LOGINID] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [MARITALSTATUS] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [TELEPHONE] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [MOBILE] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [MOBILECALL] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [EMAIL] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [LOCATIONNAME] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [RESOURCETYPE] varchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [STARTDATE] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [ENDDATE] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [JOBTITLEID] int NULL DEFAULT NULL,
  [JOBTITLE] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [JOBLEVEL] int NULL DEFAULT NULL,
  [SECLEVEL] int NULL DEFAULT NULL,
  [DEPARTMENTID] int NULL DEFAULT NULL,
  [DEPARTMENT] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYID] int NULL DEFAULT NULL,
  [SUBCOMPANY] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [COSTCENTER] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [MANAGER] int NULL DEFAULT NULL,
  [ASSISTANT] int NULL DEFAULT NULL,
  [WORKCODE] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [CLASSIFICATION] varchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [VERSIONID] int NULL,
  [VERSIONDATE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [POLICY] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DEGREE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [JCL_CHART_RESOURCE] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_CHART_RESOURCE] ADD CONSTRAINT [JCL_CHART_RESOURCE_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO

CREATE TABLE [JCL_CHART_RESOURCEVIRTUAL] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [RESOURCEID] int NULL DEFAULT NULL,
  [MANAGERID] int NULL DEFAULT NULL,
  [SUBCOMPANYID] int NULL DEFAULT NULL,
  [DEPARTMENTID] int NULL DEFAULT NULL,
  [MANAGERSTR] varchar(1000) COLLATE Chinese_PRC_CI_AS  NULL,
  [VIRTUALTYPE] int NULL DEFAULT NULL,
  [VERSIONID] int NULL,
  [VERSIONDATE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [JCL_CHART_RESOURCEVIRTUAL] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_CHART_RESOURCEVIRTUAL] ADD CONSTRAINT [JCL_CHART_RESOURCEVIRTUAL_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO

CREATE TABLE [JCL_CHART_SUBCOMPANY] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [CREATER] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYID] int NULL DEFAULT NULL,
  [SUBCOMPANYNAME] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYDESC] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [COMPANY] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUPSUBCOMPANYID] int NULL DEFAULT NULL,
  [SUPSUBCOMPANY] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [CANCELED] int NULL DEFAULT NULL,
  [SUBCOMPANYCODE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [LIMITUSERS] int NULL DEFAULT NULL,
  [TLEVEL] int NULL DEFAULT NULL,
  [VERSIONID] int NULL,
  [VERSIONDATE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FONJOB] int NULL DEFAULT NULL,
  [ISVIRTUAL] int NULL DEFAULT NULL
)
GO

ALTER TABLE [JCL_CHART_SUBCOMPANY] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_CHART_SUBCOMPANY] ADD CONSTRAINT [JCL_CHART_SUBCOMPANY_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO

CREATE TABLE [JCL_CHART_SUBCOMPANYVIRTUAL] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [SUBCOMPANYVIRTUALID] int NULL DEFAULT NULL,
  [CREATER] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYNAME] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYCODE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUBCOMPANYDESC] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUPSUBCOMPANY] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [SUPSUBCOMPANYID] int NULL DEFAULT NULL,
  [COMPANY] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [COMPANYID] int NULL DEFAULT NULL,
  [CANCELED] int NULL DEFAULT NULL,
  [VIRTUALTYPE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TLEVEL] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SHOWORDER] int NULL DEFAULT NULL,
  [VERSIONID] int NULL,
  [VERSIONDATE] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FONJOB] int NULL DEFAULT NULL
)
GO

ALTER TABLE [JCL_CHART_SUBCOMPANYVIRTUAL] SET (LOCK_ESCALATION = TABLE)
GO

ALTER TABLE [JCL_CHART_SUBCOMPANYVIRTUAL] ADD CONSTRAINT [JCL_CHART_SUBCOMPANYVIRTUAL_PK] PRIMARY KEY CLUSTERED ([id])
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  ON [PRIMARY]
GO