CREATE TABLE [JCL_ORG_ONJOB] (
  [ID] int  IDENTITY(1,1) NOT NULL,
  [DATA_ID] int NULL,
  [SUPER_ID] int NULL,
  [TYPE] int NULL,
  [ON_JOB_NUM] int NULL,
  [STAFF_NUM] int NULL,
  [CREATOR] int NULL,
  [DIMENSION] int NULL,
  [CREATE_TIME] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
  [UPDATE_TIME] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
)
GO
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,GETDATE(),GETDATE() from hrmsubcompany
GO

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,GETDATE(),GETDATE() from hrmdepartment
GO