-- ============================================================
-- MES 编码规则初始化数据
-- 包含：mes_md_auto_code_rule（规则主表）+ mes_md_auto_code_part（规则分段组成）
-- 分段类型：1=输入字符, 2=当前日期, 3=固定字符, 4=流水号
-- 循环方式：1=按年, 2=按月, 3=按天, 4=按小时, 5=按分钟, 10=按传入字符
-- 补齐方式：1=左补齐, 2=右补齐
-- ============================================================

-- ==================== 1. 编码规则主表 ====================

INSERT INTO mes_md_auto_code_rule (id, code, name, description, max_length, padded, padded_char, padded_method, status, remark, creator, updater) VALUES
-- 基础数据
(1,  'MD_ITEM_TYPE_CODE',      '物料分类编码',     '物料分类自动编码',       6,  1, '0', 1, 0, NULL, '1', '1'),
(2,  'MD_ITEM_CODE',           '物料编码',         '物料自动编码',           17, 1, '0', 1, 0, NULL, '1', '1'),
(3,  'MD_VENDOR_CODE',         '供应商编码',       '供应商自动编码',         15, 1, '0', 1, 0, NULL, '1', '1'),
(4,  'MD_CLIENT_CODE',         '客户编码',         '客户自动编码',           15, 1, '0', 1, 0, NULL, '1', '1'),
(5,  'MD_WORKSTATION_CODE',    '工作站编码',       '工作站自动编码',         6,  1, '0', 1, 0, NULL, '1', '1'),
(6,  'MD_WORKSHOP_CODE',       '车间编码',         '车间自动编码',           6,  1, '0', 1, 0, NULL, '1', '1'),
(7,  'TM_TOOL_TYPE_CODE',      '工具类型编码',     '工具类型自动编码',       6,  1, '0', 1, 0, NULL, '1', '1'),
-- 仓储物流
(10, 'WM_WAREHOUSE_CODE',      '仓库编码',         '仓库自动编码',           6,  1, '0', 1, 0, NULL, '1', '1'),
(11, 'WM_LOCATION_CODE',       '库区编码',         '库区自动编码',           6,  1, '0', 1, 0, NULL, '1', '1'),
(12, 'WM_AREA_CODE',           '库位编码',         '库位自动编码',           6,  1, '0', 1, 0, NULL, '1', '1'),
(13, 'WM_ARRIVAL_NOTICE_CODE', '到货通知单编码',   '到货通知单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(14, 'WM_ITEM_RECEIPT_CODE',   '采购入库单编码',   '采购入库单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(15, 'WM_RETURN_VENDOR_CODE',  '采购退货单编码',   '采购退货单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(16, 'WM_RETURN_ISSUE_CODE',   '生产退料单编码',   '生产退料单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(17, 'WM_SN_CODE',             'SN码',             'SN码自动编码',           18, 1, '0', 1, 0, NULL, '1', '1'),
(18, 'WM_PACKAGE_CODE',        '装箱单编码',       '装箱单自动编码',         17, 1, '0', 1, 0, NULL, '1', '1'),
(19, 'WM_BATCH_CODE',          '批次编码',         '批次自动编码',           17, 1, '0', 1, 0, NULL, '1', '1'),
(20, 'WM_PRODUCT_SALES_CODE',  '销售出库单编码',   '销售出库单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(21, 'WM_MISC_RECEIPT_CODE',   '杂项入库单编码',   '杂项入库单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(22, 'WM_MISC_ISSUE_CODE',     '杂项出库单编码',   '杂项出库单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(23, 'WM_STOCK_TAKING_PLAN_CODE','盘点方案编码',   '盘点方案自动编码',       15, 1, '0', 1, 0, NULL, '1', '1'),
(24, 'WM_STOCK_TAKING_CODE',   '盘点任务编码',     '盘点任务自动编码',       15, 1, '0', 1, 0, NULL, '1', '1'),
(25, 'TRANSFER_CODE',          '转移调拨单编码',   '转移调拨单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(26, 'WM_OUTSOURCE_ISSUE_CODE','外协发料单编码',   '外协发料单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(27, 'WM_OUTSOURCE_RECEIPT_CODE','外协入库单编码', '外协入库单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(28, 'WM_SALES_NOTICE_CODE',   '发货通知单编码',   '发货通知单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(29, 'WM_RETURN_SALES_CODE',   '销售退货单编码',   '销售退货单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
-- 生产
(30, 'PRO_WORK_ORDER_CODE',    '生产工单编码',     '生产工单自动编码',       15, 1, '0', 1, 0, NULL, '1', '1'),
(31, 'PRO_TASK_CODE',          '生产任务编码',     '生产任务自动编码',       15, 1, '0', 1, 0, NULL, '1', '1'),
(32, 'PRO_ROUTE_CODE',         '工艺路线编码',     '工艺路线自动编码',       15, 1, '0', 1, 0, NULL, '1', '1'),
(33, 'PRO_FEEDBACK_CODE',      '生产报工单编码',   '生产报工单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
-- 质检
(40, 'QC_IQC_CODE',            '来料检验单编码',   '来料检验单自动编码',     16, 1, '0', 1, 0, NULL, '1', '1'),
(41, 'QC_IPQC_CODE',           '过程检验单编码',   '过程检验单自动编码',     17, 1, '0', 1, 0, NULL, '1', '1'),
(42, 'QC_OQC_CODE',            '出货检验单编码',   '出货检验单自动编码',     17, 1, '0', 1, 0, NULL, '1', '1'),
(43, 'QC_RQC_CODE',            '退货检验单编码',   '退货检验单自动编码',     17, 1, '0', 1, 0, NULL, '1', '1'),
(44, 'QC_DEFECT_CODE',         '缺陷类型编码',     '缺陷类型自动编码',       6,  1, '0', 1, 0, NULL, '1', '1'),
(45, 'QC_INDICATOR_RESULT_CODE','样品检验结果编码', '样品检验结果自动编码',   15, 1, '0', 1, 0, NULL, '1', '1'),
-- 设备
(50, 'DV_MACHINERY_CODE',      '设备编码',         '设备自动编码',           15, 1, '0', 1, 0, NULL, '1', '1'),
(51, 'DV_MACHINERY_TYPE_CODE', '设备类型编码',     '设备类型自动编码',       6,  1, '0', 1, 0, NULL, '1', '1'),
(52, 'DV_SUBJECT_CODE',        '点检保养项目编码', '点检保养项目自动编码',   6,  1, '0', 1, 0, NULL, '1', '1'),
(53, 'DV_REPAIR_CODE',         '维修单编码',       '维修单自动编码',         15, 1, '0', 1, 0, NULL, '1', '1'),
-- 工艺文档
(60, 'PD_DOCUMENT_AUDIT_CODE', '资料审核单编码',   '资料审核单自动编码',     15, 1, '0', 1, 0, NULL, '1', '1'),
(61, 'PD_ARCHIVE_CODE',        '归档台账编码',     '归档台账自动编码',       15, 1, '0', 1, 0, NULL, '1', '1'),
(62, 'PD_PROCESS_PARAM_CODE',  '工艺参数编码',     '工艺参数自动编码',       15, 1, '0', 1, 0, NULL, '1', '1'),
(63, 'PD_PROCESS_PARAM_TEMPLATE_CODE', '工艺参数模板编码', '工艺参数模板自动编码', 15, 1, '0', 1, 0, NULL, '1', '1');


-- ==================== 2. 编码规则分段组成 ====================
--
-- 长度对照：
--   固定字符(IT_) = 3, 日期(yyyyMMdd) = 8, 流水号(001) = 3
--   例: IT_001 = 3+3 = 6        → max_length=6
--   例: ITEM_20260716_001 = 6+8+3 = 17  → max_length=17
--   例: WO_20260716_001 = 3+8+3 = 14    → max_length=15 (留余量)
--

INSERT INTO mes_md_auto_code_part (rule_id, sort, type, length, date_format, fix_character, serial_start_no, serial_step, cycle_flag, cycle_method, remark, creator, updater) VALUES
-- ===== 基础数据 =====
-- 1. 物料分类：IT_001 = 3+3=6
(1,  1, 3, 3,  NULL,       'IT_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(1,  2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 2. 物料：ITEM_20260716001 = 6+8+3=17
(2,  1, 3, 6,  NULL,       'ITEM_', NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(2,  2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(2,  3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 3. 供应商：VND_20260716001 = 4+8+3=15
(3,  1, 3, 4,  NULL,       'VND_',  NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(3,  2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(3,  3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 4. 客户：CLT_20260716001 = 4+8+3=15
(4,  1, 3, 4,  NULL,       'CLT_',  NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(4,  2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(4,  3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 5. 工作站：WS_001 = 3+3=6
(5,  1, 3, 3,  NULL,       'WS_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(5,  2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 6. 车间：WP_001 = 3+3=6
(6,  1, 3, 3,  NULL,       'WP_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(6,  2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 7. 工具类型：TL_001 = 3+3=6
(7,  1, 3, 3,  NULL,       'TL_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(7,  2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),

-- ===== 仓储物流 =====
-- 10. 仓库：WH_001 = 3+3=6
(10, 1, 3, 3,  NULL,       'WH_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(10, 2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 11. 库区：LC_001 = 3+3=6
(11, 1, 3, 3,  NULL,       'LC_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(11, 2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 12. 库位：AR_001 = 3+3=6
(12, 1, 3, 3,  NULL,       'AR_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(12, 2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 13. 到货通知：AN_20260716001 = 3+8+3=14→15
(13, 1, 3, 3,  NULL,       'AN_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(13, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(13, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 14. 采购入库：IR_20260716001 = 3+8+3=14→15
(14, 1, 3, 3,  NULL,       'IR_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(14, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(14, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 15. 采购退货：RV_20260716001 = 3+8+3=14→15
(15, 1, 3, 3,  NULL,       'RV_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(15, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(15, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 16. 生产退料：RI_20260716001 = 3+8+3=14→15
(16, 1, 3, 3,  NULL,       'RI_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(16, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(16, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 17. SN码：SN_20260716000001 = 3+8+4+3=18
(17, 1, 3, 3,  NULL,       'SN_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(17, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(17, 3, 4, 4,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 18. 装箱：PK_20260716001 = 3+8+3=14→17
(18, 1, 3, 3,  NULL,       'PK_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(18, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(18, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 19. 批次：BT_20260716001 = 3+8+3=14→17
(19, 1, 3, 3,  NULL,       'BT_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(19, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(19, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 20. 销售出库：SL_20260716001 = 3+8+3=14→15
(20, 1, 3, 3,  NULL,       'SL_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(20, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(20, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 21. 杂项入库：MI_20260716001 = 3+8+3=14→15
(21, 1, 3, 3,  NULL,       'MI_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(21, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(21, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 22. 杂项出库：MO_20260716001 = 3+8+3=14→15
(22, 1, 3, 3,  NULL,       'MO_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(22, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(22, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 23. 盘点方案：SP_20260716001 = 3+8+3=14→15
(23, 1, 3, 3,  NULL,       'SP_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(23, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(23, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 24. 盘点任务：ST_20260716001 = 3+8+3=14→15
(24, 1, 3, 3,  NULL,       'ST_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(24, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(24, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 25. 调拨：TF_20260716001 = 3+8+3=14→15
(25, 1, 3, 3,  NULL,       'TF_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(25, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(25, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 26. 外协发料：OI_20260716001 = 3+8+3=14→15
(26, 1, 3, 3,  NULL,       'OI_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(26, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(26, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 27. 外协入库：OR_20260716001 = 3+8+3=14→15
(27, 1, 3, 3,  NULL,       'OR_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(27, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(27, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 28. 发货通知：SN_20260716001 = 3+8+3=14→15
(28, 1, 3, 3,  NULL,       'SN_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(28, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(28, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 29. 销售退货：RS_20260716001 = 3+8+3=14→15
(29, 1, 3, 3,  NULL,       'RS_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(29, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(29, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),

-- ===== 生产 =====
-- 30. 工单：WO_20260716001 = 3+8+3=14→15
(30, 1, 3, 3,  NULL,       'WO_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(30, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(30, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 31. 任务：TK_20260716001 = 3+8+3=14→15
(31, 1, 3, 3,  NULL,       'TK_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(31, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(31, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 32. 工艺路线：RT_20260716001 = 3+8+3=14→15
(32, 1, 3, 3,  NULL,       'RT_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(32, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(32, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 33. 报工：FB_20260716001 = 3+8+3=14→15
(33, 1, 3, 3,  NULL,       'FB_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(33, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(33, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),

-- ===== 质检 =====
-- 40. 来料检验：IQC_20260716001 = 4+8+3=15→16
(40, 1, 3, 4,  NULL,       'IQC_',  NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(40, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(40, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 41. 过程检验：IPQC_20260716001 = 5+8+3=16→17
(41, 1, 3, 5,  NULL,       'IPQC_', NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(41, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(41, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 42. 出货检验：OQC_20260716001 = 4+8+3=15→17
(42, 1, 3, 4,  NULL,       'OQC_',  NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(42, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(42, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 43. 退货检验：RQC_20260716001 = 4+8+3=15→17
(43, 1, 3, 4,  NULL,       'RQC_',  NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(43, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(43, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 44. 缺陷：DF_001 = 3+3=6
(44, 1, 3, 3,  NULL,       'DF_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(44, 2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 45. 检验结果：IR_20260716001 = 3+8+3=14→15
(45, 1, 3, 3,  NULL,       'IR_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(45, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(45, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),

-- ===== 设备 =====
-- 50. 设备：MC_20260716001 = 3+8+3=14→15
(50, 1, 3, 3,  NULL,       'MC_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(50, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(50, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 51. 设备类型：MT_001 = 3+3=6
(51, 1, 3, 3,  NULL,       'MT_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(51, 2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 52. 点检保养：SJ_001 = 3+3=6
(52, 1, 3, 3,  NULL,       'SJ_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(52, 2, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 53. 维修：RP_20260716001 = 3+8+3=14→15
(53, 1, 3, 3,  NULL,       'RP_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(53, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(53, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),

-- ===== 工艺文档 =====
-- 60. 资料审核：DA_20260716001 = 3+8+3=14→15
(60, 1, 3, 3,  NULL,       'DA_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(60, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(60, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 61. 归档：AC_20260716001 = 3+8+3=14→15
(61, 1, 3, 3,  NULL,       'AC_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(61, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(61, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 62. 工艺参数：PP_20260716001 = 3+8+3=14→15
(62, 1, 3, 3,  NULL,       'PP_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(62, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(62, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1'),
-- 63. 工艺参数模板：PT_20260716001 = 3+8+3=14→15
(63, 1, 3, 3,  NULL,       'PT_',   NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(63, 2, 2, 8,  'yyyyMMdd', NULL,    NULL, NULL, NULL,  NULL, NULL, '1', '1'),
(63, 3, 4, 3,  NULL,       NULL,    1,    1,    1,    3,    NULL, '1', '1');
