From e368ee0141cfc8d4e4001e225b9e4a9cc6a1e034 Mon Sep 17 00:00:00 2001 From: liu <2021943741@qq.com> Date: 星期三, 16 九月 2026 17:24:46 +0800 Subject: [PATCH] fix(mes): 编码规则初始化脚本补充 7 条缺失规则 --- sql/mysql/mes_auto_code_rule_init.sql | 83 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 83 insertions(+), 0 deletions(-) diff --git a/sql/mysql/mes_auto_code_rule_init.sql b/sql/mysql/mes_auto_code_rule_init.sql index 0fe4242..332a0e3 100644 --- a/sql/mysql/mes_auto_code_rule_init.sql +++ b/sql/mysql/mes_auto_code_rule_init.sql @@ -516,6 +516,89 @@ VALUES (41, 3, 4, 4, NULL, NULL, 1, 1, b'1', 3, '娴佹按鍙�-鎸夊ぉ寰幆', '1', NOW(), '1', NOW(), b'0'); -- ============================================= +-- 6. 琛ュ厖瑙勫垯锛圵M 璁惧鍏ュ簱鍗� + PD 浜у搧璧勬枡妯″潡锛� +-- ============================================= + +-- 6.1 璁惧鍏ュ簱鍗曠紪鐮� (WM_EQUIP_RECEIPT_CODE) +INSERT INTO mes_md_auto_code_rule (id, code, name, description, max_length, padded, status, creator, create_time, updater, update_time, deleted) +VALUES (42, 'WM_EQUIP_RECEIPT_CODE', '璁惧鍏ュ簱鍗曠紪鐮�', '鐢ㄤ簬鐢熸垚璁惧鍏ュ簱鍗曠紪鐮�', 16, b'0', 0, '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (42, 1, 3, 3, 'ER_', NULL, NULL, NULL, NULL, NULL, '鍥哄畾鍓嶇紑', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (42, 2, 2, 8, NULL, 'yyyyMMdd', NULL, NULL, NULL, NULL, '鏃ユ湡', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (42, 3, 4, 4, NULL, NULL, 1, 1, b'1', 3, '娴佹按鍙�-鎸夊ぉ寰幆', '1', NOW(), '1', NOW(), b'0'); + +-- 6.2 璧勬枡瀹℃牳鍗曠紪鐮� (PD_DOCUMENT_AUDIT_CODE) +INSERT INTO mes_md_auto_code_rule (id, code, name, description, max_length, padded, status, creator, create_time, updater, update_time, deleted) +VALUES (43, 'PD_DOCUMENT_AUDIT_CODE', '璧勬枡瀹℃牳鍗曠紪鐮�', '鐢ㄤ簬鐢熸垚璧勬枡瀹℃牳鍗曠紪鐮�', 16, b'0', 0, '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (43, 1, 3, 3, 'DA_', NULL, NULL, NULL, NULL, NULL, '鍥哄畾鍓嶇紑', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (43, 2, 2, 8, NULL, 'yyyyMMdd', NULL, NULL, NULL, NULL, '鏃ユ湡', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (43, 3, 4, 4, NULL, NULL, 1, 1, b'1', 3, '娴佹按鍙�-鎸夊ぉ寰幆', '1', NOW(), '1', NOW(), b'0'); + +-- 6.3 褰掓。鍙拌处缂栫爜 (PD_ARCHIVE_CODE) +INSERT INTO mes_md_auto_code_rule (id, code, name, description, max_length, padded, status, creator, create_time, updater, update_time, deleted) +VALUES (44, 'PD_ARCHIVE_CODE', '褰掓。鍙拌处缂栫爜', '鐢ㄤ簬鐢熸垚褰掓。鍙拌处缂栫爜', 16, b'0', 0, '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (44, 1, 3, 3, 'AR_', NULL, NULL, NULL, NULL, NULL, '鍥哄畾鍓嶇紑', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (44, 2, 2, 8, NULL, 'yyyyMMdd', NULL, NULL, NULL, NULL, '鏃ユ湡', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, date_format, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, create_time, updater, update_time, deleted) +VALUES (44, 3, 4, 4, NULL, NULL, 1, 1, b'1', 3, '娴佹按鍙�-鎸夊ぉ寰幆', '1', NOW(), '1', NOW(), b'0'); + +-- 6.4 宸ヨ壓鍙傛暟缂栫爜 (PD_PROCESS_PARAM_CODE) +INSERT INTO mes_md_auto_code_rule (id, code, name, description, max_length, padded, status, creator, create_time, updater, update_time, deleted) +VALUES (45, 'PD_PROCESS_PARAM_CODE', '宸ヨ壓鍙傛暟缂栫爜', '鐢ㄤ簬鐢熸垚宸ヨ壓鍙傛暟缂栫爜', 12, b'0', 0, '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, serial_start_no, serial_step, cycle_flag, remark, creator, create_time, updater, update_time, deleted) +VALUES (45, 1, 3, 3, 'PPC', NULL, NULL, NULL, '鍥哄畾鍓嶇紑', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, serial_start_no, serial_step, cycle_flag, remark, creator, create_time, updater, update_time, deleted) +VALUES (45, 2, 4, 6, NULL, 1, 1, b'0', '娴佹按鍙�', '1', NOW(), '1', NOW(), b'0'); + +-- 6.5 宸ヨ壓鍙傛暟妯℃澘缂栫爜 (PD_PROCESS_PARAM_TEMPLATE_CODE) +INSERT INTO mes_md_auto_code_rule (id, code, name, description, max_length, padded, status, creator, create_time, updater, update_time, deleted) +VALUES (46, 'PD_PROCESS_PARAM_TEMPLATE_CODE', '宸ヨ壓鍙傛暟妯℃澘缂栫爜', '鐢ㄤ簬鐢熸垚宸ヨ壓鍙傛暟妯℃澘缂栫爜', 12, b'0', 0, '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, serial_start_no, serial_step, cycle_flag, remark, creator, create_time, updater, update_time, deleted) +VALUES (46, 1, 3, 3, 'PPT', NULL, NULL, NULL, '鍥哄畾鍓嶇紑', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, serial_start_no, serial_step, cycle_flag, remark, creator, create_time, updater, update_time, deleted) +VALUES (46, 2, 4, 6, NULL, 1, 1, b'0', '娴佹按鍙�', '1', NOW(), '1', NOW(), b'0'); + +-- 6.6 浜у搧妗f缂栫爜 (PD_PRODUCT_CODE) +INSERT INTO mes_md_auto_code_rule (id, code, name, description, max_length, padded, status, creator, create_time, updater, update_time, deleted) +VALUES (47, 'PD_PRODUCT_CODE', '浜у搧妗f缂栫爜', '鐢ㄤ簬鐢熸垚浜у搧妗f缂栫爜', 12, b'0', 0, '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, serial_start_no, serial_step, cycle_flag, remark, creator, create_time, updater, update_time, deleted) +VALUES (47, 1, 3, 3, 'PRD', NULL, NULL, NULL, '鍥哄畾鍓嶇紑', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, serial_start_no, serial_step, cycle_flag, remark, creator, create_time, updater, update_time, deleted) +VALUES (47, 2, 4, 6, NULL, 1, 1, b'0', '娴佹按鍙�', '1', NOW(), '1', NOW(), b'0'); + +-- 6.7 鏈嶅姟濂楅缂栫爜 (PD_PACKAGE_CODE) +INSERT INTO mes_md_auto_code_rule (id, code, name, description, max_length, padded, status, creator, create_time, updater, update_time, deleted) +VALUES (48, 'PD_PACKAGE_CODE', '鏈嶅姟濂楅缂栫爜', '鐢ㄤ簬鐢熸垚鏈嶅姟濂楅缂栫爜', 12, b'0', 0, '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, serial_start_no, serial_step, cycle_flag, remark, creator, create_time, updater, update_time, deleted) +VALUES (48, 1, 3, 3, 'SPK', NULL, NULL, NULL, '鍥哄畾鍓嶇紑', '1', NOW(), '1', NOW(), b'0'); + +INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, fix_character, serial_start_no, serial_step, cycle_flag, remark, creator, create_time, updater, update_time, deleted) +VALUES (48, 2, 4, 6, NULL, 1, 1, b'0', '娴佹按鍙�', '1', NOW(), '1', NOW(), b'0'); + +-- ============================================= -- 鎵ц瀹屾垚鎻愮ず -- ============================================= SELECT 'MES 缂栫爜瑙勫垯鍒濆鍖栧畬鎴愶紒' AS result; -- Gitblit v1.9.3