Delete from LeftMenuInfo where id=100156;
/

Delete from LeftMenuConfig where infoid=100156;
/

CREATE TABLE JCL_ORG_CHARTVERSION (
   ID NUMBER NOT NULL,
   RECORDDATE NVARCHAR2(100) NULL,
   DESCRIPTION NVARCHAR2(255) NULL,
   CREATOR NUMBER NULL,
   DELETETYPE NUMBER NULL,
   CREATETIME NVARCHAR2(100) NULL,
   FCLASS NUMBER NULL,
   CONSTRAINT JCL_ORG_CHARTVERSION_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_ORG_CHARTVERSION_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_ORG_CHARTVERSION_ID_TIGGER BEFORE INSERT ON JCL_ORG_CHARTVERSION FOR EACH ROW
BEGIN
SELECT
    JCL_ORG_CHARTVERSION_ID.nextval INTO:new.ID
FROM
    dual;
END;
/

CREATE TABLE JCL_CHART_COMPANYVIRTUAL (
   ID NUMBER NOT NULL,
   COMPANYVIRTUALID NUMBER NULL,
   CREATER NVARCHAR2(50) NULL,
   COMPANYNAME NVARCHAR2(255) NULL,
   COMPANYCODE NVARCHAR2(255) NULL,
   COMPANYDESC NVARCHAR2(255) NULL,
   SHOWORDER NUMBER NULL,
   CANCELED NUMBER NULL,
   VIRTUALTYPE NVARCHAR2(255) NULL,
   VIRTUALTYPEDESC NVARCHAR2(1000) NULL,
   VERSIONID NUMBER NULL,
   VERSIONDATE NVARCHAR2(255) NULL,
   FONJOB NUMBER NULL,
   CONSTRAINT JCL_CHART_COMPANYVIRTUAL_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_CHART_COMPANYVIRTUAL_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_CHART_COMPVIRTUAL_TIGGER BEFORE INSERT ON JCL_CHART_COMPANYVIRTUAL FOR EACH ROW
BEGIN
SELECT
    JCL_CHART_COMPANYVIRTUAL_ID.nextval INTO:new.ID
FROM
    dual;
END;
/

CREATE TABLE JCL_CHART_DEPARTMENT (
   ID NUMBER NOT NULL,
   CREATER NVARCHAR2(50) NULL,
   DEPARTMENTID NUMBER NULL,
   DEPARTMENTMARK NVARCHAR2(100) NULL,
   DEPARTMENTNAME NVARCHAR2(255) NULL,
   SUBCOMPANYID NUMBER NULL,
   SUBCOMPANY NVARCHAR2(100) NULL,
   SUPDEPARTMENTID NUMBER NULL,
   SUPDEPARTMENT NVARCHAR2(100) NULL,
   CANCELED NUMBER NULL,
   DEPARTMENTCODE NVARCHAR2(255) NULL,
   COADJUTANT NVARCHAR2(100) NULL,
   TLEVEL NUMBER NULL,
   VERSIONID NUMBER NULL,
   VERSIONDATE NVARCHAR2(255) NULL,
   FONJOB NUMBER NULL,
   ISVIRTUAL NUMBER NULL,
   FLEADER NVARCHAR2(500) NULL,
   CONSTRAINT JCL_CHART_DEPARTMENT_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_CHART_DEPARTMENT_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_CHART_DEPARTMENT_ID_TIGGER BEFORE INSERT ON JCL_CHART_DEPARTMENT FOR EACH ROW
BEGIN
SELECT
    JCL_CHART_DEPARTMENT_ID.nextval INTO:new.ID
FROM
    dual;
END;
/

CREATE TABLE JCL_CHART_DEPARTMENTVIRTUAL (
   ID NUMBER NOT NULL,
   DEPARTMENTVIRTUALID INT NULL,
   CREATER NVARCHAR2(50) NULL,
   DEPARTMENTNAME NVARCHAR2(255) NULL,
   DEPARTMENTCODE NVARCHAR2(255) NULL,
   DEPARTMENTMARK NVARCHAR2(255) NULL,
   SUPDEPTMENT NVARCHAR2(100) NULL,
   SUPDEPID INT NULL,
   ALLSUPDEPID NVARCHAR2(1000) NULL,
   SUBCOMPANY NVARCHAR2(100) NULL,
   SUBCOMPANYID INT NULL,
   CANCELED INT NULL,
   VIRTUALTYPE NVARCHAR2(255) NULL,
   TLEVEL NVARCHAR2(255) NULL,
   SHOWORDER INT NULL,
   VERSIONID NUMBER NULL,
   VERSIONDATE NVARCHAR2(255) NULL,
   FONJOB INT NULL,
   CONSTRAINT JCL_CHART_DEPARTMENTVIRTUAL_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_CHART_DEPARTMENTVIRTUAL_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_CHART_DEPT_TIGGER BEFORE INSERT ON JCL_CHART_DEPARTMENTVIRTUAL FOR EACH ROW
BEGIN
SELECT
    JCL_CHART_DEPARTMENTVIRTUAL_ID.nextval INTO:new.ID
FROM
    dual;
END;
/

CREATE TABLE JCL_CHART_JOB (
   ID NUMBER NOT NULL,
   JOBID NUMBER NULL,
   CREATER NVARCHAR2(50) NULL,
   JOBNAME NVARCHAR2(100) NULL,
   DEPARTMENTID NUMBER NULL,
   DEPARTMENT NVARCHAR2(100) NULL,
   SUBCOMPANYID NUMBER NULL,
   SUBCOMPANY NVARCHAR2(100) NULL,
   JOBRESPONSIBILITY NVARCHAR2(1000) NULL,
   CANCELED NUMBER NULL,
   JOBCODE NVARCHAR2(255) NULL,
   DESCRIPTION NVARCHAR2(1000) NULL,
   VERSIONID NUMBER NULL,
   VERSIONDATE NVARCHAR2(255) NULL,
   FONJOB NUMBER NULL,
   CONSTRAINT JCL_CHART_JOB_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_CHART_JOB_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_CHART_JOB_ID_TIGGER BEFORE INSERT ON JCL_CHART_JOB FOR EACH ROW
BEGIN
SELECT
    JCL_CHART_JOB_ID.nextval INTO:new.ID
FROM
    dual;
END;
/

CREATE TABLE JCL_CHART_RESOURCE (
   ID NUMBER NOT NULL,
   RESOURCEID NUMBER NULL,
   LASTNAME NVARCHAR2(100) NULL,
   CREATER NVARCHAR2(50) NULL,
   WORKYEAR NUMBER NULL,
   COMPANYWORKYEAR NUMBER NULL,
   USEKIND NVARCHAR2(50) NULL,
   MANAGERSTR NVARCHAR2(500) NULL,
   STATUS NUMBER NULL,
   SEX CHAR(1) NULL ,
   ACCOUNTTYPE NUMBER NULL,
   BELONGTO NUMBER NULL,
   LOGINID NVARCHAR2(100) NULL,
   MARITALSTATUS NVARCHAR2(100) NULL,
   TELEPHONE NVARCHAR2(100) NULL,
   MOBILE NVARCHAR2(100) NULL,
   MOBILECALL NVARCHAR2(100) NULL,
   EMAIL NVARCHAR2(100) NULL,
   LOCATIONNAME NVARCHAR2(100) NULL,
   RESOURCETYPE NVARCHAR2(10) NULL,
   STARTDATE NVARCHAR2(100) NULL,
   ENDDATE NVARCHAR2(100) NULL,
   JOBTITLEID NUMBER NULL,
   JOBTITLE NVARCHAR2(100) NULL,
   JOBLEVEL NUMBER NULL,
   SECLEVEL NUMBER NULL,
   DEPARTMENTID NUMBER NULL,
   DEPARTMENT NVARCHAR2(100) NULL,
   SUBCOMPANYID NUMBER NULL,
   SUBCOMPANY NVARCHAR2(100) NULL,
   COSTCENTER NVARCHAR2(100) NULL,
   MANAGER NUMBER NULL,
   ASSISTANT NUMBER NULL,
   WORKCODE NVARCHAR2(100) NULL,
   CLASSIFICATION NVARCHAR2(10) NULL,
   VERSIONID NUMBER NULL,
   VERSIONDATE NVARCHAR2(255) NULL,
   POLICY NVARCHAR2(255) NULL,
   DEGREE NVARCHAR2(255) NULL,
   CONSTRAINT JCL_CHART_RESOURCE_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_CHART_RESOURCE_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_CHART_RESOURCE_ID_TIGGER BEFORE INSERT ON JCL_CHART_RESOURCE FOR EACH ROW
BEGIN
SELECT
    JCL_CHART_RESOURCE_ID.nextval INTO:new.ID
FROM
    dual;
END;
/

CREATE TABLE JCL_CHART_RESOURCEVIRTUAL (
   ID NUMBER NOT NULL,
   RESOURCEID NUMBER NULL,
   MANAGERID NUMBER NULL,
   SUBCOMPANYID NUMBER NULL,
   DEPARTMENTID NUMBER NULL,
   MANAGERSTR NVARCHAR2(1000) NULL,
   VIRTUALTYPE NUMBER NULL,
   VERSIONID NUMBER NULL,
   VERSIONDATE NVARCHAR2(255) NULL,
   CONSTRAINT JCL_CHART_RESOURCEVIRTUAL_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_CHART_RESOURCEVIRTUAL_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_CHART_RES_ID_TIGGER BEFORE INSERT ON JCL_CHART_RESOURCEVIRTUAL FOR EACH ROW
BEGIN
SELECT
    JCL_CHART_RESOURCEVIRTUAL_ID.nextval INTO:new.ID
FROM
    dual;
END;
/

CREATE TABLE JCL_CHART_SUBCOMPANY (
   ID NUMBER NOT NULL,
   CREATER NVARCHAR2(50) NULL,
   SUBCOMPANYID NUMBER NULL,
   SUBCOMPANYNAME NVARCHAR2(100) NULL,
   SUBCOMPANYDESC NVARCHAR2(255) NULL,
   COMPANY NVARCHAR2(100) NULL,
   SUPSUBCOMPANYID NUMBER NULL,
   SUPSUBCOMPANY NVARCHAR2(100) NULL,
   CANCELED NUMBER NULL,
   SUBCOMPANYCODE NVARCHAR2(255) NULL,
   LIMITUSERS NUMBER NULL,
   TLEVEL NUMBER NULL,
   VERSIONID NUMBER NULL,
   VERSIONDATE NVARCHAR2(255) NULL,
   FONJOB NUMBER NULL,
   ISVIRTUAL NUMBER NULL,
   CONSTRAINT JCL_CHART_SUBCOMPANY_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_CHART_SUBCOMPANY_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_CHART_SUBCOMPANY_ID_TIGGER BEFORE INSERT ON JCL_CHART_SUBCOMPANY FOR EACH ROW
BEGIN
SELECT
    JCL_CHART_SUBCOMPANY_ID.nextval INTO:new.ID
FROM
    dual;
END;
/

CREATE TABLE JCL_CHART_SUBCOMPANYVIRTUAL (
   ID NUMBER NOT NULL,
   SUBCOMPANYVIRTUALID NUMBER NULL,
   CREATER NVARCHAR2(50) NULL,
   SUBCOMPANYNAME NVARCHAR2(100) NULL,
   SUBCOMPANYCODE NVARCHAR2(255) NULL,
   SUBCOMPANYDESC NVARCHAR2(255) NULL,
   SUPSUBCOMPANY NVARCHAR2(100) NULL,
   SUPSUBCOMPANYID NUMBER NULL,
   COMPANY NVARCHAR2(100) NULL,
   COMPANYID NUMBER NULL,
   CANCELED NUMBER NULL,
   VIRTUALTYPE NVARCHAR2(255) NULL,
   TLEVEL NVARCHAR2(255) NULL,
   SHOWORDER NUMBER NULL,
   VERSIONID NUMBER NULL,
   VERSIONDATE NVARCHAR2(255) NULL,
   FONJOB NUMBER NULL,
   CONSTRAINT JCL_CHART_SUBCOMPANYVIRTUAL_PK PRIMARY KEY (ID)
);
/

CREATE SEQUENCE JCL_CHART_SUBCOMPANYVIRTUAL_ID INCREMENT BY 1 START WITH 1 nomaxvalue minvalue 1 NOCYCLE;
/

CREATE
OR REPLACE TRIGGER JCL_CHART_SUBCOMP_TIGGER BEFORE INSERT ON JCL_CHART_SUBCOMPANYVIRTUAL FOR EACH ROW
BEGIN
SELECT
    JCL_CHART_SUBCOMPANYVIRTUAL_ID.nextval INTO:new.ID
FROM
    dual;
END;
/