drop table if exists biz_fault_physical_model;
create table biz_fault_physical_model
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                     comment '故障模型名称',
  type     varchar(64)                     comment '故障模型类型',
  path     varchar(255)                          comment '故障模型接口地址',
  biz_params        TEXT                          comment '故障模型参数参数',
  remark        varchar(500)    default null               comment '备注',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '故障物理模型管理表';

drop table if exists biz_fault_diagnosis_model;
create table biz_fault_diagnosis_model
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                      comment '故障模型名称',
  type     varchar(64)                    comment '故障模型类型',
  path     varchar(255)                       comment '故障模型接口地址',
  biz_params        TEXT                           comment '故障模型参数参数',
  remark        varchar(500)    default null               comment '备注',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '故障诊断算法模型管理表';

drop table if exists biz_evaluation_indicator;
create table biz_evaluation_indicator
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '评估体系名称',
  biz_params TEXT comment '评估体系参数',
  remark        varchar(500)    default null               comment '说明',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '评估指标体系管理表';

drop table if exists biz_formulas;
create table biz_formulas
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '公式名称',
  formulas     TEXT                     comment '公式',
  remark        varchar(500)    default null               comment '说明',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '公式管理管理表';

drop table if exists biz_phy_model_data_gen;
create table biz_phy_model_data_gen
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '数据生成名称',
  model_id bigint(20)  comment '数据生成模型',
  biz_params TEXT comment '参数',
  data_id bigint(20) comment '数据id',
  status varchar(64)  comment '状态',
  start_time   datetime                                   comment '开始时间',
  end_time   datetime                                   comment '结束时间',
  remark        varchar(500)    default null               comment '说明',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '物理模型数据生成管理表';

drop table if exists biz_phy_noise_data_gen;
create table biz_phy_noise_data_gen
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '数据生成名称',
  model_id bigint(20)  comment '数据生成模型',
  biz_params TEXT comment '参数',
  original_data_id bigint(20) comment '原始数据id',
  generated_data_id bigint(20) comment '生成后数据id',
  status varchar(64)  comment '状态',
  start_time   datetime                                   comment '开始时间',
  end_time   datetime                                   comment '结束时间',
  remark        varchar(500)    default null               comment '说明',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '噪声数据生成管理表';

drop table if exists biz_test_data_gen;
create table biz_test_data_gen
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '数据生成名称',
  model_id bigint(20)  comment '数据生成模型',
  biz_params TEXT comment '参数',
  original_data_ids varchar(255) comment '原始数据ids',
  generated_data_id bigint(20) comment '生成后数据id',
  status varchar(64)  comment '状态',
  start_time   datetime                                   comment '开始时间',
  end_time   datetime                                   comment '结束时间',
  remark        varchar(500)    default null               comment '说明',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '测试数据生成管理表';

drop table if exists biz_data;
create table biz_data
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '数据名称',
  type varchar(64)                   comment '数据类型（0物理模型数据，1实际数据，2噪声数据，3训练/验证数据）',
  file_path varchar(255)  comment '文件路径',
  remark        varchar(500)    default null               comment '说明',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '数据管理表';


drop table if exists biz_fd_algorithm;
create table biz_fd_algorithm
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '故障诊断名称',
  model_id varchar(255)  comment '模型id',
  data_id bigint(20) comment '数据id',
  truth_labels varchar(255)  comment '实际标签',
  test_labels varchar(255)  comment '测试标签',
  remark        varchar(500)    default null               comment '说明',
  start_time   datetime                                   comment '开始时间',
  end_time   datetime                                   comment '结束时间',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '故障诊断算法功能验证表';

drop table if exists biz_performance_evaluation;
create table biz_performance_evaluation
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '性能评估名称',
  type varchar(64)                   comment '类型',
  valuation_indicator_id bigint(20)  comment '评估id',
  fd_algorithm_id bigint(20)  comment '故障诊断算法id',
  data_id varchar(1000)  comment '数据id',
  biz_params TEXT  comment '参数',
  result_file_path varchar(255)  comment '文件结果',
  result_text Text  comment '文本结果',
  remark        varchar(500)    default null               comment '说明',
  start_time   datetime                                   comment '开始时间',
  end_time   datetime                                   comment '结束时间',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '算法性能评估表';

