CREATE TABLE JCL_ORG_ONJOB  (
  ID int(11) NOT NULL AUTO_INCREMENT,
  DATA_ID int(11) NULL DEFAULT NULL,
  SUPER_ID int(11) NULL DEFAULT NULL,
  TYPE int(11) NULL DEFAULT NULL,
  ON_JOB_NUM int(11) NULL DEFAULT NULL,
  STAFF_NUM int(11) NULL DEFAULT NULL,
  DIMENSION int(11) NULL DEFAULT NULL,
  CREATOR int(11) NULL DEFAULT NULL,
  CREATE_TIME varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  UPDATE_TIME varchar(100) 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;

INSERT INTO JCL_ORG_ONJOB(DATA_ID,SUPER_ID,TYPE,ON_JOB_NUM,STAFF_NUM,CREATOR,CREATE_TIME,UPDATE_TIME)
SELECT id,supsubcomid,1,0,0,1,NOW(),NOW() from hrmsubcompany;


INSERT INTO JCL_ORG_ONJOB(DATA_ID,SUPER_ID,TYPE,ON_JOB_NUM,STAFF_NUM,CREATOR,CREATE_TIME,UPDATE_TIME)
SELECT id,supdepid,2,0,0,1,NOW(),NOW() from hrmdepartment;


