/*
 * @Author: micky
 * @Date: 2024-08-15 15:02:23
 * @LastEditors: micky
 * @LastEditTime: 2024-10-07 21:24:34
 * @FilePath: \chargingpile-uniapp\src\api\overhaul.ts
 */
import request from '@/utils/request'

// 检修单工单池
export const apiOverhaulList = (params: any) => {
    return request.get({ url: '/maintenanceOrder/list', data: params })
}
// 检修单分页列表
export function apiOverhaulPagelist(params: any) {
    return request.get({ url: '/maintenanceOrder/pageList', data: params })
}
// 检修单详情
export const apiOverhaulDetail = (params: any) => {
    return request.get({ url: '/maintenanceOrder/detail', data: params })
}

// 巡检单列表
export const apiInspectionList = (params: any) => {
    return request.get({ url: '/routingInspectionOrder/list', data: params })
}

// 巡检单工单池列表
export const apiInspectPool = (params: any) => {
    return request.get({ url: '/routingInspectionOrder/inspectionList', data: params })
}

// 巡检单详情
export const apiInspectionDetail = (params: any) => {
    return request.get({ url: '/routingInspectionOrder/detail', data: params })
}

// 巡检单接单
export function apiRoutingOrderReceive(params: any) {
    return request.post({ url: '/routingInspectionOrder/orderReceiving', data: params })
}

// 巡检单开始巡检
export function apiStartRouting(params: any) {
    return request.post({ url: '/routingInspectionOrder/startInspection', data: params })
}

// 巡检单故障检测
export function apiFaultDetection(params: any) {
    return request.post({ url: '/routingInspectionOrder/faultDetect', data: params })
}
// 巡检单抢单
export function apiInspectGrabOrder(params: any) {
    return request.post({ url: '/routingInspectionOrder/grabTheOrder', data: params })
}
// 巡检单退单
export function apiInspectBackOrder(params: any) {
    return request.post({ url: '/routingInspectionOrder/checking', data: params })
}
// 巡检工单状态统计
export function apiInsptectStatusCount(params: any) {
    return request.get({ url: '/routingInspectionOrder/orderStatusCount', data: params })
}

// 检修单-模块返修
export function apiModuleReturn(params: any) {
    return request.post({ url: '/maintenanceOrder/oldModuleRepair', data: params })
}

// 检修单-配件领用申请
export function apiApplyParts(params: any) {
    return request.post({ url: '/maintenanceOrder/sparePartsRequisition', data: params })
}

// 检修单-服务报价
export function apiOfferPrice(params: any) {
    return request.post({ url: '/maintenanceOrder/serviceOfferPrice', data: params })
}
// 检修单-填写回单
export function apiFillInReceipt(params: any) {
    return request.post({ url: '/maintenanceOrder/fillInReceipt', data: params })
}

// 检修单-模块替换
export function apiModuleReplace(params: any) {
    return request.post({ url: '/maintenanceOrder/updateEquipmentModel', data: params })
}

// 检修单-抢单
export function apiOverhaulGrabOrder(params: any) {
    return request.post({ url: '//maintenanceOrder/grabTheOrder', data: params })
}
// 检修单-接单
export function apiOverhaulOrderReceive(params: any) {
    return request.post({ url: '/maintenanceOrder/receivingOrder', data: params })
}
// 检修单-退单
export function apiOverhaulBackOrder(params: any) {
    return request.post({ url: '/maintenanceOrder/refundOrder', data: params })
}
// 检修单-确认收货
export function apiConfirmReceive(params: any) {
    return request.post({ url: '/maintenanceOrder/confirmReceipt', data: params })
}

// 检修单-模块代码查询检修订单信息
export function apiGetDetailByModule(params: any) {
    return request.get({ url: '/maintenanceOrder/getMaintenanceOrderDetail', data: params })
}

// 更新检修员位置
export function apiUpdateOverhaulLocation(params: any) {
    return request.post({ url: '/maintenanceOrder/receivingOrder', data: params })
}

// 检修工单状态统计
export function apiOverhaulStatusCount(params: any) {
    return request.get({ url: '/maintenanceOrder/orderStatusCount', data: params })
}

// 检修单-暂缓检修
export function apiStopRepair(params: any) {
    return request.post({ url: '/maintenanceOrder/updateEquipmentModel', data: params })
}

// 库存比对
export function apiCompareInventory(params: any) {
    return request.post({ url: '/maintenanceOrder/updateEquipmentModel', data: params })
}
