/**
 * 工分接口
 */
import { request } from '@/utils/request'

/**
 * 查询工单工分列表
 */
export const listOrderScores = (query: UTSJSONObject | null): Promise<any> => {
    return request({
        url: '/gxt/orderScore/list',
        method: 'GET',
        data: query
    })
}

/**
 * 查询工单工分统计信息
 */
export const getOrderScoreStatistics = (query: UTSJSONObject | null): Promise<any> => {
    return request({
        url: '/gxt/orderScore/statistics',
        method: 'GET',
        data: query
    })
}

/**
 * 查询工单详情（包含工分信息）
 * @param orderType 工单类型
 * @param orderId 工单ID
 */
export const getOrderScoreDetail = (orderType: string, orderId: string): Promise<any> => {
    return request({
        url: '/gxt/orderScore/' + orderType + '/' + orderId,
        method: 'GET'
    })
}

/**
 * 查询移动端工单工分列表（支持关键词搜索）
 */
export const listMobileOrderScores = (query: UTSJSONObject | null): Promise<any> => {
    return request({
        url: '/gxt/orderScore/mobile/list',
        method: 'GET',
        data: query
    })
}

/*
 * 获取待评分工单列表
 * @param page 页码
 * @param rows 每页数量
 */
export const listMyRate = (query: UTSJSONObject | null): Promise<any> => {
    let url = '/mobile/order/listMyRate'
    return request({
        url: url,
        method: 'GET',
		data: query
    })
}