drop table if exists biz_performance_evaluation;
create table biz_performance_evaluation
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '性能评估名称',
  type varchar(64)                   comment '类型',
  loop_count bigint(20) comment '循环次数',
  fd_algorithm_id bigint(20)  comment '故障诊断算法id',
  truth_labels varchar(255)  comment '实际标签',
  phy_model_id bigint(20)  comment '物理生成模型',
  phy_params TEXT  comment '物理模型参数',
  phy_data_ids varchar(1000)  comment '物理数据',
  nose_model_id bigint(20)  comment '噪声生成模型',
  nose_params TEXT  comment '噪声模型参数',
  nose_data_ids varchar(1000)  comment '噪声数据',
  test_model_id bigint(20)  comment '测试生成模型',
  test_params TEXT  comment '测试模型参数',
  test_data_ids varchar(1000)  comment '测试数据',
  result_image_path varchar(255)  comment '图片结果',
  result_file_path varchar(255)  comment '文件结果',
  result_text Text  comment '文本结果',
  remark        varchar(500)    default null               comment '说明',
  start_time   datetime                                   comment '开始时间',
  end_time   datetime                                   comment '结束时间',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '算法性能评估表';

drop table if exists biz_workflow;
create table biz_workflow
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '任务名称',
  status varchar(64)                   comment '任务状态',
  remark        varchar(500)    default null               comment '说明',
  start_time   datetime                                   comment '开始时间',
  end_time   datetime                                   comment '结束时间',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '流程任务表';

