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

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

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

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