import request from '@/utils/axios.ts';
// 测试查询运单设备关联
export function testDeliveryDevices(data) {
    return request({
        url: '/jbqClient/testDeliveryDevices',
        method: 'POST',
        data,
    });
}
// 耳标运单期间列表
export function earList(data) {
    return request({
        url: '/jbqClient/pageJbqListByDeliveryId',
        method: 'POST',
        data,
    });
}
// 耳标运单期间日志
export function earLogList(data) {
    return request({
        url: '/jbqClientLog/jbqLogList',
        method: 'POST',
        data,
    });
}
// 主机 - 定位
export function hostLocation(data) {
    return request({
        url: '/jbqServer/serverLocation',
        method: 'POST',
        data,
    });
}
// 主机 - 轨迹
export function hostTrack(data) {
    return request({
        url: '/jbqServer/serverTrack',
        method: 'POST',
        data,
    });
}

// 运送清单-分页查询
export function inspectionList(data) {
    return request({
        url: '/delivery/pageQueryList',
        method: 'POST',
        data,
    });
}

// 查询百度鹰眼轨迹与停留点
export function getYingyanTrack(data) {
    return request({
        url: '/delivery/yingyan/track',
        method: 'POST',
        data,
    });
}
//  详情
export function waybillDetail(id) {
    return request({
        url: `/delivery/detail?id=${id}`,
        method: 'GET',
    });
}
//  下载文件
export function downloadZip(id) {
    return request({
        url: `/delivery/downloadZip?deliveryId=${id}`,
        method: 'GET',
        responseType: 'blob',
    });
}
// 项圈设备列表
export function collarList(data) {
    console.log('=== 调用项圈设备列表API ===', data);
    return request({
        url: '/xqClient/list',
        method: 'POST',
        data,
    });
}
// 项圈运单期间日志
export function collarLogList(data) {
    return request({
        url: '/xqClientLog/xqLogList',
        method: 'POST',
        data,
    });
}

// 统一设备列表查询接口 - 支持智能项圈、智能耳标、智能主机
export function pageDeviceList(data) {
    return request({
        url: '/deliveryDevice/pageDeviceList',
        method: 'POST',
        data,
    });
}

// 智能耳标日志查询
export function getEarTagLogs(data) {
    return request({
        url: '/deliveryDevice/getEarTagLogs',
        method: 'POST',
        data,
    });
}

// 智能项圈日志查询
export function getCollarLogs(data) {
    return request({
        url: '/deliveryDevice/getCollarLogs',
        method: 'POST',
        data,
    });
}

// 智能主机日志查询
export function getHostLogs(data) {
    return request({
        url: '/deliveryDevice/getHostLogs',
        method: 'POST',
        data,
    });
}

// 智能耳标运动轨迹查询
export function getEarTagTrajectory(data) {
    return request({
        url: '/deliveryDevice/getEarTagTrajectory',
        method: 'POST',
        data,
    });
}

// 智能项圈运动轨迹查询
export function getCollarTrajectory(data) {
    return request({
        url: '/deliveryDevice/getCollarTrajectory',
        method: 'POST',
        data,
    });
}

// 智能主机运动轨迹查询
export function getHostTrajectory(data) {
    return request({
        url: '/deliveryDevice/getHostTrajectory',
        method: 'POST',
        data,
    });
}