INSERT INTO jetplasma.sys_dict_type (dict_id, dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES (104, '验证结果', 'verify_result', '0', 'admin', '2024-07-19 20:56:17', '', null, null);
INSERT INTO jetplasma.sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (0, '通过', '1', 'verify_result', null, 'default', 'N', '0', 'admin', '2024-07-19 21:03:59', 'admin', '2024-07-19 21:04:33', null);
INSERT INTO jetplasma.sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (1, '不通过并重新测试', '2', 'verify_result', null, 'default', 'N', '0', 'admin', '2024-07-19 21:04:28', '', null, null);
INSERT INTO jetplasma.sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (2, '不通过并结案', '3', 'verify_result', null, 'default', 'N', '0', 'admin', '2024-07-19 21:04:47', '', null, null);

alter table jetplasma_eco modify result varchar(60) null comment '验证结果';
alter table jetplasma_alteration_apply add subject varchar(200) null comment '主题' after no;
alter table jetplasma_ecn add subject varchar(200) null comment '主题' after ecn_no;
alter table jetplasma_eco add subject varchar(200) null comment '主题' after alteration_no;
alter table jetplasma_demo add subject varchar(200) null comment '主题' after demo_no;
alter table jetplasma_demo_execute add subject varchar(200) null comment '主题' after exec_no;
alter table jetplasma_device_problem_test modify test_report varchar(1000) null comment '测试报告';

drop view if exists jetplasma_eco_view;
CREATE VIEW jetplasma_eco_view AS
select e.*, jaa.apply_user, jaa.apply_depart from jetplasma_eco e left join jetplasma_alteration_apply jaa on e.alteration_id = jaa.id;

drop view if exists jetplasma_ecn_view;
CREATE VIEW jetplasma_ecn_view AS
select e.*, jaa.apply_user, jaa.apply_depart from jetplasma_ecn e left join jetplasma_alteration_apply jaa on e.alteration_id = jaa.id;

INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2053, '变更申请新增', 'alteration:apply:add', 2024, 4, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:10:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2054, '变更申请修改', 'alteration:apply:update', 2024, 5, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2055, '变更申请删除', 'alteration:apply:delete', 2024, 6, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:36', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2056, 'ECO验证新增', 'jetplasma:eco:add', 2025, 4, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:10:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2057, 'ECO验证修改', 'jetplasma:eco:update', 2025, 5, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2058, 'ECO验证删除', 'jetplasma:eco:delete', 2025, 6, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:36', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2059, 'ECN执行新增', 'jetplasma:ecn:add', 2026, 4, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:10:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2060, 'ECN执行修改', 'jetplasma:ecn:update', 2026, 5, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2061, 'ECN执行删除', 'jetplasma:ecn:delete', 2026, 6, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:36', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2062, 'DEMO新增', 'jetplasma:demo:add', 2028, 4, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:10:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2063, 'DEMO修改', 'jetplasma:demo:update', 2028, 5, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2064, 'DEMO删除', 'jetplasma:demo:delete', 2028, 6, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:36', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2065, 'DEMO执行新增', 'jetplasma:demo:execute:add', 2029, 4, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:10:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2066, 'DEMO执行修改', 'jetplasma:demo:execute:update', 2029, 5, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:15', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2067, 'DEMO执行删除', 'jetplasma:demo:execute:delete', 2029, 6, '', null, null, 1, 0, 'F', '0', '0', '#', 'admin', '2024-07-19 23:11:36', '', null, '');
INSERT INTO jetplasma.sys_menu (menu_id, menu_name, perms, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, icon, create_by, create_time, update_by, update_time, remark) VALUES (2068, '项目系列参数', 'system:projtypes:list', 1, 10, 'projtypes', 'projtypes/index', null, 1, 0, 'C', '0', '0', 'cascader', 'admin', '2024-07-20 13:12:26', 'admin', '2024-07-20 13:14:22', '');


drop table if exists jetplasma_proj_type;
create table jetplasma_proj_type (
  id           bigint(20)      not null auto_increment    comment '项目id',
  parent_id         bigint(20)      default 0                  comment '父项目id',
  proj_name         varchar(30)     default ''                 comment '项目名称',
  order_num         int(4)          default 0                  comment '显示顺序',
  status            char(1)         default '0'                comment '状态（0正常 1停用）',
  del_flag          char(1)         default '0'                comment '删除标志（0代表存在 2代表删除）',
  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 = '项目系列类型表';

INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (1, 0, 'Triton系列', 0, '0', '0', 'admin', '2024-07-20 16:43:11', 'admin', '2024-07-20 16:44:05');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (2, 1, 'Triton160', 2, '0', '0', 'admin', '2024-07-20 16:42:56', 'admin', '2024-07-20 16:44:04');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (3, 1, 'Triton40', 1, '0', '0', 'admin', '2024-07-20 16:42:57', 'admin', '2024-07-20 16:44:03');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (4, 1, 'Triton', 0, '0', '0', 'admin', '2024-07-20 16:42:59', 'admin', '2024-07-20 16:44:06');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (5, 0, 'Virgo系列', 1, '0', '0', 'admin', '2024-07-20 16:43:00', 'admin', '2024-07-20 16:43:30');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (6, 5, 'Virgo', 0, '0', '0', 'admin', '2024-07-20 16:43:02', '', '2024-07-20 16:44:08');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (7, 5, 'VirgoA', 2, '0', '0', 'admin', '2024-07-20 16:43:03', 'admin', '2024-07-20 16:44:09');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (8, 5, 'VirgoB', 1, '0', '0', 'admin', '2024-07-20 16:43:04', 'admin', '2024-07-20 16:43:58');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (9, 0, 'Hesita系列', 2, '0', '0', 'admin', '2024-07-20 16:43:08', 'admin', '2024-07-20 16:44:00');
INSERT INTO jetplasma.jetplasma_proj_type (id, parent_id, proj_name, order_num, status, del_flag, create_by, create_time, update_by, update_time) VALUES (10, 9, 'HESTIA', 0, '0', '0', 'admin', '2024-07-20 16:43:06', 'admin', '2024-07-20 16:46:27');

INSERT INTO jetplasma.sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (0, '已撤销', '11', 'flow_status', null, 'danger', 'N', '0', 'admin', '2024-07-20 20:56:35', 'admin', '2024-07-20 20:57:10', null);

update sys_menu set path='params' where menu_id=106;

drop view if exists jetplasma_demo_execute_view;
create view jetplasma_demo_execute_view as
select e.*, d.customer, d.device_type, d.saler, d.requirements from jetplasma_demo d, jetplasma_demo_execute e where d.id = e.demo_id;