import request from '@/utils/request'

// 查询养护计划列表
export function listMaintain(query) {
    return request({
        url: '/system/maintain/list',
        method: 'get',
        params: query
    })
}

// 查询养护计划详细
export function getMaintain(id) {
    return request({
        url: '/system/maintain/' + id,
        method: 'get'
    })
}

// 新增养护计划
export function addMaintain(data) {
    return request({
        url: '/system/maintain',
        method: 'post',
        data: data
    })
}

// 修改养护计划
export function updateMaintain(data) {
    return request({
        url: '/system/maintain',
        method: 'put',
        data: data
    })
}

// 删除养护计划
export function delMaintain(id) {
    return request({
        url: '/system/maintain/' + id,
        method: 'delete'
    })
}

// 派发养护计划
export function distributedMaintain(data) {
    return request({
        url: "/system/maintain/distributed",
        method: "post",
        data: data,
    });
}

// 反馈养护计划
export function feedbackMaintain(data) {
    return request({
        url: "/system/maintain/feedback",
        method: "post",
        data: data,
    });
}

// 验收上传养护计划
export function completeMaintain(data) {
    return request({
        url: "/system/maintain/complete",
        method: "post",
        data: data,
    });
}

export function resultsuploadMaintain(data) {
    return request({
        url: "/system/maintain/resultsupload",
        method: "post",
        data: data,
    });
}