|
|
@@ -1,6 +1,6 @@
|
|
|
-- 上传参数解析配置表(方案二:配置化替代代码硬编码)
|
|
|
-- 数据库:MySQL(mes_cloud_xz)
|
|
|
-CREATE TABLE mes_param_parse_config (
|
|
|
+CREATE TABLE IF NOT EXISTS mes_param_parse_config (
|
|
|
id varchar(64) NOT NULL COMMENT '编码',
|
|
|
line_sn varchar(50) NOT NULL COMMENT '产线编号(*表示所有产线)',
|
|
|
oprno varchar(50) NOT NULL COMMENT '工位号(如OP035,不含尾缀字母)',
|
|
|
@@ -19,20 +19,20 @@ CREATE TABLE mes_param_parse_config (
|
|
|
|
|
|
-- 种子数据:迁移原XT线硬编码规则
|
|
|
-- OP010 底板码:ps第1、2段,结果固定OK
|
|
|
-INSERT INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
+INSERT IGNORE INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
VALUES ('ppc_xt_op010_1', 'XT', 'OP010', '400005', 1, 1, '底板码1(固定OK)', '0', 'system', NOW(), 'system', NOW());
|
|
|
-INSERT INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
+INSERT IGNORE INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
VALUES ('ppc_xt_op010_2', 'XT', 'OP010', '400005', 2, 1, '底板码2(固定OK)', '0', 'system', NOW(), 'system', NOW());
|
|
|
-- OP060/OP100/OP130 程序名称:ps第1段,结果取报文Y/N
|
|
|
-INSERT INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
+INSERT IGNORE INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
VALUES ('ppc_xt_op060_1', 'XT', 'OP060', '300001', 1, 0, '程序名称', '0', 'system', NOW(), 'system', NOW());
|
|
|
-INSERT INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
+INSERT IGNORE INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
VALUES ('ppc_xt_op100_1', 'XT', 'OP100', '300001', 1, 0, '程序名称', '0', 'system', NOW(), 'system', NOW());
|
|
|
-INSERT INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
+INSERT IGNORE INTO mes_param_parse_config (id, line_sn, oprno, craft, ps_pos, result_mode, title, status, create_by, create_date, update_by, update_date)
|
|
|
VALUES ('ppc_xt_op130_1', 'XT', 'OP130', '300001', 1, 0, '程序名称', '0', 'system', NOW(), 'system', NOW());
|
|
|
|
|
|
-- 后台菜单:挂在"生产管理"(menu_code=1672118505143263232)下
|
|
|
-INSERT INTO js_sys_menu (menu_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names,
|
|
|
+INSERT IGNORE INTO js_sys_menu (menu_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names,
|
|
|
menu_name, menu_type, menu_href, menu_target, menu_icon, menu_color, menu_title, permission, weight, is_show,
|
|
|
sys_code, module_codes, status, create_by, create_date, update_by, update_date, remarks)
|
|
|
VALUES ('2043000000000000001', '1672118505143263232', '0,1672118505143263232,', 2060, '0000009290,0000002060,', '1', 1, '生产管理/上传参数解析配置',
|
|
|
@@ -45,3 +45,4 @@ SELECT rm.role_code, '2043000000000000001'
|
|
|
FROM js_sys_role_menu rm
|
|
|
WHERE rm.menu_code = '1672118505143263232'
|
|
|
AND NOT EXISTS (SELECT 1 FROM js_sys_role_menu x WHERE x.role_code = rm.role_code AND x.menu_code = '2043000000000000001');
|
|
|
+
|