import request from '@/router/axios';

export const getPage = (current, size, params) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const remove = (ids) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

export const add = (row) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/save',
        method: 'post',
        data: row
    })
}

export const update = (row) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/update',
        method: 'post',
        data: row
    })
}



export const getDetailByCode = (rtuCode) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/detail',
        method: 'get',
        params: {
            rtuCode
        }
    })
}

export const getRemainingproblemsPage = (current, size, params) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/remainingproblems/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const closeRemainingProblem = (params) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/remainingproblems/close',
        method: 'post',
        data: params
    })
}

export const monthRemainingProblemsExport = () => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/monthremainingproblems/export',
        method: 'get',

    })
}

export const uncloseRemainingProblemsExport = () => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/uncloseremainingproblems/export',
        method: 'get',

    })
}

export const getCountInfo = (adCode) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/count',
        method: 'get',
        params: {
            adCode
        }
    })
}

export const getInspectionReportStatus = (rtuCode) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/rtu/reportStatus',
        method: 'get',
        params: {
            rtuCode
        }
    })
}


export const getNoNetworkSignalReportPage = (current, size, params) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/report/nonetworksignal/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const getUnfinishedInspectionPage = (current, size, params) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/unfinished/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const unfinishedInspectionExport = (params) => {
    return request({
        url: '/api/galaxy-business/equipment/inspection/unfinished/export',
        method: 'get',
        params: {
            ...params,
        }
    })
}






