import { baseServer } from '@/api'
import request from '@/utils/require'

//获取上一年的数据
export function queryLastYearData(data) {
    return request({
        url: `${baseServer}/ccsstzjsmx/queryLastYearData`,
        method: 'post',
        params:data
    })
}
export function SaveCcsstzjs(data) {
    return request({
        url: `${baseServer}/ccsstzjsmx/add`,
        method: 'post',
        data:data
    })
}
//修改仓储设施
export function UpdateCcsstzjs(data) {
    return request({
        url: `${baseServer}/ccsstzjsmx/update`,
        method: 'post',
        data:data
    })
}
//仓储设施企业端列表
export function queryPageList(data,page) {
    return request({
        url: `${baseServer}/ccsstzjsmx/queryPageList?pageNum=${page.page}&pageSize=${page.size}`,
        method: 'post',
        data:data
    })
}
//查看详情
export function queryDetail(id) {
    return request({
        url: `${baseServer}/ccsstzjsmx/queryDetail/${id}`,
        method: 'get',
        // params:data
    })
}
//仓储设施投资建设汇总表--企业端--区购销、区粮办
export function queryHzForGlOrGxgs(data) {
    return request({
        url: `${baseServer}/ccsstzjsmx/queryHzForGlOrGxgs`,
        method: 'post',
        data:data
    })
}
//仓储设施明细表--区购销--管理端
export function queryMxForQlbOrGxgs(data) {
    return request({
        url: `${baseServer}/ccsstzjsmx/queryMxForQlbOrGxgs`,
        method: 'post',
        data:data
    })
}
//市局--仓储设施投资建设明细表
export function queryMxForSj(data) {
    return request({
        url: `${baseServer}/ccsstzjsmx/queryMxForSj`,
        method: 'post',
        data:data
    })
}
//导出汇总表
export function exportHzForGlOrGxgs(data) {
    return request({
      url: `${baseServer}/ccsstzjsmx/exportHzForGlOrGxgs`,
      method: 'post',
      responseType: 'blob',
      data:data
    });
}
//导出明细表
export function exportMxForQlbOrGxgs(data) {
    return request({
      url: `${baseServer}/ccsstzjsmx/exportMxForQlbOrGxgs`,
      method: 'post',
      responseType: 'blob',
      data:data
    });
}
//市级导出明细表
export function exportMxForSj(data) {
    return request({
      url: `${baseServer}/ccsstzjsmx/exportMxForSj`,
      method: 'post',
      responseType: 'blob',
      data:data
    });
}
