-- 站点路径规划：经过其他出库站点时的惩罚与强制跳过配置
-- stationPathPassOtherOutStationWeightPercent:
--   数值越大，越倾向避开“中途经过其他出库站点”的路径；设置为 0 可关闭该惩罚
-- stationPathPassOtherOutStationForceSkip:
--   0/false: 仅惩罚
--   1/true : 发现路径经过其他出库站点时直接过滤

INSERT INTO sys_config(name, code, value, type, status, select_type)
SELECT '站点路径经过其他出库站点惩罚权重(数值越大，越倾向避开)', 'stationPathPassOtherOutStationWeightPercent', '100', 1, 1, 'system'
FROM dual
WHERE NOT EXISTS (
    SELECT 1
    FROM sys_config
    WHERE code = 'stationPathPassOtherOutStationWeightPercent'
);

INSERT INTO sys_config(name, code, value, type, status, select_type)
SELECT '站点路径经过其他出库站点强制跳过(1强制跳过)', 'stationPathPassOtherOutStationForceSkip', '0', 1, 1, 'system'
FROM dual
WHERE NOT EXISTS (
    SELECT 1
    FROM sys_config
    WHERE code = 'stationPathPassOtherOutStationForceSkip'
);

SELECT id, name, code, value, type, status, select_type
FROM sys_config
WHERE code IN (
    'stationPathPassOtherOutStationWeightPercent',
    'stationPathPassOtherOutStationForceSkip'
);
