修改规则

This commit is contained in:
wuweihua
2026-11-10 17:30:11 +08:00
parent fbc138f041
commit cf6b90008d
3 changed files with 15 additions and 11 deletions
+4 -4
View File
@@ -1,10 +1,10 @@
-- VOL_8000: charge_weight = max(L*W*H/8000, weight_source)
-- VOL_8000: charge_weight = max(L*W*H/8000, volume_weight)
-- customer_code column stores 对外代码 customer_code_dw (C00222/C00562/C00521/C00805)
SET NAMES utf8mb4;
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
SELECT 2, N'材积重8000取大', 'VOL_8000', 'bms_biz_rule_type', '', 'success', 'N', '0', 'admin', sysdate(),
N'计费重=max(长×宽×高/8000, 取值字段)'
N'计费重=max(长×宽×高/8000, 材积重)'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM sys_dict_data WHERE dict_type = 'bms_biz_rule_type' AND dict_value = 'VOL_8000');
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
@@ -14,8 +14,8 @@ FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM sys_dict_data WHERE dict_type = 'bms_b
-- Seed by 对外代码 (customer_code_dw). Matcher also accepts customer_code.
INSERT INTO biz_rule (rule_name, rule_type, product_code, country_code, customer_code, weight_min, weight_max, weight_source, side_sum_max, status, remark, create_by, create_time, del_flag)
SELECT CONCAT(N'对外代码', v.customer_code, N' 材积重8000取大'), 'VOL_8000', NULL, NULL, v.customer_code, NULL, NULL, 'RECEIVE_WEIGHT', NULL, '0',
N'客户维度为对外代码customer_code_dw;计费重=max(长×宽×高/8000, 实重)', 'admin', sysdate(), '0'
SELECT CONCAT(N'对外代码', v.customer_code, N' 材积重8000取大'), 'VOL_8000', NULL, NULL, v.customer_code, NULL, NULL, 'VOLUME_WEIGHT', NULL, '0',
N'客户维度为对外代码customer_code_dw;计费重=max(长×宽×高/8000, 材积重)', 'admin', sysdate(), '0'
FROM (
SELECT 'C00222' AS customer_code UNION ALL SELECT 'C00562' UNION ALL SELECT 'C00521' UNION ALL SELECT 'C00805'
) v