-- 检查工单表结构
DESCRIBE test_work_order;

-- 检查是否有 batch_name 字段
SELECT 
    COLUMN_NAME,
    COLUMN_TYPE,
    IS_NULLABLE,
    COLUMN_COMMENT
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'test_work_order'
  AND COLUMN_NAME IN ('batch_id', 'batch_name', 'test_order_id')
ORDER BY ORDINAL_POSITION;

-- 查看最近的工单数据（包含所有字段）
SELECT 
    id,
    batch_id,
    batch_name,
    test_eut_id,
    name,
    order_id,
    create_time
FROM test_work_order
WHERE order_id IS NULL
ORDER BY id DESC
LIMIT 10;
