create table wb_emp_dept
(
    DEPT_ID     decimal(3)   not null
        primary key,
    DEPT_NAME   varchar(100) not null,
    PARENT_DEPT decimal(3)   not null
);

create index WB_EMP_DEPT_PARENT_DEPT
    on wb_emp_dept (PARENT_DEPT);

INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (3, '检验检疫', 18);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (4, '申报', 18);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (5, '对单', 16);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (6, '海事核销', 17);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (7, '海事预报', 17);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (8, '国家局出证', 15);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (9, '递单', 15);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (12, '初审', 15);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (13, '补料', 16);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (15, 'CIQ许可证', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (16, '备单', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (17, '海事', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (18, '商检', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (19, '报关', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (20, '控货', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (21, '运输', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (22, '倒拆柜装船', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (23, '仓储', -1);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (24, '到货', 16);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (25, '单证备齐', 16);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (26, '换单', 16);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (27, '放货', 16);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (28, '商检查验', 3);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (29, '抽样', 3);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (30, '消毒', 3);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (31, '熏蒸', 3);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (32, '送样', 3);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (33, '出结果', 3);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (34, '出品质证', 3);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (35, '重量鉴定', 18);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (36, '拆箱', 35);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (37, '出重量证', 35);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (38, '调离', 18);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (39, '调运', 18);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (40, '放行使用及可销售货物', 18);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (41, '申报', 19);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (42, '关税缴纳', 19);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (43, '海关放行', 19);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (44, '码头办单', 20);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (45, '流向计划', 20);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (46, '派单', 20);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (47, '提货', 21);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (48, '车辆到达', 21);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (49, '车辆离开', 21);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (50, '还柜', 21);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (51, '回收还柜纸', 21);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (52, '驳船报到', 22);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (53, '装船', 22);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (54, '完货', 22);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (55, '反馈', 22);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (56, '入库', 23);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (57, '出库', 23);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (58, '提货工具报到', 57);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (59, '装货', 57);
INSERT INTO ag_devmysql.wb_emp_dept (DEPT_ID, DEPT_NAME, PARENT_DEPT) VALUES (60, '反馈', 57);
