IF NOT EXISTS (SELECT 1 FROM sys_config WHERE code = 'AutoFrontLocMove')
BEGIN
    INSERT INTO sys_config (name, code, value, type, status)
    VALUES (
        N'前排补货移库配置',
        'AutoFrontLocMove',
        N'{"enabled":false,"intervalSeconds":60,"userId":9527,"rules":[{"crnNo":1,"frontRows":"1-3","sourceRows":"4-20"},{"crnNo":2,"frontRows":"20-18","sourceRows":"17-1"}]}',
        2,
        1
    );
END;
