import request from '@/apps/mobile/utils/request'


// 诊单列表
export function queryLiftCasesList(data) {
    return request({
        method: 'post',
        url: '/api/liftCases/query-page',
        data,
    })
}

// 诊单详情
export function queryLiftCasesDetail(id) {
    return request({
        method: 'get',
        url: `/api/liftCases/query/${id}`,
    });
}

// 查询历史聊天记录
export function queryChatHistoryList(data) {
    return request({
        method: 'post',
        url: '/api/chatMsgs/messageHistory',
        data
    })
}


// 更新诊单
export function updateLiftCases(data) {
    return request({
        method: 'put',
        url: '/api/liftCases/update',
        data
    })
}


// 邀请专家
export function invitationExpert(data) {
    return request({
        method: 'put',
        url: '/api/liftCases/invitationExpert',
        data
    })
}


// 问诊专属：完善诊单，创建订单
export function createLiftCaseOrder(data) {
    return request({
        method: 'post',
        url: '/api/liftCases/generateOrder',
        data
    })
}

// 人员轨迹
export function queryTrail(data) {  
    return request({
        method: 'post',
        url: '/api/motionTrails/queryTrail',
        data,
    })
}

// 根据团队id查询用户
export function getUserByCompanyId(id) {
    return request({
        method: 'get',
        url: `/api/userInfos/getUserByCompanyId?companyId=${id}`
    });
}

// 团队最新定位
export function queryTrailByTeam(data) {
    return request({
        method: 'post',
        url: '/api/motionTrails/queryTrailByTeam',
        data,
    })
}


// 更新诊单
export function updateCustomerServiceId(data) {
    return request({
        method: 'put',
        url: '/api/liftCases/updateCustomerServiceId',
        data
    })
}

// 查询历史聊天记录
export function queryMsgHistoryList(data) {
    return request({
        method: 'post',
        url: '/api/chatMsgs/msgHistoryList',
        data
    })
}