import { baseServer, FileApi } from '@/api/index'
import request from '@/utils/require'
//列表页 附带查询内容
export function selectEmptyPotApplyList(data) {
    return request({
        url: `${baseServer}/oiltankPage/${data.pageNum}/${data.pageSize}`,
        method: 'post',
        data: {
            ygbh: data.ygbh,
            ygmc: data.ygmc,
            jzksrq: data.jzksrq,
            jzjsrq: data.jzjsrq,
            kddm: data.kddm,
        }
    }) 
}

//列表页 附带查询内容
export function oiltankPages(data) {
    return request({
        url: `${baseServer}/oiltankPages/${data.pageNum}/${data.pageSize}`,
        method: 'post',
        data: {
            kdmc: data.kdmc,
        }
    })
}
//列表页 附带查询内容
export function getYgQyxxList(data) {
    return request({
        url: `${baseServer}/getYgQyxxList/${data.pageNum}/${data.pageSize}`,
        method: 'post',
        data: {
            kdmc: data.kdmc,
        }
    })
}
//删除
export function deleteEmptyPotApplyList(data) {
    return request({
        url: `${baseServer}/oiltank/${data.ygbh}`,
        method: 'delete',
        data: data
    })
}
//根据油罐编号获取信息
export function selectEmptyPotApplyListnumber(data) {
    return request({
        url: `${baseServer}/oiltank/${data.ygbh}`,
        method: 'get',
        data: data
    })
}
//新增
export function addEmptyPotApplyList(data) {
    return request({
        url: `${baseServer}/oiltank`,
        method: 'post',
        data: data
    })
}
//更新
export function updateEmptyPotApplyList(data) {
    return request({
        url: `${baseServer}/oiltank`,
        method: 'put',
        data: data
    })
}

// 获取所属企业代码
export function getSlqy(data) {
    return request({
        url: `${baseServer}/organization/${data.qyjgdm}`,
        method: 'get',
        data: data
    })
}
// 根据所属企业代码 获取库点编号和库点名称(单位名称)
export function getKDDetail(data) {
    return request({
        url: `${baseServer}/sinkpointList`,
        method: 'post',
        data: data
    })
}
// 下载油罐图片
export function downloadPic(id) {
    return request({
        url: `${FileApi}/file/download?id=${id}`,
        method: 'get',
    })
}