Delete from LeftMenuInfo where id=100156;

Delete from LeftMenuConfig where infoid=100156;


CREATE TABLE JCL_ORG_CHARTVERSION  (
  ID int(11) NOT NULL AUTO_INCREMENT,
  RECORDDATE varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DESCRIPTION varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  CREATOR int(11) NULL DEFAULT NULL,
  DELETETYPE int(11) NULL DEFAULT NULL,
  CREATETIME varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  FCLASS int(11) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

CREATE TABLE JCL_CHART_COMPANYVIRTUAL  (
  ID int(11) NOT NULL AUTO_INCREMENT,
  COMPANYVIRTUALID int(11) NULL DEFAULT NULL,
  CREATER varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  COMPANYNAME varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  COMPANYCODE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  COMPANYDESC varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SHOWORDER int(11) NULL DEFAULT NULL,
  CANCELED int(11) NULL DEFAULT NULL,
  VIRTUALTYPE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  VIRTUALTYPEDESC varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  VERSIONID int(11) NULL DEFAULT NULL,
  VERSIONDATE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  FONJOB int(11) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

CREATE TABLE JCL_CHART_DEPARTMENT  (
  ID int(11) NOT NULL AUTO_INCREMENT,
  CREATER varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DEPARTMENTID int(11) NULL DEFAULT NULL,
  DEPARTMENTMARK varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DEPARTMENTNAME varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYID int(11) NULL DEFAULT NULL,
  SUBCOMPANY varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUPDEPARTMENTID int(11) NULL DEFAULT NULL,
  SUPDEPARTMENT varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  CANCELED int(11) NULL DEFAULT NULL,
  DEPARTMENTCODE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  COADJUTANT varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  TLEVEL int(11) NULL DEFAULT NULL,
  VERSIONID int(11) NULL DEFAULT NULL,
  VERSIONDATE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  FONJOB int(11) NULL DEFAULT NULL,
  ISVIRTUAL int(11) NULL DEFAULT NULL,
  FLEADER varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

CREATE TABLE JCL_CHART_DEPARTMENTVIRTUAL  (
  ID int(11) NOT NULL AUTO_INCREMENT,
  DEPARTMENTVIRTUALID int(11) NULL DEFAULT NULL,
  CREATER varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DEPARTMENTNAME varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DEPARTMENTCODE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DEPARTMENTMARK varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUPDEPTMENT varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUPDEPID int(11) NULL DEFAULT NULL,
  ALLSUPDEPID varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANY varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYID int(11) NULL DEFAULT NULL,
  CANCELED int(11) NULL DEFAULT NULL,
  VIRTUALTYPE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  TLEVEL varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SHOWORDER int(11) NULL DEFAULT NULL,
  VERSIONID int(11) NULL DEFAULT NULL,
  VERSIONDATE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  FONJOB int(11) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

create table JCL_CHART_JOB (
  ID int(11) NOT NULL AUTO_INCREMENT,
  JOBID int(11) NULL DEFAULT NULL,
  CREATER varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  JOBNAME varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DEPARTMENTID int(11) NULL DEFAULT NULL,
  DEPARTMENT varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYID int(11) NULL DEFAULT NULL,
  SUBCOMPANY varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  JOBRESPONSIBILITY varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  CANCELED int(11) NULL DEFAULT NULL,
  JOBCODE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DESCRIPTION varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  VERSIONID int(11) NULL DEFAULT NULL,
  VERSIONDATE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  FONJOB int(11) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

create table JCL_CHART_RESOURCE (
  ID int(11) NOT NULL AUTO_INCREMENT,
  RESOURCEID int(11) NULL DEFAULT NULL,
  LASTNAME varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  CREATER varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  WORKYEAR int(11) NULL DEFAULT NULL,
  COMPANYWORKYEAR int(11) NULL DEFAULT NULL,
  USEKIND varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  MANAGERSTR varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  STATUS int(11) NULL DEFAULT NULL,
  SEX char(1) NULL DEFAULT NULL,
  ACCOUNTTYPE int(11) NULL DEFAULT NULL,
  BELONGTO int(11) NULL DEFAULT NULL,
  LOGINID varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  MARITALSTATUS varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  TELEPHONE varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  MOBILE varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  MOBILECALL varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  EMAIL varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  LOCATIONNAME varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  RESOURCETYPE varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  STARTDATE varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  ENDDATE varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  JOBTITLEID int(11) NULL DEFAULT NULL,
  JOBTITLE varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  JOBLEVEL int(11) NULL DEFAULT NULL,
  SECLEVEL int(11) NULL DEFAULT NULL,
  DEPARTMENTID int(11) NULL DEFAULT NULL,
  DEPARTMENT varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYID int(11) NULL DEFAULT NULL,
  SUBCOMPANY varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  COSTCENTER varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  MANAGER int(11) NULL DEFAULT NULL,
  ASSISTANT int(11) NULL DEFAULT NULL,
  WORKCODE varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  CLASSIFICATION varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  VERSIONID int(11) NULL DEFAULT NULL,
  VERSIONDATE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  POLICY varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  DEGREE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

create table JCL_CHART_RESOURCEVIRTUAL (
  ID int(11) NOT NULL AUTO_INCREMENT,
  RESOURCEID int(11) NULL DEFAULT NULL,
  MANAGERID int(11) NULL DEFAULT NULL,
  SUBCOMPANYID int(11) NULL DEFAULT NULL,
  DEPARTMENTID int(11) NULL DEFAULT NULL,
  MANAGERSTR varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  VIRTUALTYPE int(11) NULL DEFAULT NULL,
  VERSIONID int(11) NULL DEFAULT NULL,
  VERSIONDATE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

create table JCL_CHART_SUBCOMPANY (
  ID int(11) NOT NULL AUTO_INCREMENT,
  CREATER varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYID int(11) NULL DEFAULT NULL,
  SUBCOMPANYNAME varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYDESC varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  COMPANY varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUPSUBCOMPANYID int(11) NULL DEFAULT NULL,
  SUPSUBCOMPANY varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  CANCELED int(11) NULL DEFAULT NULL,
  SUBCOMPANYCODE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  LIMITUSERS int(11) NULL DEFAULT NULL,
  TLEVEL int(11) NULL DEFAULT NULL,
  VERSIONID int(11) NULL DEFAULT NULL,
  VERSIONDATE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  FONJOB int(11) NULL DEFAULT NULL,
  ISVIRTUAL int(11) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

create table JCL_CHART_SUBCOMPANYVIRTUAL (
  ID int(11) NOT NULL AUTO_INCREMENT,
  SUBCOMPANYVIRTUALID int(11) NULL DEFAULT NULL,
  CREATER varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYNAME varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYCODE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUBCOMPANYDESC varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUPSUBCOMPANY varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SUPSUBCOMPANYID int(11) NULL DEFAULT NULL,
  COMPANY varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  COMPANYID int(11) NULL DEFAULT NULL,
  CANCELED int(11) NULL DEFAULT NULL,
  VIRTUALTYPE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  TLEVEL varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  SHOWORDER int(11) NULL DEFAULT NULL,
  VERSIONID int(11) NULL DEFAULT NULL,
  VERSIONDATE varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  FONJOB int(11) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

ALTER TABLE jcl_chart_subcompany ADD job_num int;

ALTER TABLE jcl_chart_subcompany ADD staff_num int;

ALTER TABLE jcl_chart_department ADD job_num int;

ALTER TABLE jcl_chart_department ADD staff_num int;