初始代码
This commit is contained in:
22
yawei-mes/.sql/2026-01-07_v1.0.68_周启威_领料单编码规则修改.sql
Normal file
22
yawei-mes/.sql/2026-01-07_v1.0.68_周启威_领料单编码规则修改.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
-- =============================================
|
||||
-- 领料单编码规则修改
|
||||
-- 原格式:SCLL + 6位流水号(如 SCLL000659)
|
||||
-- 新格式:SCLL + 8位日期 + 3位流水号(如 SCLL20260107001)
|
||||
-- 不同日期流水号从001开始
|
||||
-- =============================================
|
||||
|
||||
-- 删除旧的领料单编码规则子项
|
||||
DELETE FROM sys_code_rule_entry WHERE rule_id = 10;
|
||||
|
||||
-- 插入新的编码规则子项
|
||||
-- 第1项:常量 SCLL(sort=1)
|
||||
INSERT INTO sys_code_rule_entry (rule_id, sort, type_id, length_flow, max_flow, date_format, constant_char, element_source_table, source_attribute, source_value, code_cover, max_date)
|
||||
VALUES (10, 1, 'B', 0, 0, '', 'SCLL', '', '', NULL, '', NULL);
|
||||
|
||||
-- 第2项:日期 yyyyMMdd(sort=2,8位日期)
|
||||
INSERT INTO sys_code_rule_entry (rule_id, sort, type_id, length_flow, max_flow, date_format, constant_char, element_source_table, source_attribute, source_value, code_cover, max_date)
|
||||
VALUES (10, 2, 'C', 0, 0, 'yyyyMMdd', '', '', '', NULL, '', NULL);
|
||||
|
||||
-- 第3项:流水号(sort=3,3位,用0补位,按日期重置从001开始)
|
||||
INSERT INTO sys_code_rule_entry (rule_id, sort, type_id, length_flow, max_flow, date_format, constant_char, element_source_table, source_attribute, source_value, code_cover, max_date)
|
||||
VALUES (10, 3, 'A', 3, 1, '', '', '', '', NULL, '0', NULL);
|
||||
Reference in New Issue
Block a user