drop table if exists biz_workflow_node;
create table biz_workflow_node
(
  id       bigint(20)      not null auto_increment    comment '序号',
  name     varchar(64)                   comment '数据名称',
  type varchar(64)                   comment '类型',
  sub_type varchar(64)                   comment '子类型',
  task_id bigint(20) comment '任务id',
  remark        varchar(500)    default null               comment '说明',
  start_time   datetime                                   comment '开始时间',
  end_time   datetime                                   comment '结束时间',
  create_by     varchar(64)     default ''                 comment '创建者',
  create_time   datetime                                   comment '创建时间',
  update_by     varchar(64)     default ''			       comment '更新者',
  update_time   datetime                                   comment '更新时间',
  primary key (id)
) engine=innodb comment = '流程节点表';

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('数据管理', '2003', '1', 'data', 'data/data/index', 1, 0, 'C', '0', '0', 'data:data:list', '#', 'admin', sysdate(), '', null, '数据管理菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('数据管理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'data:data:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('数据管理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'data:data:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('数据管理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'data:data:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('数据管理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'data:data:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('数据管理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'data:data:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法功能验证', '2004', '1', 'ddAlgorithm', 'test/ddAlgorithm/index', 1, 0, 'C', '0', '0', 'test:ddAlgorithm:list', '#', 'admin', sysdate(), '', null, '故障诊断算法功能验证菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法功能验证查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'test:ddAlgorithm:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法功能验证新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'test:ddAlgorithm:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法功能验证修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'test:ddAlgorithm:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法功能验证删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'test:ddAlgorithm:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法功能验证导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'test:ddAlgorithm:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法模型管理', '2000', '1', 'faultDiagnosis', 'model/faultDiagnosis/index', 1, 0, 'C', '0', '0', 'model:faultDiagnosis:list', '#', 'admin', sysdate(), '', null, '故障诊断算法模型管理菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法模型管理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'model:faultDiagnosis:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法模型管理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'model:faultDiagnosis:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法模型管理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'model:faultDiagnosis:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法模型管理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'model:faultDiagnosis:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障诊断算法模型管理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'model:faultDiagnosis:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障物理模型管理', '2000', '1', 'faultPhysical', 'model/faultPhysical/index', 1, 0, 'C', '0', '0', 'model:faultPhysical:list', '#', 'admin', sysdate(), '', null, '故障物理模型管理菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障物理模型管理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'model:faultPhysical:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障物理模型管理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'model:faultPhysical:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障物理模型管理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'model:faultPhysical:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障物理模型管理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'model:faultPhysical:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('故障物理模型管理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'model:faultPhysical:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('公式管理管理', '2001', '1', 'formulas', 'eval/formulas/index', 1, 0, 'C', '0', '0', 'eval:formulas:list', '#', 'admin', sysdate(), '', null, '公式管理管理菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('公式管理管理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'eval:formulas:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('公式管理管理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'eval:formulas:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('公式管理管理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'eval:formulas:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('公式管理管理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'eval:formulas:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('公式管理管理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'eval:formulas:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('评估指标体系管理', '2001', '1', 'indicator', 'eval/indicator/index', 1, 0, 'C', '0', '0', 'eval:indicator:list', '#', 'admin', sysdate(), '', null, '评估指标体系管理菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('评估指标体系管理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'eval:indicator:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('评估指标体系管理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'eval:indicator:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('评估指标体系管理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'eval:indicator:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('评估指标体系管理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'eval:indicator:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('评估指标体系管理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'eval:indicator:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程节点', '2005', '1', 'node', 'workflow/node/index', 1, 0, 'C', '0', '0', 'workflow:node:list', '#', 'admin', sysdate(), '', null, '流程节点菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程节点查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'workflow:node:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程节点新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'workflow:node:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程节点修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'workflow:node:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程节点删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'workflow:node:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程节点导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'workflow:node:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('算法性能评估', '2004', '1', 'perf', 'test/perf/index', 1, 0, 'C', '0', '0', 'test:perf:list', '#', 'admin', sysdate(), '', null, '算法性能评估菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('算法性能评估查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'test:perf:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('算法性能评估新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'test:perf:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('算法性能评估修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'test:perf:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('算法性能评估删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'test:perf:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('算法性能评估导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'test:perf:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('物理模型数据生成管理', '2002', '1', 'phyModel', 'dataGen/phyModel/index', 1, 0, 'C', '0', '0', 'dataGen:phyModel:list', '#', 'admin', sysdate(), '', null, '物理模型数据生成管理菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('物理模型数据生成管理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyModel:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('物理模型数据生成管理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyModel:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('物理模型数据生成管理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyModel:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('物理模型数据生成管理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyModel:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('物理模型数据生成管理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyModel:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('噪声数据生成管理', '2002', '1', 'phyNoise', 'dataGen/phyNoise/index', 1, 0, 'C', '0', '0', 'dataGen:phyNoise:list', '#', 'admin', sysdate(), '', null, '噪声数据生成管理菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('噪声数据生成管理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyNoise:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('噪声数据生成管理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyNoise:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('噪声数据生成管理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyNoise:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('噪声数据生成管理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyNoise:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('噪声数据生成管理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:phyNoise:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('测试数据生成管理', '2002', '1', 'test', 'dataGen/test/index', 1, 0, 'C', '0', '0', 'dataGen:test:list', '#', 'admin', sysdate(), '', null, '测试数据生成管理菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('测试数据生成管理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:test:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('测试数据生成管理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:test:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('测试数据生成管理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:test:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('测试数据生成管理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:test:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('测试数据生成管理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'dataGen:test:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程任务', '2005', '1', 'workflow', 'workflow/workflow/index', 1, 0, 'C', '0', '0', 'workflow:workflow:list', '#', 'admin', sysdate(), '', null, '流程任务菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程任务查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'workflow:workflow:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程任务新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'workflow:workflow:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程任务修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'workflow:workflow:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程任务删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'workflow:workflow:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('流程任务导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'workflow:workflow:export',       '#', 'admin', sysdate(), '', null, '');